java.lang.Object
com.dua3.utility.fx.controls.Decoration
The Decoration class provides static methods to manage decorations for JavaFX Nodes.
Decorations can be added, removed, and their positions updated relative to the owner node.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic voidaddDecoration(Node node, Pos position, Node decoration, String id) Adds a decoration to a specifiedNodeat a given position with an identifiable ID.static ObservableList<Decoration> getDecorations(Node node) Retrieves the list of decorations associated with a given Node.static voidremoveDecoration(Node node, String id) Removes a decoration from the given Node as identified by the specified ID.
-
Methodendetails
-
getDecorations
Retrieves the list of decorations associated with a given Node. If no decorations are present, a new list is created and stored in the node's properties.- Parameter:
node- theNodefrom which to retrieve or to which to add decorations- Gibt zurück:
- an observable list of decorations associated with the specified node
-
addDecoration
Adds a decoration to a specifiedNodeat a given position with an identifiable ID.- Parameter:
node- the node to which the decoration will be addedposition- the position where the decoration will be placed relative to the nodedecoration- the decoration node to be addedid- the unique identifier for the decoration
-
removeDecoration
Removes a decoration from the given Node as identified by the specified ID. If the decoration exists, it is removed from the decoration pane associated with the node.- Parameter:
node- the Node from which to remove the decorationid- the unique identifier of the decoration to be removed
-