public class LayerTreeNode extends BasicTreeNode
TreeNode
that represents a Layer
.
The node's selection state is synchronized with its Layer
's enabled state.
returns whether the node's isSelected()
Layer
is enabled. Calling
specifies both the the node's selection state, and whether its setSelected(boolean)
Layer
should be enabled for rendering and selection.
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
DEFAULT_IMAGE
The layer node's default icon path.
|
protected Layer |
layer
Indicates the
Layer this node represents. |
children, description, enabled, imageSource, parent, selected, text, texture, treeSelected, visible
NOT_SELECTED, PARTIALLY_SELECTED, SELECTED
Constructor and Description |
---|
LayerTreeNode(Layer layer)
Creates a new
LayerTreeNode from the specified layer . |
Modifier and Type | Method and Description |
---|---|
protected void |
initialize()
Initializes this node's image source.
|
boolean |
isSelected()
Indicates whether this node's
Layer is enabled for rendering and selection. |
void |
setSelected(boolean selected)
Specifies whether this node's
Layer is enabled for rendering and selection. |
addChild, addChild, computeTreeSelected, getChildren, getDescription, getImageSource, getParent, getPath, getText, getTexture, hasImage, initializeTexture, isEnabled, isLeaf, isTreeSelected, isVisible, propertyChange, removeAllChildren, removeChild, setDescription, setEnabled, setImageSource, setParent, setVisible
onMessage
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
onMessage
protected static final java.lang.String DEFAULT_IMAGE
protected Layer layer
Layer
this node represents. Initialized to a non-null
value during
construction.public LayerTreeNode(Layer layer)
LayerTreeNode
from the specified layer
. The node's name is set to the
layer's name.layer
- the Layer
this node represents.java.lang.IllegalArgumentException
- if the layer
is null
.protected void initialize()
public boolean isSelected()
Layer
is enabled for rendering and selection.isSelected
in interface TreeNode
isSelected
in class BasicTreeNode
true
if the Layer
is enabled, otherwise false
.TreeNode.setSelected(boolean)
,
TreeNode.isTreeSelected()
public void setSelected(boolean selected)
Layer
is enabled for rendering and selection. This sets both the
node's selection state and its Layer
's enabled state.setSelected
in interface TreeNode
setSelected
in class BasicTreeNode
selected
- true
to enable the Layer
, otherwise false
.TreeNode.isSelected()