java.lang.Object
com.dua3.utility.fx.controls.Decoration

public final class Decoration extends Object
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.
  • Method Details

    • getDecorations

      public static ObservableList<Decoration> getDecorations(Node node)
      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.
      Parameters:
      node - the Node from which to retrieve or to which to add decorations
      Returns:
      an observable list of decorations associated with the specified node
    • addDecoration

      public static void addDecoration(Node node, Pos position, Node decoration, String id)
      Adds a decoration to a specified Node at a given position with an identifiable ID.
      Parameters:
      node - the node to which the decoration will be added
      position - the position where the decoration will be placed relative to the node
      decoration - the decoration node to be added
      id - the unique identifier for the decoration
    • removeDecoration

      public static void removeDecoration(Node node, String id)
      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.
      Parameters:
      node - the Node from which to remove the decoration
      id - the unique identifier of the decoration to be removed