java.lang.Object
org.controlsfx.control.decoration.Decoration
- Direct Known Subclasses:
GraphicDecoration
,StyleClassDecoration
Decoration is an abstract class used by the ControlsFX
Decorator
class
for adding and removing decorations on a node. ControlsFX
ships with pre-built decorations, including GraphicDecoration
and
StyleClassDecoration
.
To better understand how to use the ControlsFX decoration API in your
application, refer to the code samples and explanations in Decorator
.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Instantiates a default Decoration instance (obviously only callable by subclasses). -
Method Summary
Modifier and TypeMethodDescriptionabstract 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).Custom decoration propertiesabstract void
removeDecoration
(javafx.scene.Node targetNode) This method removes the decoration from the given target node.
-
Constructor Details
-
Decoration
protected Decoration()Instantiates a default Decoration instance (obviously only callable by subclasses).
-
-
Method Details
-
applyDecoration
public abstract 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). When the returned Node is null, this indicates that the decoration will be handled internally by the decoration (which is preferred, as the default implementation is not ideal in most circumstances).When the boolean parameter is false, this method removes the decoration from the given target node, always returning null.
- Parameters:
targetNode
- The node to decorate.- Returns:
- The decoration, but null is a valid return value.
-
removeDecoration
public abstract void removeDecoration(javafx.scene.Node targetNode) This method removes the decoration from the given target node.- Parameters:
targetNode
- The node to undecorate.
-
getProperties
Custom decoration properties- Returns:
- decoration properties
-