com.alee.extended.tree
Interface TreeCheckingModel<E extends javax.swing.tree.DefaultMutableTreeNode>

All Known Implementing Classes:
DefaultTreeCheckingModel

public interface TreeCheckingModel<E extends javax.swing.tree.DefaultMutableTreeNode>

Special checking model for WebCheckBoxTree.

Author:
Mikle Garin

Method Summary
 void addCheckStateChangeListener(CheckStateChangeListener listener)
          Adds check state change listener.
 void checkAll()
          Checks all tree nodes.
 void checkingModeChanged(boolean recursive)
          Notifies model about checking mode change.
 java.util.List<E> getCheckedNodes(boolean optimize)
          Returns list of checked nodes.
 CheckState getCheckState(E node)
          Returns specified tree node check state.
 java.util.List<E> getMixedNodes()
          Returns list of nodes in mixed state.
 void invertCheck(java.util.Collection<E> nodes)
          Inverts tree nodes check.
 void invertCheck(E node)
          Inverts tree node check.
 void removeCheckStateChangeListener(CheckStateChangeListener listener)
          Removes check state change listener.
 void setChecked(java.util.Collection<E> nodes, boolean checked)
          Sets specified nodes state to checked.
 void setChecked(E node, boolean checked)
          Sets whether the specified tree node is checked or not.
 void uncheckAll()
          Unchecks all tree nodes.
 

Method Detail

getCheckedNodes

java.util.List<E> getCheckedNodes(boolean optimize)
Returns list of checked nodes.

Parameters:
optimize - whether should optimize the resulting list by removing checked node childs or not
Returns:
list of checked nodes

getMixedNodes

java.util.List<E> getMixedNodes()
Returns list of nodes in mixed state.

Returns:
list of nodes in mixed state

setChecked

void setChecked(java.util.Collection<E> nodes,
                boolean checked)
Sets specified nodes state to checked.

Parameters:
nodes - nodes to check
checked - whether the specified tree nodes should be checked or not

getCheckState

CheckState getCheckState(E node)
Returns specified tree node check state.

Parameters:
node - tree node to process
Returns:
specified tree node check state

setChecked

void setChecked(E node,
                boolean checked)
Sets whether the specified tree node is checked or not.

Parameters:
node - tree node to process
checked - whether the specified tree node should be checked or not

invertCheck

void invertCheck(E node)
Inverts tree node check.

Parameters:
node - tree node to process

invertCheck

void invertCheck(java.util.Collection<E> nodes)
Inverts tree nodes check.

Parameters:
nodes - list of tree nodes to process

uncheckAll

void uncheckAll()
Unchecks all tree nodes.


checkAll

void checkAll()
Checks all tree nodes.


checkingModeChanged

void checkingModeChanged(boolean recursive)
Notifies model about checking mode change.

Parameters:
recursive - whether checked or unchecked node childs should be checked or unchecked recursively or not

addCheckStateChangeListener

void addCheckStateChangeListener(CheckStateChangeListener listener)
Adds check state change listener.

Parameters:
listener - check state change listener to add

removeCheckStateChangeListener

void removeCheckStateChangeListener(CheckStateChangeListener listener)
Removes check state change listener.

Parameters:
listener - check state change listener to remove