java.lang.Object
com.dlsc.formsfx.model.structure.Group
com.dlsc.formsfx.model.structure.Section
public class Section extends Group
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.
- Author:
- Sacha Schmid, Rinesch Murugathas
-
Property Summary
Properties Type Property Description javafx.beans.property.BooleanPropertycollapsedA group can optionally be collapsed.javafx.beans.property.BooleanPropertycollapsibleSection is collapsible by defaultjavafx.beans.property.StringPropertytitle -
Field Summary
Fields Modifier and Type Field Description protected javafx.beans.property.BooleanPropertycollapsedA group can optionally be collapsed.protected javafx.beans.property.BooleanPropertycollapsibleSection is collapsible by defaultprotected javafx.beans.property.StringPropertytitleprotected javafx.beans.property.StringPropertytitleKeyThe title acts as a description for the group.Fields inherited from class com.dlsc.formsfx.model.structure.Group
changed, elements, translationService, valid -
Method Summary
Modifier and Type Method Description Sectioncollapse(boolean newValue)Changes the collapsed state on a section.javafx.beans.property.BooleanPropertycollapsedProperty()A group can optionally be collapsed.Sectioncollapsible(boolean newValue)Changes the collapsible state on a section.javafx.beans.property.BooleanPropertycollapsibleProperty()Section is collapsible by defaultStringgetTitle()Gets the value of the property title.booleanisCollapsed()Gets the value of the property collapsed.booleanisCollapsible()Gets the value of the property collapsible.static Sectionof(Element... elements)Creates a new section containing the given elements.Sectiontitle(String newValue)Sets the title property of the current group.javafx.beans.property.StringPropertytitleProperty()protected voidtranslate(TranslationService newValue)This internal method is called by the containing form when a new translation has been added to the form.Methods inherited from class com.dlsc.formsfx.model.structure.Group
addEventHandler, changedProperty, fireEvent, getElements, hasChanged, isI18N, isValid, persist, removeEventHandler, reset, validProperty
-
Property Details
-
collapsed
public javafx.beans.property.BooleanProperty collapsedPropertyA group can optionally be collapsed.- See Also:
isCollapsed()
-
title
public javafx.beans.property.StringProperty titleProperty- See Also:
getTitle()
-
collapsible
public javafx.beans.property.BooleanProperty collapsiblePropertySection is collapsible by default- See Also:
isCollapsible()
-
-
Field Details
-
titleKey
protected final javafx.beans.property.StringProperty titleKeyThe 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 aTranslationServiceis set on the containing form. -
title
protected final javafx.beans.property.StringProperty title -
collapsed
protected final javafx.beans.property.BooleanProperty collapsedA group can optionally be collapsed. -
collapsible
protected final javafx.beans.property.BooleanProperty collapsibleSection is collapsible by default
-
-
Method Details
-
of
Creates a new section containing the given elements.- Parameters:
elements- The elements to be included in the section.- Returns:
- Returns a new
Section.
-
title
Sets the title property of the current group.- Parameters:
newValue- The new value for the title property. This can be the title itself or a key that is then used for translation.- Returns:
- Returns the current group to allow for chaining.
- See Also:
TranslationService
-
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. -
collapse
Changes the collapsed state on a section.- Parameters:
newValue- The new value for the collapsed state.
-
collapsedProperty
public javafx.beans.property.BooleanProperty collapsedProperty()A group can optionally be collapsed.- See Also:
isCollapsed()
-
isCollapsed
public boolean isCollapsed()Gets the value of the property collapsed.- Property description:
- A group can optionally be collapsed.
-
getTitle
Gets the value of the property title.- Property description:
-
titleProperty
public javafx.beans.property.StringProperty titleProperty()- See Also:
getTitle()
-
collapsible
Changes the collapsible state on a section.- Parameters:
newValue- The new value for the collapsible state.
-
isCollapsible
public boolean isCollapsible()Gets the value of the property collapsible.- Property description:
- Section is collapsible by default
-
collapsibleProperty
public javafx.beans.property.BooleanProperty collapsibleProperty()Section is collapsible by default- See Also:
isCollapsible()
-