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:
-
Nested Class Summary
Nested classes/interfaces inherited from class SidebarItem
SidebarItem.SidebarItemDispatcher -
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.BooleanPropertyIndicates whether the group's child items are currently visible.Properties inherited from class SidebarItem
accessory, graphic, text, value -
Constructor Summary
ConstructorsConstructorDescriptionSidebarGroup(@Nullable String text) Constructs aSidebarGroupwith text.SidebarGroup(@Nullable String text, @Nullable javafx.scene.Node graphic) Constructs aSidebarGroupwith text and graphic.SidebarGroup(@Nullable String text, @Nullable javafx.scene.Node graphic, @Nullable javafx.scene.Node accessory) Constructs aSidebarGroupwith text, graphic, and accessory node. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Releases any resources held by this component.javafx.beans.property.BooleanPropertyIndicates whether the group's child items are currently visible.javafx.collections.ObservableList<SidebarNav<T>> getItems()Returns the observable list of child items contained within this group.booleanReturns whether this group is expanded.booleanChecks if this group contains at least one child item.voidsetExpanded(boolean value) Sets whether this group should be expanded or collapsed.Methods inherited from class SidebarItem
accessoryProperty, addEventHandler, buildEventDispatchChain, fireEvent, getAccessory, getGraphic, getParentGroup, getProperties, getStyleClass, getText, getValue, graphicProperty, isSelected, isSelectedWithin, removeEventHandler, setAccessory, setGraphic, setText, setValue, textProperty, valuePropertyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javafx.event.EventTarget
addEventFilter, removeEventFilter
-
Property Details
-
expanded
public javafx.beans.property.BooleanProperty expandedPropertyIndicates whether the group's child items are currently visible.- See Also:
-
-
Constructor Details
-
SidebarGroup
Constructs aSidebarGroupwith text.- Parameters:
text- the display label for the group
-
SidebarGroup
Constructs aSidebarGroupwith text and graphic.- Parameters:
text- the display label for the groupgraphic- the graphic node for the group header
-
SidebarGroup
public SidebarGroup(@Nullable String text, @Nullable javafx.scene.Node graphic, @Nullable javafx.scene.Node accessory) Constructs aSidebarGroupwith text, graphic, and accessory node.- Parameters:
text- the display label for the groupgraphic- the graphic node for the group headeraccessory- additional node rendered on the trailing side
-
-
Method Details
-
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:
trueif expanded,falseif collapsed
-
setExpanded
public void setExpanded(boolean value) Sets whether this group should be expanded or collapsed.- Parameters:
value-trueto expand,falseto collapse
-
isNotEmpty
public boolean isNotEmpty()Checks if this group contains at least one child item.- Returns:
trueif items list is non-empty,falseotherwise
-
dispose
public void dispose()Description copied from interface:DisposableReleases 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:
disposein interfaceDisposable
-