edu.northwestern.at.utils.swing
Class CheckBoxTreeNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by edu.northwestern.at.utils.swing.CheckBoxTreeNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class CheckBoxTreeNode
extends javax.swing.tree.DefaultMutableTreeNode

Defines a node for a CheckBoxTree.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
CheckBoxTreeNode(java.lang.Object obj)
          Create a check box list item from an object.
CheckBoxTreeNode(java.lang.Object obj, boolean checked)
          Create a check box list item from an object.
 
Method Summary
 java.lang.Object getObject()
          Get object.
 java.lang.String getText()
          Get object text.
 boolean isChecked()
          Is item checked?
 void setChecked(boolean checked)
          Set checked status of item.
 java.lang.String toString()
          Get item text for display conversions.
 
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckBoxTreeNode

public CheckBoxTreeNode(java.lang.Object obj,
                        boolean checked)
Create a check box list item from an object.

Parameters:
obj - List item.
checked - True if list item checked.

CheckBoxTreeNode

public CheckBoxTreeNode(java.lang.Object obj)
Create a check box list item from an object.

Parameters:
obj - List item.

The item is initially set to not checked.

Method Detail

setChecked

public void setChecked(boolean checked)
Set checked status of item.

Parameters:
checked - True to select item, false to unselect.

isChecked

public boolean isChecked()
Is item checked?

Returns:
True if item checked.

getObject

public java.lang.Object getObject()
Get object.

Returns:
The item.

getText

public java.lang.String getText()
Get object text.

Returns:
The object text.

toString

public java.lang.String toString()
Get item text for display conversions.

Overrides:
toString in class javax.swing.tree.DefaultMutableTreeNode
Returns:
The item text.