java.lang.Object
stud.ntnu.idatt1005.pantrypal.utils.NodeUtils
Utility class for handling JavaFX nodes and panes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Constructor Details
-
NodeUtils
public NodeUtils()
-
-
Method Details
-
addClasses
Adds a style class to a node.- Parameters:
node
- the node to which the style class will be addedstyleClass
- the style class to be added
-
addClasses
Adds multiple style classes to a node.- Parameters:
node
- the node to which the style classes will be addedstyleClasses
- 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 addedchild
- 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 addedchildren
- the child nodes to be added
-