public class SwingTreeModelFillState extends AbstractSwingState implements State, TreeModelListener
mSilentmIsEnabled, mIsInitialized, mListenerList, mName, mReason| Constructor and Description | 
|---|
SwingTreeModelFillState(JTree pTree)
Creates a new state, using the model of the handed tree as its state source. 
 | 
SwingTreeModelFillState(JTree pTree,
                       boolean pCountRootAsContent)
Creates a new state, using the model of the handed tree as its state source. 
 | 
SwingTreeModelFillState(TreeModel pModel,
                       boolean pCountRootAsContent,
                       int pThreshold)
Creates a new state, using the handed model as its state source. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected boolean | 
getInternalState()
Check if our model contains at least our threshold number of items. 
 | 
void | 
setCompareContent(int pThreshold)
Sets the threshold we compare again. 
 | 
protected void | 
setReason()
Set the source of the state as the reason for a change. 
 | 
void | 
treeNodesChanged(TreeModelEvent pEvent)
Callback method for our tree model. 
 | 
void | 
treeNodesInserted(TreeModelEvent pEvent)
Callback method for our tree model. 
 | 
void | 
treeNodesRemoved(TreeModelEvent pEvent)
Callback method for our tree model. 
 | 
void | 
treeStructureChanged(TreeModelEvent pEvent)
Callback method for our tree model. 
 | 
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 SwingTreeModelFillState(JTree pTree)
pTree - tree we take the model from, must not be nullpublic SwingTreeModelFillState(JTree pTree, boolean pCountRootAsContent)
pTree - tree we take the model from, must not be nullpCountRootAsContent - indicates whether the root-node is counted as
  content or notpublic SwingTreeModelFillState(TreeModel pModel, boolean pCountRootAsContent, int pThreshold)
pModel - the model we monitor, must not be nullpCountRootAsContent - indicates whether the root-node is counted as
  content or notpThreshold - threshold of items in the treepublic void setCompareContent(int pThreshold)
pThreshold - threshold of items in the treepublic void treeNodesChanged(TreeModelEvent pEvent)
treeNodesChanged in interface TreeModelListenerpEvent - not usedpublic void treeNodesInserted(TreeModelEvent pEvent)
treeNodesInserted in interface TreeModelListenerpEvent - not usedpublic void treeNodesRemoved(TreeModelEvent pEvent)
treeNodesRemoved in interface TreeModelListenerpEvent - not usedpublic void treeStructureChanged(TreeModelEvent pEvent)
treeStructureChanged in interface TreeModelListenerpEvent - not usedprotected boolean getInternalState()
getInternalState in class AbstractSwingStateprotected void setReason()
setReason in class AbstractSwingStateCopyright © 2017 Jürgen Zeller (privat). All rights reserved.