Top Description Fields Constructors Methods
com.dlsc.formsfx.model.structure

public Class Section

extends Group
Class Inheritance
Imports
com.dlsc.formsfx.model.util.TranslationService, javafx.beans.property.BooleanProperty, .SimpleBooleanProperty, .SimpleStringProperty, .StringProperty

A section is a kind of group with more options. It can have a title and can be collapsed by the user. Sections represent a more semantically heavy grouping of elements, compared to groups.
Authors
Sacha Schmid, Rinesch Murugathas

Field Summary

Modifier and TypeField and Description
protected final BooleanProperty
collapsed

A group can optionally be collapsed.

protected final BooleanProperty
collapsible

Section is collapsible by default

protected final StringProperty
protected final StringProperty
titleKey

The title acts as a description for the group.

Inherited from com.dlsc.formsfx.model.structure.Group:
changedelementstranslationServicevalid

Constructor Summary

AccessConstructor and Description
private
Section(Element<E extends Element<E>>... elements)

Method Summary

Modifier and TypeMethod and Description
public Section
collapse(boolean
The new value for the collapsed state.
newValue
)

Changes the collapsed state on a section.

public BooleanProperty
public Section
collapsible(boolean
The new value for the collapsible state.
newValue
)

Changes the collapsible state on a section.

public BooleanProperty
public String
public boolean
public boolean
public static Section

Returns:

Returns a new Section.
of
(Element<E extends Element<E>>...
The elements to be included in the section.
elements
)

Hides com.dlsc.formsfx.model.structure.Group.of.

Creates a new section containing the given elements.

public Section

Returns:

Returns the current group to allow for chaining.
title
(String
The new value for the title property. This can be the title itself or a key that is then used for translation.
newValue
)

Sets the title property of the current group.

public StringProperty
protected void
translate(TranslationService
The new service to use for translating translatable values.
newValue
)

Overrides com.dlsc.formsfx.model.structure.Group.translate.

This internal method is called by the containing form when a new translation has been added to the form.

Inherited from com.dlsc.formsfx.model.structure.Group:
addEventHandlerchangedPropertyfireEventgetElementshasChangedisI18NisValidpersistremoveEventHandlerresetvalidProperty

Field Detail

collapsedback to summary
protected final BooleanProperty collapsed

A group can optionally be collapsed.

collapsibleback to summary
protected final BooleanProperty collapsible

Section is collapsible by default

titleback to summary
protected final StringProperty title
titleKeyback to summary
protected final StringProperty titleKey

The title acts as a description for the group. It is always visible to the user and tells them how the contained elements are grouped. This property is translatable if a TranslationService is set on the containing form.

Constructor Detail

Sectionback to summary
private Section(Element<E extends Element<E>>... elements)

Method Detail

collapseback to summary
public Section collapse(boolean newValue)

Changes the collapsed state on a section.

Parameters
newValue:boolean

The new value for the collapsed state.

collapsedPropertyback to summary
public BooleanProperty collapsedProperty()
collapsibleback to summary
public Section collapsible(boolean newValue)

Changes the collapsible state on a section.

Parameters
newValue:boolean

The new value for the collapsible state.

collapsiblePropertyback to summary
public BooleanProperty collapsibleProperty()
getTitleback to summary
public String getTitle()
isCollapsedback to summary
public boolean isCollapsed()
isCollapsibleback to summary
public boolean isCollapsible()
ofback to summary
public static Section of(Element<E extends Element<E>>... elements)

Hides com.dlsc.formsfx.model.structure.Group.of.

Creates a new section containing the given elements.

Parameters
elements:Element<E extends Element<E>>[]

The elements to be included in the section.

Returns:Section

Returns a new Section.

titleback to summary
public Section title(String newValue)

Sets the title property of the current group.

Parameters
newValue:String

The new value for the title property. This can be the title itself or a key that is then used for translation.

Returns:Section

Returns the current group to allow for chaining.

See Also
TranslationService
titlePropertyback to summary
public StringProperty titleProperty()
translateback to summary
protected void translate(TranslationService newValue)

Overrides com.dlsc.formsfx.model.structure.Group.translate.

Doc from com.dlsc.formsfx.model.structure.Group.translate.

This internal method is called by the containing form when a new translation has been added to the form. Also applies the translation to all contained elements.

Parameters
newValue:TranslationService

The new service to use for translating translatable values.