java.lang.Object
stud.ntnu.idatt1005.pantrypal.utils.NodeUtils

public class NodeUtils extends Object
Utility class for handling JavaFX nodes and panes.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addChildren(javafx.scene.layout.Pane pane, javafx.scene.Node child)
    Adds a child node to a pane.
    static void
    addChildren(javafx.scene.layout.Pane pane, javafx.scene.Node... children)
    Adds multiple child nodes to a pane.
    static void
    addClasses(javafx.scene.Node node, String styleClass)
    Adds a style class to a node.
    static void
    addClasses(javafx.scene.Node node, Collection<String> styleClasses)
    Adds multiple style classes to a node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NodeUtils

      public NodeUtils()
  • Method Details

    • addClasses

      public static void addClasses(javafx.scene.Node node, String styleClass)
      Adds a style class to a node.
      Parameters:
      node - the node to which the style class will be added
      styleClass - the style class to be added
    • addClasses

      public static void addClasses(javafx.scene.Node node, Collection<String> styleClasses)
      Adds multiple style classes to a node.
      Parameters:
      node - the node to which the style classes will be added
      styleClasses - the collection of style classes to be added
    • addChildren

      public static void addChildren(javafx.scene.layout.Pane pane, javafx.scene.Node child)
      Adds a child node to a pane.
      Parameters:
      pane - the pane to which the child node will be added
      child - the child node to be added
    • addChildren

      public static void addChildren(javafx.scene.layout.Pane pane, javafx.scene.Node... children)
      Adds multiple child nodes to a pane.
      Parameters:
      pane - the pane to which the child nodes will be added
      children - the child nodes to be added