public class StyleClassDecoration extends Decoration
Decoration designed to add a CSS style class
to a node (for example, to show a warning style when the field is incorrectly
set). StyleClassDecoration is applied as part of the ControlsFX Decorator
API - refer to the Decorator javadoc for more details.Decoration,
Decorator| Constructor and Description |
|---|
StyleClassDecoration(java.lang.String... styleClass)
Constructs a new StyleClassDecoration with the given var-args array of
style classes set to be applied to any node that has this decoration
applied to it.
|
| Modifier and Type | Method and Description |
|---|---|
javafx.scene.Node |
applyDecoration(javafx.scene.Node targetNode)
This method decorates the given
target node with the relevant decorations, returning any 'decoration node'
that needs to be added to the scenegraph (although this can be null).
|
void |
removeDecoration(javafx.scene.Node targetNode)
This method removes the decoration from the given target node.
|
getPropertiespublic StyleClassDecoration(java.lang.String... styleClass)
styleClass - A var-args array of style classes to apply to any node.java.lang.IllegalArgumentException - if the styleClass varargs array is null or empty.public javafx.scene.Node applyDecoration(javafx.scene.Node targetNode)
When the boolean parameter is false, this method removes the decoration from the given target node, always returning null.
applyDecoration in class DecorationtargetNode - The node to decorate.public void removeDecoration(javafx.scene.Node targetNode)
removeDecoration in class DecorationtargetNode - The node to undecorate.