Class Section

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 Details

    • collapsed

      public javafx.beans.property.BooleanProperty collapsedProperty
      A group can optionally be collapsed.
      See Also:
      isCollapsed()
    • title

      public javafx.beans.property.StringProperty titleProperty
      See Also:
      getTitle()
    • collapsible

      public javafx.beans.property.BooleanProperty collapsibleProperty
      Section is collapsible by default
      See Also:
      isCollapsible()
  • Field Details

    • titleKey

      protected final javafx.beans.property.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.
    • title

      protected final javafx.beans.property.StringProperty title
    • collapsed

      protected final javafx.beans.property.BooleanProperty collapsed
      A group can optionally be collapsed.
    • collapsible

      protected final javafx.beans.property.BooleanProperty collapsible
      Section is collapsible by default
  • Method Details

    • of

      public static Section of​(Element... elements)
      Creates a new section containing the given elements.
      Parameters:
      elements - The elements to be included in the section.
      Returns:
      Returns a new Section.
    • title

      public Section title​(String newValue)
      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

      protected void translate​(TranslationService newValue)
      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.
      Overrides:
      translate in class Group
      Parameters:
      newValue - The new service to use for translating translatable values.
    • collapse

      public Section collapse​(boolean newValue)
      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

      public String getTitle()
      Gets the value of the property title.
      Property description:
    • titleProperty

      public javafx.beans.property.StringProperty titleProperty()
      See Also:
      getTitle()
    • collapsible

      public Section collapsible​(boolean newValue)
      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()