public class SwingTreeSelectionState extends AbstractSwingState implements TreeSelectionListener
mSilentmIsEnabled, mIsInitialized, mListenerList, mName, mReason| Constructor and Description | 
|---|
SwingTreeSelectionState(JTree pTree)
Creates a new state, using the selection model of the handed tree
 as its state source. 
 | 
SwingTreeSelectionState(JTree pTree,
                       TreePath pTreePath)
Creates a new state, using the selection model of the handed tree
 as its state source. 
 | 
SwingTreeSelectionState(TreeSelectionModel pSelectionModel,
                       TreePath pTreePath)
Creates a new state, using the handed selection model as its state source. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected boolean | 
getInternalState()
Check if mListIndex is selected, if mListIndex is NO_SELECTION, check if there is no selection. 
 | 
void | 
setCompareContent(TreePath pTreePath)
Sets the TreePath we try to find in the tree selection. 
 | 
protected void | 
setReason()
Set the source of the state as the reason for a change. 
 | 
void | 
valueChanged(TreeSelectionEvent pEvent)
Called whenever the value of the selection changes. 
 | 
checkStateChange, isSilent, setSilentaddChangeListener, checkDisposed, dispose, fireStateChanged, getChangeReason, getDependents, getName, isDisposed, isEnabled, isInitialized, removeChangeListener, setName, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddChangeListener, dispose, getChangeReason, getDependents, getName, isDisposed, isEnabled, isInitialized, removeChangeListener, setNamepublic SwingTreeSelectionState(JTree pTree)
pTree - tree we take the selection model from, must not be nullpublic SwingTreeSelectionState(JTree pTree, TreePath pTreePath)
pTree - tree we take the selection model from, must not be nullpTreePath - user-provided TreePath we check the selection against, may be nullpublic SwingTreeSelectionState(TreeSelectionModel pSelectionModel, TreePath pTreePath)
pSelectionModel - the selection we monitor, must not be nullpTreePath - user-provided TreePath we check the selection against, may be nullpublic void setCompareContent(TreePath pTreePath)
pTreePath - user-provided TreePath we check the selection againstpublic void valueChanged(TreeSelectionEvent pEvent)
valueChanged in interface TreeSelectionListenerpEvent - the event that characterizes the change.protected boolean getInternalState()
getInternalState in class AbstractSwingStateprotected void setReason()
setReason in class AbstractSwingStateCopyright © 2017 Jürgen Zeller (privat). All rights reserved.