CheckBoxNode

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.gui.ensembleLibraryEditor.tree
Class CheckBoxNode

    java.lang.Object
      javax.swing.tree.DefaultMutableTreeNode
          weka.gui.ensembleLibraryEditor.tree.CheckBoxNode

All Implemented Interfaces:
  java.awt.event.ItemListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

    public class CheckBoxNode

extends javax.swing.tree.DefaultMutableTreeNode
implements java.awt.event.ItemListener

This class is responsible for implementing the underlying logic of tree nodes representing a single nominal value. This is either going to be true/false values or an enumeration of values defined by the model. Check box nodes are relatively simple in that they are simply toggled on or off by the user indicating whether or not they are to be used.

Version:
  $Revision: 1.1 $
Author:
  Robert Jung (mrbobjung@gmail.com)
See Also:
  Serialized Form

Field Summary

Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
`EMPTY_ENUMERATION`

Constructor Summary
`CheckBoxNode(java.lang.String name, boolean selected, java.lang.String toolTipText)` The constructor initializes the members of this node.

Method Summary
`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

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, 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`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CheckBoxNode

    public CheckBoxNode(java.lang.String name,
                        boolean selected,
                        java.lang.String toolTipText)

  The constructor initializes the members of this node. Note that the text String is stored as the userObject.

  Parameters:
    `name` - the name of this attribute
    `selected` - the initial value of this node
    `toolTipText` - the toolTipText to be displayed

Method Detail

### getSelected

    public boolean getSelected()

  getter for the node state

  Returns:
    whether or not this node is selected

### setSelected

    public void setSelected(boolean newValue)

  setter for the node state

  Parameters:
    `newValue` - the new selected state

### setBoxSelected

    public void setBoxSelected(boolean newValue)

  sets whether the box is selected

  Parameters:
    `newValue` - if true the box will be selected

### getName

    public java.lang.String getName()

  gets the name of the parameter value represented by this node which is stored as the node's user object

  Returns:
    the name of this parameter

### setName

    public 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

  Parameters:
    `newValue` - the new name

### getToolTipText

    public java.lang.String getToolTipText()

  getter for the tooltip text

  Returns:
    tooltip text

### setUserObject

    public void setUserObject(java.lang.Object o)

  this is a simple filter for the setUserObject method. We basically don't want null values to be passed in.

  Specified by:
    `setUserObject` in interface `javax.swing.tree.MutableTreeNode`
  Overrides:
    `setUserObject` in class `javax.swing.tree.DefaultMutableTreeNode`
  Parameters:
    `o` - the user object

### toString

    public java.lang.String toString()

  ToString methods prints out the toString method of this nodes user object

  Overrides:
    `toString` in class `javax.swing.tree.DefaultMutableTreeNode`
  Returns:
    a string representation

### itemStateChanged

    public void itemStateChanged(java.awt.event.ItemEvent e)

  This is the listener that fires when the check box is actually toggled. Here we just want to change the selected state accordingly.

  Specified by:
    `itemStateChanged` in interface `java.awt.event.ItemListener`
  Parameters:
    `e` - the event

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD