Class SidebarGroup<T extends @Nullable Object>

java.lang.Object
atlantafx.base.controls.SidebarItem<T>
atlantafx.base.controls.SidebarGroup<T>
Type Parameters:
T - the type of value payload held by items in the group
All Implemented Interfaces:
Disposable, javafx.event.EventTarget

public final class SidebarGroup<T extends @Nullable Object> extends SidebarItem<T> implements Disposable
A collapsible container item within a Sidebar that groups multiple SidebarNav sub-items.
See Also:
  • Property Details

  • Constructor Details

    • SidebarGroup

      public SidebarGroup(@Nullable String text)
      Constructs a SidebarGroup with text.
      Parameters:
      text - the display label for the group
    • SidebarGroup

      public SidebarGroup(@Nullable String text, @Nullable javafx.scene.Node graphic)
      Constructs a SidebarGroup with text and graphic.
      Parameters:
      text - the display label for the group
      graphic - the graphic node for the group header
    • SidebarGroup

      public SidebarGroup(@Nullable String text, @Nullable javafx.scene.Node graphic, @Nullable javafx.scene.Node accessory)
      Constructs a SidebarGroup with text, graphic, and accessory node.
      Parameters:
      text - the display label for the group
      graphic - the graphic node for the group header
      accessory - additional node rendered on the trailing side
  • Method Details

    • getItems

      public javafx.collections.ObservableList<SidebarNav<T>> getItems()
      Returns the observable list of child items contained within this group.
      Returns:
      the list of child items
    • expandedProperty

      public javafx.beans.property.BooleanProperty expandedProperty()
      Indicates whether the group's child items are currently visible.
      Returns:
      the expanded property
      See Also:
    • isExpanded

      public boolean isExpanded()
      Returns whether this group is expanded.
      Returns:
      true if expanded, false if collapsed
    • setExpanded

      public void setExpanded(boolean value)
      Sets whether this group should be expanded or collapsed.
      Parameters:
      value - true to expand, false to collapse
    • isNotEmpty

      public boolean isNotEmpty()
      Checks if this group contains at least one child item.
      Returns:
      true if items list is non-empty, false otherwise
    • dispose

      public void dispose()
      Description copied from interface: Disposable
      Releases any resources held by this component.

      After this method is called, the component should be considered unusable; further interaction with it results in undefined behavior.

      Specified by:
      dispose in interface Disposable