com.fullspan.pwkeep.gui
Class PwkTreeSelectionModel

java.lang.Object
  extended by javax.swing.tree.DefaultTreeSelectionModel
      extended by com.fullspan.pwkeep.gui.PwkTreeSelectionModel
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.TreeSelectionModel

public class PwkTreeSelectionModel
extends javax.swing.tree.DefaultTreeSelectionModel

The PWKeep tree selection model only allows the selection of exactly one tree node at any time - selecting zero nodes or more than one node is not allowed.

Version:
$Revision: 1.3 $, $Date: 2004/01/18 07:21:04 $
Author:
Mitch Stuart, $Author: mitch $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultTreeSelectionModel
changeSupport, leadIndex, leadPath, leadRow, listenerList, listSelectionModel, rowMapper, selection, SELECTION_MODE_PROPERTY, selectionMode
 
Fields inherited from interface javax.swing.tree.TreeSelectionModel
CONTIGUOUS_TREE_SELECTION, DISCONTIGUOUS_TREE_SELECTION, SINGLE_TREE_SELECTION
 
Constructor Summary
PwkTreeSelectionModel()
           
 
Method Summary
 void addSelectionPath(javax.swing.tree.TreePath path)
          This tree model does not allow more than one node to be in the selection, so this method calls setSelectionPath.
 void addSelectionPaths(javax.swing.tree.TreePath[] paths)
          This tree model does not allow more than one node to be in the selection, so this method calls setSelectionPaths.
 void removeSelectionPath(javax.swing.tree.TreePath path)
          This tree model does not allow an empty selection, so calls to this method do nothing.
 void removeSelectionPaths(javax.swing.tree.TreePath[] paths)
          This tree model does not allow an empty selection, so calls to this method do nothing.
 
Methods inherited from class javax.swing.tree.DefaultTreeSelectionModel
addPropertyChangeListener, addTreeSelectionListener, arePathsContiguous, canPathsBeAdded, canPathsBeRemoved, clearSelection, clone, fireValueChanged, getLeadSelectionPath, getLeadSelectionRow, getListeners, getMaxSelectionRow, getMinSelectionRow, getPropertyChangeListeners, getRowMapper, getSelectionCount, getSelectionMode, getSelectionPath, getSelectionPaths, getSelectionRows, getTreeSelectionListeners, insureRowContinuity, insureUniqueness, isPathSelected, isRowSelected, isSelectionEmpty, notifyPathChange, removePropertyChangeListener, removeTreeSelectionListener, resetRowSelection, setRowMapper, setSelectionMode, setSelectionPath, setSelectionPaths, toString, updateLeadIndex
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PwkTreeSelectionModel

public PwkTreeSelectionModel()
Method Detail

addSelectionPath

public void addSelectionPath(javax.swing.tree.TreePath path)
This tree model does not allow more than one node to be in the selection, so this method calls setSelectionPath.

Specified by:
addSelectionPath in interface javax.swing.tree.TreeSelectionModel
Overrides:
addSelectionPath in class javax.swing.tree.DefaultTreeSelectionModel

addSelectionPaths

public void addSelectionPaths(javax.swing.tree.TreePath[] paths)
This tree model does not allow more than one node to be in the selection, so this method calls setSelectionPaths.

Specified by:
addSelectionPaths in interface javax.swing.tree.TreeSelectionModel
Overrides:
addSelectionPaths in class javax.swing.tree.DefaultTreeSelectionModel

removeSelectionPath

public void removeSelectionPath(javax.swing.tree.TreePath path)
This tree model does not allow an empty selection, so calls to this method do nothing.

Specified by:
removeSelectionPath in interface javax.swing.tree.TreeSelectionModel
Overrides:
removeSelectionPath in class javax.swing.tree.DefaultTreeSelectionModel

removeSelectionPaths

public void removeSelectionPaths(javax.swing.tree.TreePath[] paths)
This tree model does not allow an empty selection, so calls to this method do nothing.

Specified by:
removeSelectionPaths in interface javax.swing.tree.TreeSelectionModel
Overrides:
removeSelectionPaths in class javax.swing.tree.DefaultTreeSelectionModel