Top Description Fields Constructors Methods
org.controlsfx.control.decoration

public abstract Class Decoration

extends Object
Class Inheritance
Known Direct Subclasses
org.controlsfx.control.decoration.GraphicDecoration, org.controlsfx.control.decoration.StyleClassDecoration
Imports
java.util.HashMap, .Map, javafx.scene.Node

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
Decorator, GraphicDecoration, StyleClassDecoration

Field Summary

Modifier and TypeField and Description
private volatile Map<String, Object>

Constructor Summary

AccessConstructor and Description
protected
Decoration()

Instantiates a default Decoration instance (obviously only callable by subclasses).

Method Summary

Modifier and TypeMethod and Description
public abstract Node

Returns:

The decoration, but null is a valid return value.
applyDecoration
(Node
The node to decorate.
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).

public final synchronized Map<String, Object>

Returns:

decoration properties
getProperties
()

Custom decoration properties

public abstract void
removeDecoration(Node
The node to undecorate.
targetNode
)

This method removes the decoration from the given target node.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

propertiesback to summary
private volatile Map<String, Object> properties

Constructor Detail

Decorationback to summary
protected Decoration()

Instantiates a default Decoration instance (obviously only callable by subclasses).

Method Detail

applyDecorationback to summary
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:Node

The node to decorate.

Returns:Node

The decoration, but null is a valid return value.

getPropertiesback to summary
public final synchronized Map<String, Object> getProperties()

Custom decoration properties

Returns:Map<String, Object>

decoration properties

removeDecorationback to summary
public abstract void removeDecoration(Node targetNode)

This method removes the decoration from the given target node.

Parameters
targetNode:Node

The node to undecorate.