public class CheckBoxNode
extends javax.swing.tree.DefaultMutableTreeNode
implements java.awt.event.ItemListener
Constructor and Description |
---|
CheckBoxNode(java.lang.String name,
boolean selected,
java.lang.String toolTipText)
The constructor initializes the members of this node.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
gets the name of the parameter value represented by this node
which is stored as the node's user object
|
boolean |
getSelected()
getter for the node state
|
java.lang.String |
getToolTipText()
getter for the tooltip text
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
This is the listener that fires when the check box is actually toggled.
|
void |
setBoxSelected(boolean newValue)
sets whether the box is selected
|
void |
setName(java.lang.String newValue)
sets the name of the parameter value represented by this node
and stores it as the node's user object
|
void |
setSelected(boolean newValue)
setter for the node state
|
void |
setUserObject(java.lang.Object o)
this is a simple filter for the setUserObject method.
|
java.lang.String |
toString()
ToString methods prints out the toString method of this nodes user
object
|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, 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
public CheckBoxNode(java.lang.String name, boolean selected, java.lang.String toolTipText)
name
- the name of this attributeselected
- the initial value of this nodetoolTipText
- the toolTipText to be displayedpublic boolean getSelected()
public void setSelected(boolean newValue)
newValue
- the new selected statepublic void setBoxSelected(boolean newValue)
newValue
- if true the box will be selectedpublic java.lang.String getName()
public void setName(java.lang.String newValue)
newValue
- the new namepublic java.lang.String getToolTipText()
public void setUserObject(java.lang.Object o)
setUserObject
in interface javax.swing.tree.MutableTreeNode
setUserObject
in class javax.swing.tree.DefaultMutableTreeNode
o
- the user objectpublic java.lang.String toString()
toString
in class javax.swing.tree.DefaultMutableTreeNode
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
e
- the event