org.jivesoftware.spark.component
Class CheckNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by org.jivesoftware.spark.component.JiveTreeNode
          extended by org.jivesoftware.spark.component.CheckNode
All Implemented Interfaces:
java.awt.datatransfer.Transferable, java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class CheckNode
extends JiveTreeNode

Creates one tree node with a check box.

See Also:
Serialized Form

Field Summary
static int DIG_IN_SELECTION
          Mode to use if the node should be expaned if selected and if possible.
static int SINGLE_SELECTION
          Mode to use if the node should not expand when selected.
 
Fields inherited from class org.jivesoftware.spark.component.JiveTreeNode
DATA_FLAVORS
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
CheckNode()
          Construct an empty node.
CheckNode(java.lang.Object userObject)
          Creates a new CheckNode with the specified name.
CheckNode(java.lang.Object userObject, boolean allowsChildren, boolean isSelected)
          Constructs a new CheckNode.
CheckNode(java.lang.Object userObject, boolean allowsChildren, boolean isSelected, java.lang.String name)
          Constructs a new CheckNode.
 
Method Summary
 java.lang.Object getAssociatedObject()
          Returns the associated object of this node.
 java.lang.String getFullName()
          Returns the full name of the node.
 int getSelectionMode()
          Returns the selection mode.
 boolean isSelected()
          Returns true if the node is selected.
 void setAssociatedObject(java.lang.Object associatedObject)
          Sets an assoicated object for this node.
 void setSelected(boolean isSelected)
          Selects or deselects node.
 void setSelectionMode(int mode)
          Sets the selection mode.
 
Methods inherited from class org.jivesoftware.spark.component.JiveTreeNode
getClosedIcon, getIcon, getOpenIcon, getTransferData, getTransferDataFlavors, hasParent, isDataFlavorSupported, setIcon
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SINGLE_SELECTION

public static final int SINGLE_SELECTION
Mode to use if the node should not expand when selected.

See Also:
Constant Field Values

DIG_IN_SELECTION

public static final int DIG_IN_SELECTION
Mode to use if the node should be expaned if selected and if possible.

See Also:
Constant Field Values
Constructor Detail

CheckNode

public CheckNode()
Construct an empty node.


CheckNode

public CheckNode(java.lang.Object userObject)
Creates a new CheckNode with the specified name.

Parameters:
userObject - the name to use.

CheckNode

public CheckNode(java.lang.Object userObject,
                 boolean allowsChildren,
                 boolean isSelected)
Constructs a new CheckNode.

Parameters:
userObject - the name to use.
allowsChildren - true if it allows children.
isSelected - true if it is to be selected.

CheckNode

public CheckNode(java.lang.Object userObject,
                 boolean allowsChildren,
                 boolean isSelected,
                 java.lang.String name)
Constructs a new CheckNode.

Parameters:
userObject - the name to use.
allowsChildren - true if it allows children.
isSelected - true if it is selected.
name - the identifier name.
Method Detail

getFullName

public java.lang.String getFullName()
Returns the full name of the node.

Returns:
the full name of the node.

setSelectionMode

public void setSelectionMode(int mode)
Sets the selection mode.

Parameters:
mode - the selection mode to use.

getSelectionMode

public int getSelectionMode()
Returns the selection mode.

Returns:
the selection mode.

setSelected

public void setSelected(boolean isSelected)
Selects or deselects node.

Parameters:
isSelected - true if the node should be selected, false otherwise.

isSelected

public boolean isSelected()
Returns true if the node is selected.

Returns:
true if the node is selected.

getAssociatedObject

public java.lang.Object getAssociatedObject()
Returns the associated object of this node.

Overrides:
getAssociatedObject in class JiveTreeNode
Returns:
the associated object.

setAssociatedObject

public void setAssociatedObject(java.lang.Object associatedObject)
Sets an assoicated object for this node.

Overrides:
setAssociatedObject in class JiveTreeNode
Parameters:
associatedObject - the associated object set.