Module org.tentackle.fx.rdc
Package org.tentackle.fx.rdc
Class PdoTreeItem<T extends PersistentDomainObject<T>>
java.lang.Object
javafx.scene.control.TreeItem<T>
org.tentackle.fx.rdc.PdoTreeItem<T>
- Type Parameters:
T- the pdo type
- All Implemented Interfaces:
javafx.event.EventTarget
public class PdoTreeItem<T extends PersistentDomainObject<T>>
extends javafx.scene.control.TreeItem<T>
Tree item for a PDO.
- Author:
- harald
-
Property Summary
Properties inherited from class javafx.scene.control.TreeItem
expanded, graphic, leaf, parent, value -
Nested Class Summary
Nested classes/interfaces inherited from class javafx.scene.control.TreeItem
javafx.scene.control.TreeItem.TreeModificationEvent<T extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcollapse()Collapses this and all child tree items.voidexpand()Expands this and all child tree items.
If the item is already expanded, the item and all child items will be collapsed before all is expanded again.javafx.collections.ObservableList<javafx.scene.control.TreeItem<T>>Lazily gets the GUI provider for the PDO.<P extends PersistentDomainObject<P>>
PGets the parent PDO.<P extends PersistentDomainObject<P>>
PgetParentPdo(Class<P> parentPdoClass) Gets the parent item's pdo.<P extends PersistentDomainObject<P>>
PdoTreeItem<P>Gets the parent PdoTreeItem.getPdo()Returns the PDO represented by this item.booleanisLeaf()voidSets the pdo.
Can be used to reload the pdo, for example.Methods inherited from class javafx.scene.control.TreeItem
addEventHandler, branchCollapsedEvent, branchExpandedEvent, buildEventDispatchChain, childrenModificationEvent, expandedItemCountChangeEvent, expandedProperty, getGraphic, getParent, getValue, graphicChangedEvent, graphicProperty, isExpanded, leafProperty, nextSibling, nextSibling, parentProperty, previousSibling, previousSibling, removeEventHandler, setExpanded, setGraphic, setValue, toString, treeNotificationEvent, valueChangedEvent, valueProperty
-
Constructor Details
-
PdoTreeItem
Creates a tree item for a PDO.- Parameters:
pdo- the pdo
-
-
Method Details
-
getPdo
Returns the PDO represented by this item.- Returns:
- the PDO
-
setPdo
Sets the pdo.
Can be used to reload the pdo, for example.- Parameters:
pdo- the pdo
-
isLeaf
public boolean isLeaf()- Overrides:
isLeafin classjavafx.scene.control.TreeItem<T extends PersistentDomainObject<T>>
-
getChildren
- Overrides:
getChildrenin classjavafx.scene.control.TreeItem<T extends PersistentDomainObject<T>>
-
getParentPdoItem
Gets the parent PdoTreeItem.- Type Parameters:
P- the parent PDO type- Returns:
- the parent, null if no parent or parent is no PdoTreeItem
-
getParentPdo
Gets the parent PDO.- Type Parameters:
P- the parent PDO type- Returns:
- the patent PDO, null if no parent or parent item is no PdoTreeItem
-
getParentPdo
Gets the parent item's pdo.- Type Parameters:
P- the parent PDO type- Parameters:
parentPdoClass- the entity class of the parent PDO- Returns:
- the parent pdo, null if no parent or parent is no PdoTreeItem or not pointing to an instance of
parentPdoClass
-
getGuiProvider
Lazily gets the GUI provider for the PDO.- Returns:
- the provider, never null
-
expand
public void expand()Expands this and all child tree items.
If the item is already expanded, the item and all child items will be collapsed before all is expanded again. -
collapse
public void collapse()Collapses this and all child tree items.
-