All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

*** This class is subject to change. ***

## com.sas.swing.visuals
Class CheckBoxTree

    com.sas.swing.visuals.CheckBoxTree

All Implemented Interfaces:
  LayoutConstants, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.TreeExpansionListener, javax.swing.event.TreeModelListener, javax.swing.event.TreeSelectionListener, javax.swing.event.TreeWillExpandListener, javax.swing.Scrollable

    public class CheckBoxTree

implements javax.swing.event.TreeModelListener, javax.swing.event.TreeExpansionListener, javax.swing.event.TreeWillExpandListener, javax.swing.event.TreeSelectionListener, java.beans.PropertyChangeListener, LayoutConstants

The CheckBoxTree is a subclass of JTree that adds the capability of having checkboxes for each node in the tree. The checked state of each node is stored in a `TreeSelectionModel`. The CheckBoxTree gives the user the option of having checkboxes on the leaf nodes and/or the parent nodes in the tree.

See Also:
  Serialized Form

Field Summary
`static int` | `ALL_CHILDREN_SELECTED`
`protected javax.swing.JCheckBox` | `checkBox`
`protected boolean` | `checkBoxOnLeafNodes`
`protected boolean` | `checkBoxOnParentNodes`
`protected boolean` | `checkBoxOnRootNode`
`protected boolean` | `checkBoxShouldCheckChildren`
`protected boolean` | `checkBoxShouldCheckParents`
`protected javax.swing.tree.TreeSelectionModel` | `checkedTreeModel`
`protected CheckBoxTreeCellRendererWrapper` | `checkRenderer`
`static int` | `NO_CHECKBOX`
`static int` | `NODE_ALL_CHILDREN_SELECTED`
`static int` | `NODE_NO_CHILDREN_SELECTED`
`static int` | `NODE_SELECTED`
`static int` | `NODE_SOME_CHILDREN_SELECTED`
`static int` | `NOTHING_SELECTED`
`static int` | `POSTORDER`
`static int` | `PREORDER`
`protected boolean` | `showSelectionIcon`
`static int` | `SOME_CHILDREN_SELECTED`

Fields inherited from interface com.sas.swing.visuals.util.LayoutConstants
`DOTS_BUTTON_INSETS, EMPTY_INSETS, HGAP, HMARGIN, INDENTED_BORDER, TAB_BORDER, TEXTFIELD_INSETS, VGAP, VMARGIN`

Constructor Summary
`CheckBoxTree()` Default constructor, trre model will be the default tree model and both parent and leaf nodes will have checkboxes.
`CheckBoxTree(javax.swing.tree.TreeModel model)` Creates a CheckBoxTree and will use the given tree model as the model.

Method Summary
`void` | `checkChildren(javax.swing.tree.TreePath path, boolean setChecked, boolean recursive)` This method is used to check or uncheck the children nodes for the given node.
`void` | `checkParents(javax.swing.tree.TreePath path, boolean setChecked, boolean recursive)` This method is used to check or uncheck the children nodes for the given node.
`void` | `checkPath(javax.swing.tree.TreePath path, boolean setChecked, boolean makeVisible)` This method is used to checks or uncheck the node represented by the given path.
`javax.swing.tree.TreeSelectionModel` | `createDefaultCheckedModel()` Creates the default TreeSelectionModel which stores the check state of each node in the tree.
`void` | `createDefaultIcons()` Creates the defaults icons to use for the various check states
`javax.swing.Icon` | `getAllChildrenSelectedIcon()` Returns the icon that gets used for the `ALL_CHILDREN_SELECTED` checked state.
`java.util.List` | `getCheckedChildrenPaths(javax.swing.tree.TreePath path)` Returns a | `javax.swing.tree.TreeSelectionModel` | `getCheckedModel()` Returns the model that is used for storing the checked state of each node in the tree.
`java.lang.Object[]` | `getCheckedObjects()` Returns all the objects which are checked in the tree.
`java.lang.Object[]` | `getCheckedObjects(int order)` Returns all the objects which are checked in the tree using the given order.
`int` | `getCheckedState(javax.swing.tree.TreePath path)` Returns the state of the checkbox and its icon for the given TreePath.
`int` | `getDelayForCursorChange()` Returns the delay in milliseconds for the cursor change to take.
`javax.swing.Icon` | `getIconForCheckedState(int state)` Return the icon the gets used for the given state.
`javax.swing.Icon` | `getNodeAndAllChildrenSelectedIcon()` Returns the icon that gets used for the `NODE_ALL_CHILDREN_SELECTED` checked state.
`javax.swing.Icon` | `getNodeAndSomeChildrenSelectedIcon()` Returns the icon that gets used for the `NODE_SOME_CHILDREN_SELECTED` checked state.
`javax.swing.Icon` | `getNodeSelectedIcon()` Returns the icon that gets used for the `NODE_SELECTED` and `NODE_NO_CHILDREN_SELECTED` checked state.
`javax.swing.Icon` | `getNoneSelectedIcon()` Returns the icon that gets used for the `NOTHING_SELECTED` checked state.
`javax.swing.Icon` | `getSomeChildrenSelectedIcon()` Returns the icon that gets used for the `SOME_CHILDREN_SELECTED` checked state.
`boolean` | `isChangeCursorWhenBusy()` Returns true if the busy cursor will show when the tree is taking more then the set delay for a cursor change.
`boolean` | `isCheckBoxOnLeafNodes()` Returns true if checkboxes are to be shown on leaf nodes or not.
`boolean` | `isCheckBoxOnParentNodes()` Returns true if checkboxes are to be shown on parent nodes or not.
`boolean` | `isCheckBoxOnRootNode()`
`boolean` | `isCheckBoxShouldCheckChildren()`
`boolean` | `isCheckBoxShouldCheckParents()`
`boolean` | `isCheckBoxVisibleForPath(javax.swing.tree.TreePath path)` Returns true if the given path has a checkbox, false otherwise.
`boolean` | `isCheckBoxVisibleForRow(int row)` Returns true if the given row has a checkbox, false otherwise.
`boolean` | `isIconVisibleForPath(javax.swing.tree.TreePath path)` Returns true if the selection icon is visible for the given path, the icon can be used to select or deselect all the children checkboxes for the given row.
`boolean` | `isIconVisibleForRow(int row)` Returns true if the selection icon is visible for the given row, the icon can be used to select or deselect all the children checkboxes for the given row.
`boolean` | `isShowSelectionIcon()`
`void` | `propertyChange(java.beans.PropertyChangeEvent e)`
`void` | `setAllChildrenSelectedIcon(javax.swing.Icon newIcon)` Sets the icon that gets used with the `ALL_CHILDREN_SELECTED` checked state.
`void` | `setChangeCursorWhenBusy(boolean shouldChangeCursor)` Sets whether the busy cursor will show when the tree is taking more then the set delay for a cursor change.
`void` | `setCheckBoxOnLeafNodes(boolean checksOnLeaves)` Sets whether the leaf nodes should contain checkboxes or not, default is true.
`void` | `setCheckBoxOnParentNodes(boolean checksOnParents)` Sets whether the parent nodes should contain checkboxes or not, default is true.
`void` | `setCheckBoxOnRootNode(boolean checkBoxOnRootNode)`
`void` | `setCheckBoxShouldCheckChildren(boolean checkBoxShouldCheckChildren)`
`void` | `setCheckBoxShouldCheckParents(boolean checkBoxShouldCheckParents)`
`void` | `setCheckedModel(javax.swing.tree.TreeSelectionModel newModel)` Sets the new model that is used for storing the checked state of each node.
`void` | `setDelayForCursorChange(int delayToChangeCursor)` Sets the time in milliseconds for a cursor change to take place.
`void` | `setModel(javax.swing.tree.TreeModel newModel)` Sets the TreeModel that will provide the data.
`void` | `setNodeAndAllChildrenSelectedIcon(javax.swing.Icon newIcon)` Sets the icon that gets used with the `NODE_ALL_CHILDREN_SELECTED` checked state.
`void` | `setNodeAndSomeChildrenSelectedIcon(javax.swing.Icon newIcon)` Sets the icon that gets used with the `NODE_SOME_CHILDREN_SELECTED` checked state.
`void` | `setNodeSelectedIcon(javax.swing.Icon newIcon)` Sets the icon that gets used with the `NODE_SELECTED` and `NODE_NO_CHILDREN_SELECTED` checked state.
`void` | `setNoneSelectedIcon(javax.swing.Icon newIcon)` Sets the icon that gets used with the `NOTHING_SELECTED` checked state.
`void` | `setRootVisible(boolean visible)` Determines whether or not the root node from the TreeModel is visible.
`void` | `setShowSelectionIcon(boolean showSelectionIcon)`
`void` | `setSomeChildrenSelectedIcon(javax.swing.Icon newIcon)` Sets the icon that gets used with the `SOME_CHILDREN_SELECTED` checked state.
`void` | `setWrapperCellRenderer(javax.swing.tree.TreeCellRenderer newRenderer)` Method setWrapperCellRenderer.
`void` | `treeCollapsed(javax.swing.event.TreeExpansionEvent event)` Invoked when the tree fires a TreeExpansionEvent to the treeCollapsed method.
`void` | `treeExpanded(javax.swing.event.TreeExpansionEvent event)` Invoked when the tree fires a TreeExpansionEvent to the treeExpanded method.
`void` | `treeNodesChanged(javax.swing.event.TreeModelEvent e)` Invoked when this tree's TreeModel fires a TreeModelEvent to the treeNodesChanged method.
`void` | `treeNodesInserted(javax.swing.event.TreeModelEvent e)` Invoked when this tree's TreeModel fires a TreeModelEvent to the treeNodesInserted method.
`void` | `treeNodesRemoved(javax.swing.event.TreeModelEvent e)` Invoked when this tree's TreeModel fires a TreeModelEvent to the treeNodesRemoved method.
`void` | `treeStructureChanged(javax.swing.event.TreeModelEvent e)` Invoked when this tree's TreeModel fires a TreeModelEvent to the treeStructureChanged method.
`void` | `treeWillCollapse(javax.swing.event.TreeExpansionEvent event)` Invoked when the tree fires a TreeExpansionEvent to the treeWillCollapse method.
`void` | `treeWillExpand(javax.swing.event.TreeExpansionEvent event)` Invoked when the tree fires a TreeExpansionEventt to the treeWillExpand method.
`void` | `updateUI()` Notification from the UIManager that the L&F has changed.
`void` | `valueChanged(javax.swing.event.TreeSelectionEvent event)` Messaged when the selection changes in the tree we're displaying for.

Field Detail

### checkBox

    protected javax.swing.JCheckBox checkBox

### checkRenderer

    protected CheckBoxTreeCellRendererWrapper checkRenderer

### checkedTreeModel

    protected javax.swing.tree.TreeSelectionModel checkedTreeModel

### checkBoxOnLeafNodes

    protected boolean checkBoxOnLeafNodes

### checkBoxOnParentNodes

    protected boolean checkBoxOnParentNodes

### checkBoxOnRootNode

    protected boolean checkBoxOnRootNode

### showSelectionIcon

    protected boolean showSelectionIcon

### checkBoxShouldCheckChildren

    protected boolean checkBoxShouldCheckChildren

### checkBoxShouldCheckParents

    protected boolean checkBoxShouldCheckParents

### NOTHING_SELECTED

    public static final int NOTHING_SELECTED

See Also:
  Constant Field Values

### NODE_SELECTED

    public static final int NODE_SELECTED

See Also:
  Constant Field Values

### NODE_SOME_CHILDREN_SELECTED

    public static final int NODE_SOME_CHILDREN_SELECTED

See Also:
  Constant Field Values

### NODE_ALL_CHILDREN_SELECTED

    public static final int NODE_ALL_CHILDREN_SELECTED

See Also:
  Constant Field Values

### NODE_NO_CHILDREN_SELECTED

    public static final int NODE_NO_CHILDREN_SELECTED

See Also:
  Constant Field Values

### SOME_CHILDREN_SELECTED

    public static final int SOME_CHILDREN_SELECTED

See Also:
  Constant Field Values

### ALL_CHILDREN_SELECTED

    public static final int ALL_CHILDREN_SELECTED

See Also:
  Constant Field Values

### NO_CHECKBOX

    public static final int NO_CHECKBOX

See Also:
  Constant Field Values

### PREORDER

    public static final int PREORDER

See Also:
  Constant Field Values

### POSTORDER

    public static final int POSTORDER

See Also:
  Constant Field Values

Constructor Detail

### CheckBoxTree

    public CheckBoxTree()

  Default constructor, trre model will be the default tree model and both parent and leaf nodes will have checkboxes.

### CheckBoxTree

    public CheckBoxTree(javax.swing.tree.TreeModel model)

  Creates a CheckBoxTree and will use the given tree model as the model. Both the parent and leafs nodes will have checkboxes.

  Parameters:
    `model` - the TreeModel to use as the data model

Method Detail

### isChangeCursorWhenBusy

    public boolean isChangeCursorWhenBusy()

  Returns true if the busy cursor will show when the tree is taking more then the set delay for a cursor change. The cursor could change when a checkbox is checked or when the icon is selected.

  Returns:
    true if a busy cursor is to be used, false otherwise
  See Also:
    `setChangeCursorWhenBusy(boolean)`

### setChangeCursorWhenBusy

    public void setChangeCursorWhenBusy(boolean shouldChangeCursor)

  Sets whether the busy cursor will show when the tree is taking more then the set delay for a cursor change. The cursor could change when a checkbox is checked or when the icon is selected. Default is true.

  Parameters:
    `shouldChangeCursor` - true if a busy cursor is to be used, false otherwise
  See Also:
    `isChangeCursorWhenBusy()`

### getDelayForCursorChange

    public int getDelayForCursorChange()

  Returns the delay in milliseconds for the cursor change to take. The default is 250.

  Returns:
    the time in milliseconds for a cursor change to take place
  See Also:
    `setDelayForCursorChange(int)`

### setDelayForCursorChange

    public void setDelayForCursorChange(int delayToChangeCursor)

  Sets the time in milliseconds for a cursor change to take place.

  Parameters:
    `delayToChangeCursor` - the new time in milliseconds for a cursor change to take place
  See Also:
    `getDelayForCursorChange()`

### isCheckBoxOnLeafNodes

    public boolean isCheckBoxOnLeafNodes()

  Returns true if checkboxes are to be shown on leaf nodes or not. Default is true.

  Returns:
    true if checkboxes are to be shown on leaf nodes, false otherwise
  See Also:
    `setCheckBoxOnLeafNodes(boolean)`

### setCheckBoxOnLeafNodes

    public void setCheckBoxOnLeafNodes(boolean checksOnLeaves)

  Sets whether the leaf nodes should contain checkboxes or not, default is true.

  Parameters:
    `checksOnLeaves` - true to have checkboxes on leaf nodes, false otherwise
  See Also:
    `isCheckBoxOnLeafNodes()`

### isCheckBoxOnParentNodes

    public boolean isCheckBoxOnParentNodes()

  Returns true if checkboxes are to be shown on parent nodes or not. Default is true.

  Returns:
    true if checkboxes are to be shown on parent nodes, false otherwise
  See Also:
    `setCheckBoxOnParentNodes(boolean)`

### setCheckBoxOnParentNodes

    public void setCheckBoxOnParentNodes(boolean checksOnParents)

  Sets whether the parent nodes should contain checkboxes or not, default is true.

  Parameters:
    `checksOnParents` - true to have checkboxes on parent nodes, false otherwise
  See Also:
    `isCheckBoxOnParentNodes()`

### createDefaultIcons

    public void createDefaultIcons()

  Creates the defaults icons to use for the various check states

  See Also:
    `setNoneSelectedIcon(Icon)`, `setAllChildrenSelectedIcon(Icon)`, `setNodeSelectedIcon(Icon)`, `setNodeAndAllChildrenSelectedIcon(Icon)`, `setNodeAndSomeChildrenSelectedIcon(Icon)`, `setSomeChildrenSelectedIcon(Icon)`

### setNoneSelectedIcon

    public void setNoneSelectedIcon(javax.swing.Icon newIcon)

  Sets the icon that gets used with the `NOTHING_SELECTED` checked state.

  Parameters:
    `newIcon` - the icon to set for the `NOTHING_SELECTED` state
  See Also:
    `getNoneSelectedIcon()`

### getNoneSelectedIcon

    public javax.swing.Icon getNoneSelectedIcon()

  Returns the icon that gets used for the `NOTHING_SELECTED` checked state.

  Returns:
    the icon that gets used when nothing is selected
  See Also:
    `setNoneSelectedIcon(Icon)`

### setAllChildrenSelectedIcon

    public void setAllChildrenSelectedIcon(javax.swing.Icon newIcon)

  Sets the icon that gets used with the `ALL_CHILDREN_SELECTED` checked state.

  Parameters:
    `newIcon` - the icon to set for the `ALL_CHILDREN_SELECTED` state
  See Also:
    `getAllChildrenSelectedIcon()`

### getAllChildrenSelectedIcon

    public javax.swing.Icon getAllChildrenSelectedIcon()

  Returns the icon that gets used for the `ALL_CHILDREN_SELECTED` checked state.

  Returns:
    the icon that gets used when all the children on a node are checked but not the node
  See Also:
    `setAllChildrenSelectedIcon(Icon)`

### setNodeSelectedIcon

    public void setNodeSelectedIcon(javax.swing.Icon newIcon)

  Sets the icon that gets used with the `NODE_SELECTED` and `NODE_NO_CHILDREN_SELECTED` checked state.

  Parameters:
    `newIcon` - the icon to set for the `NODE_SELECTED` and `NODE_NO_CHILDREN_SELECTED` state
  See Also:
    `getNodeSelectedIcon()`

### getNodeSelectedIcon

    public javax.swing.Icon getNodeSelectedIcon()

  Returns the icon that gets used for the `NODE_SELECTED` and `NODE_NO_CHILDREN_SELECTED` checked state.

  Returns:
    the icon that gets used when only the node is selected and none of its children
  See Also:
    `setNodeSelectedIcon(Icon)`

### setNodeAndAllChildrenSelectedIcon

    public void setNodeAndAllChildrenSelectedIcon(javax.swing.Icon newIcon)

  Sets the icon that gets used with the `NODE_ALL_CHILDREN_SELECTED` checked state.

  Parameters:
    `newIcon` - the icon to set for the `NODE_ALL_CHILDREN_SELECTED` state
  See Also:
    `getNodeAndAllChildrenSelectedIcon()`

### getNodeAndAllChildrenSelectedIcon

    public javax.swing.Icon getNodeAndAllChildrenSelectedIcon()

  Returns the icon that gets used for the `NODE_ALL_CHILDREN_SELECTED` checked state.

  Returns:
    the icon that gets used when node and all its children are checked
  See Also:
    `setNodeAndAllChildrenSelectedIcon(Icon)`

### setNodeAndSomeChildrenSelectedIcon

    public void setNodeAndSomeChildrenSelectedIcon(javax.swing.Icon newIcon)

  Sets the icon that gets used with the `NODE_SOME_CHILDREN_SELECTED` checked state.

  Parameters:
    `newIcon` - the icon to set for the `NODE_SOME_CHILDREN_SELECTED` state
  See Also:
    `getNodeAndSomeChildrenSelectedIcon()`

### getNodeAndSomeChildrenSelectedIcon

    public javax.swing.Icon getNodeAndSomeChildrenSelectedIcon()

  Returns the icon that gets used for the `NODE_SOME_CHILDREN_SELECTED` checked state.

  Returns:
    the icon that gets used when node and some of its children are checked
  See Also:
    `setNodeAndSomeChildrenSelectedIcon(Icon)`

### setSomeChildrenSelectedIcon

    public void setSomeChildrenSelectedIcon(javax.swing.Icon newIcon)

  Sets the icon that gets used with the `SOME_CHILDREN_SELECTED` checked state.

  Parameters:
    `newIcon` - the icon to set for the `SOME_CHILDREN_SELECTED` state
  See Also:
    `getSomeChildrenSelectedIcon()`

### getSomeChildrenSelectedIcon

    public javax.swing.Icon getSomeChildrenSelectedIcon()

  Returns the icon that gets used for the `SOME_CHILDREN_SELECTED` checked state.

  Returns:
    the icon that gets used when the node is not checked but some if its children are
  See Also:
    `setSomeChildrenSelectedIcon(Icon)`

### isCheckBoxVisibleForRow

    public boolean isCheckBoxVisibleForRow(int row)

  Returns true if the given row has a checkbox, false otherwise.

  Parameters:
    `row` - the row index in the tree
  Returns:
    true if the row in the tree has a checkbox, false otherwise.

### isCheckBoxVisibleForPath

    public boolean isCheckBoxVisibleForPath(javax.swing.tree.TreePath path)

  Returns true if the given path has a checkbox, false otherwise.

  Parameters:
    `path` - the path to the node that is in question of whther a checkbox is present or not
  Returns:
    true if the node specified by the path has a checkbox, false otherwise

### isIconVisibleForRow

    public boolean isIconVisibleForRow(int row)

  Returns true if the selection icon is visible for the given row, the icon can be used to select or deselect all the children checkboxes for the given row. A row may not have the icon as it may not have any children or have checkboxes turned off for leaf or parent nodes.

  Parameters:
    `row` - the row index in question
  Returns:
    true is the row has the selection icon present, false otherwise.

### isIconVisibleForPath

    public boolean isIconVisibleForPath(javax.swing.tree.TreePath path)

  Returns true if the selection icon is visible for the given path, the icon can be used to select or deselect all the children checkboxes for the given row. A path may not have the icon as it may not have any children or have checkboxes turned off for leaf or parent nodes.

  Parameters:
    `path` - the path to the node in question
  Returns:
    true is the path has the selection icon present, false otherwise.

### updateUI

    public void updateUI()

  Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.

  Overrides:
    `updateUI` in class `javax.swing.JTree`

### setModel

    public void setModel(javax.swing.tree.TreeModel newModel)

  Sets the TreeModel that will provide the data.

  Overrides:
    `setModel` in class `javax.swing.JTree`
  Parameters:
    `newModel` - the TreeModel that is to provide the data

### createDefaultCheckedModel

    public javax.swing.tree.TreeSelectionModel createDefaultCheckedModel()

  Creates the default TreeSelectionModel which stores the check state of each node in the tree.

  Returns:
    the default checked tree model

### getCheckedModel

    public javax.swing.tree.TreeSelectionModel getCheckedModel()

  Returns the model that is used for storing the checked state of each node in the tree. This is used by the CheckBoxTree to determine which nodes get their checkbox checked.

  Returns:
    the model used to store th echecked state of each node
  See Also:
    `setCheckedModel(TreeSelectionModel)`

### setCheckedModel

    public void setCheckedModel(javax.swing.tree.TreeSelectionModel newModel)

  Sets the new model that is used for storing the checked state of each node.

  Parameters:
    `newModel` - the new checked state model
  See Also:
    `getCheckedModel()`

### getCheckedObjects

    public java.lang.Object[] getCheckedObjects()

  Returns all the objects which are checked in the tree.

  Returns:
    an array of objects that are the checked nodes in the tree, the objects will be returned using the preorder algorithm.

### getCheckedObjects

    public java.lang.Object[] getCheckedObjects(int order)

  Returns all the objects which are checked in the tree using the given order.

  Parameters:
    `order` - needs to be either PREORDER or POSTORDER
  Returns:
    an array of Objects the contains all the checked nodes

### getCheckedState

    public int getCheckedState(javax.swing.tree.TreePath path)

  Returns the state of the checkbox and its icon for the given TreePath. The valid return values are:
  - NOTHING_SELECTED
  - NODE_SELECTED
  - NODE_SOME_CHILDREN_SELECTED
  - NODE_ALL_CHILDREN_SELECTED
  - NODE_NO_CHILDREN_SELECTED
  - SOME_CHILDREN_SELECTED
  - ALL_CHILDREN_SELECTED
  - NO_CHECKBOX

  Parameters:
    `path` - the TreePath the node in question
  Returns:
    an integer which maps to 1 of the 8 states a node could have

### getIconForCheckedState

    public javax.swing.Icon getIconForCheckedState(int state)

  Return the icon the gets used for the given state. The state has to be one of the following:
  - NOTHING_SELECTED
  - NODE_SELECTED
  - NODE_SOME_CHILDREN_SELECTED
  - NODE_ALL_CHILDREN_SELECTED
  - NODE_NO_CHILDREN_SELECTED
  - SOME_CHILDREN_SELECTED
  - ALL_CHILDREN_SELECTED
  - NO_CHECKBOX

  Parameters:
    `state` - the state of the node
  Returns:
    teh icon that gets used to represent the state of the node

### checkPath

    public void checkPath(javax.swing.tree.TreePath path,
                          boolean setChecked,
                          boolean makeVisible)

  This method is used to checks or uncheck the node represented by the given path. If the parameter `makeVisible` is set to true, the tree will expand to show the node and will scroll to show it in its view.

  Parameters:
    `path` - the path to the node to either check or uncheck
    `setChecked` - true to check the checkbox for the node, false otherwise
    `makeVisible` - true to ensure that the node identified by path is currently viewable, false otherwise

### checkChildren

    public void checkChildren(javax.swing.tree.TreePath path,
                              boolean setChecked,
                              boolean recursive)

  This method is used to check or uncheck the children nodes for the given node. If the parameter `recursive` is set to true, then the method will recurse through all nodes of the path, otherwise it will just affect the immediate children of the path.

  Parameters:
    `path` - the TreePath to the node whose children are affected
    `setChecked` - true to check the children nodes, false otherwise
    `recursive` - true to recurse through all children of the path, false to only affect the immediate children of the node

### checkParents

    public void checkParents(javax.swing.tree.TreePath path,
                             boolean setChecked,
                             boolean recursive)

  This method is used to check or uncheck the children nodes for the given node. If the parameter `recursive` is set to true, then the method will recurse through all nodes of the path, otherwise it will just affect the immediate children of the path.

  Parameters:
    `path` - the TreePath to the node whose children are affected
    `setChecked` - true to check the children nodes, false otherwise
    `recursive` - true to recurse through all children of the path, false to only affect the immediate children of the node

### getCheckedChildrenPaths

    public java.util.List getCheckedChildrenPaths(javax.swing.tree.TreePath path)

  Returns a `List` of all the TreePaths who have a selected checkbox and are a child of the given TreePath.

  Parameters:
    `path` - the path to the node whose child nodes are to be returned if they are checked
  Returns:
    a list of checked TreePaths who are also children of the given node

### setRootVisible

    public void setRootVisible(boolean visible)

  Determines whether or not the root node from the TreeModel is visible.

  Overrides:
    `setRootVisible` in class `javax.swing.JTree`
  Parameters:
    `visible` - true if the root node of the tree is to be displayed, false otherwise

### treeNodesChanged

    public void treeNodesChanged(javax.swing.event.TreeModelEvent e)

  Invoked when this tree's TreeModel fires a TreeModelEvent to the treeNodesChanged method. Application code will not use these methods explicitly, they are used internally by CheckBoxTree.

  Specified by:
    `treeNodesChanged` in interface `javax.swing.event.TreeModelListener`
  Parameters:
    `e` - the TreeModelEvent
  See Also:
    `TreeModelListener.treeNodesChanged(TreeModelEvent)`

### treeNodesInserted

    public void treeNodesInserted(javax.swing.event.TreeModelEvent e)

  Invoked when this tree's TreeModel fires a TreeModelEvent to the treeNodesInserted method. Application code will not use these methods explicitly, they are used internally by CheckBoxTree.

  Specified by:
    `treeNodesInserted` in interface `javax.swing.event.TreeModelListener`
  Parameters:
    `e` - the TreeModelEvent
  See Also:
    `TreeModelListener.treeNodesInserted(TreeModelEvent)`

### treeNodesRemoved

    public void treeNodesRemoved(javax.swing.event.TreeModelEvent e)

  Invoked when this tree's TreeModel fires a TreeModelEvent to the treeNodesRemoved method. Application code will not use these methods explicitly, they are used internally by CheckBoxTree.

  Specified by:
    `treeNodesRemoved` in interface `javax.swing.event.TreeModelListener`
  Parameters:
    `e` - the TreeModelEvent
  See Also:
    `TreeModelListener.treeNodesRemoved(TreeModelEvent)`

### treeStructureChanged

    public void treeStructureChanged(javax.swing.event.TreeModelEvent e)

  Invoked when this tree's TreeModel fires a TreeModelEvent to the treeStructureChanged method. Application code will not use these methods explicitly, they are used internally by CheckBoxTree.

  Specified by:
    `treeStructureChanged` in interface `javax.swing.event.TreeModelListener`
  Parameters:
    `e` - the TreeModelEvent
  See Also:
    `TreeModelListener.treeStructureChanged(TreeModelEvent)`

### treeCollapsed

    public void treeCollapsed(javax.swing.event.TreeExpansionEvent event)

  Invoked when the tree fires a TreeExpansionEvent to the treeCollapsed method. Application code will not use these methods explicitly, they are used internally by CheckBoxTree.

  Specified by:
    `treeCollapsed` in interface `javax.swing.event.TreeExpansionListener`
  Parameters:
    `event` - TreeExpansionEvent
  See Also:
    `TreeExpansionListener.treeCollapsed(TreeExpansionEvent)`

### treeExpanded

    public void treeExpanded(javax.swing.event.TreeExpansionEvent event)

  Invoked when the tree fires a TreeExpansionEvent to the treeExpanded method. Application code will not use these methods explicitly, they are used internally by CheckBoxTree.

  Specified by:
    `treeExpanded` in interface `javax.swing.event.TreeExpansionListener`
  Parameters:
    `event` - TreeExpansionEvent
  See Also:
    `TreeExpansionListener.treeExpanded(TreeExpansionEvent)`

### treeWillCollapse

    public void treeWillCollapse(javax.swing.event.TreeExpansionEvent event)

  Invoked when the tree fires a TreeExpansionEvent to the treeWillCollapse method. Application code will not use these methods explicitly, they are used internally by CheckBoxTree.

  Specified by:
    `treeWillCollapse` in interface `javax.swing.event.TreeWillExpandListener`
  Parameters:
    `event` - TreeExpansionEvent
  See Also:
    `TreeWillExpandListener.treeWillCollapse(TreeExpansionEvent)`

### treeWillExpand

    public void treeWillExpand(javax.swing.event.TreeExpansionEvent event)

  Invoked when the tree fires a TreeExpansionEventt to the treeWillExpand method. Application code will not use these methods explicitly, they are used internally by CheckBoxTree.

  Specified by:
    `treeWillExpand` in interface `javax.swing.event.TreeWillExpandListener`
  Parameters:
    `event` - TreeExpansionEvent
  See Also:
    `TreeWillExpandListener.treeWillExpand(TreeExpansionEvent)`

### propertyChange

    public void propertyChange(java.beans.PropertyChangeEvent e)

  Specified by:
    `propertyChange` in interface `java.beans.PropertyChangeListener`
  Parameters:
    `e` -
  See Also:
    `PropertyChangeListener.propertyChange(PropertyChangeEvent)`

### valueChanged

    public void valueChanged(javax.swing.event.TreeSelectionEvent event)

  Messaged when the selection changes in the tree we're displaying for. Stops editing, messages super and displays the changed paths.

  Specified by:
    `valueChanged` in interface `javax.swing.event.TreeSelectionListener`
  Parameters:
    `event` - TreeSelectionEvent
  See Also:
    `TreeSelectionListener.valueChanged(TreeSelectionEvent)`

### setWrapperCellRenderer

    public void setWrapperCellRenderer(javax.swing.tree.TreeCellRenderer newRenderer)

  Method setWrapperCellRenderer.

  Parameters:
    `newRenderer` - TreeCellRenderer

### isShowSelectionIcon

    public boolean isShowSelectionIcon()

  Returns:
    Returns the showSelectionIcon.

### setShowSelectionIcon

    public void setShowSelectionIcon(boolean showSelectionIcon)

  Parameters:
    `showSelectionIcon` - The showSelectionIcon to set.

### isCheckBoxOnRootNode

    public boolean isCheckBoxOnRootNode()

  Returns:
    Returns the checkBoxOnRootNode.

### setCheckBoxOnRootNode

    public void setCheckBoxOnRootNode(boolean checkBoxOnRootNode)

  Parameters:
    `checkBoxOnRootNode` - The checkBoxOnRootNode to set.

### isCheckBoxShouldCheckChildren

    public boolean isCheckBoxShouldCheckChildren()

  Returns:
    Returns the checkBoxShouldCheckChildren.

### setCheckBoxShouldCheckChildren

    public void setCheckBoxShouldCheckChildren(boolean checkBoxShouldCheckChildren)

  Parameters:
    `checkBoxShouldCheckChildren` - The checkBoxShouldCheckChildren to set.

### isCheckBoxShouldCheckParents

    public boolean isCheckBoxShouldCheckParents()

  Returns:
    Returns the checkBoxShouldCheckParents.

### setCheckBoxShouldCheckParents

    public void setCheckBoxShouldCheckParents(boolean checkBoxShouldCheckParents)

  Parameters:
    `checkBoxShouldCheckParents` - The checkBoxShouldCheckParents to set.

*** This class is subject to change. ***

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.