- java.lang.Object
-
- org.controlsfx.control.decoration.Decoration
-
- Direct Known Subclasses:
GraphicDecoration
,StyleClassDecoration
public abstract class Decoration extends Object
Decoration is an abstract class used by the ControlsFXDecorator
class for adding and removing decorations on a node. ControlsFX ships with pre-built decorations, includingGraphicDecoration
andStyleClassDecoration
.To better understand how to use the ControlsFX decoration API in your application, refer to the code samples and explanations in
Decorator
.- See Also:
Decorator
,GraphicDecoration
,StyleClassDecoration
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Decoration()
Instantiates a default Decoration instance (obviously only callable by subclasses).
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Node
applyDecoration(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).Map<String,Object>
getProperties()
Custom decoration propertiesabstract void
removeDecoration(Node targetNode)
This method removes the decoration from the given target node.
-
-
-
Method Detail
-
applyDecoration
public abstract Node applyDecoration(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(Node targetNode)
This method removes the decoration from the given target node.- Parameters:
targetNode
- The node to undecorate.
-
-