public class SwingListModelFillState extends AbstractSwingState implements State, ListDataListener
mSilentmIsEnabled, mIsInitialized, mListenerList, mName, mReason| Constructor and Description |
|---|
SwingListModelFillState(JList pList)
Creates a new state, using the model of the handed list as its state source.
|
SwingListModelFillState(JList pList,
int pThreshold)
Creates a new state, using the model of the handed list as its state source.
|
SwingListModelFillState(ListModel pModel,
int pThreshold)
Creates a new state, using the handed model as its state source.
|
| Modifier and Type | Method and Description |
|---|---|
void |
contentsChanged(ListDataEvent pEvent)
Callback method for our list model.
|
protected boolean |
getInternalState()
Check if our model contains at least our threshold number of items.
|
void |
intervalAdded(ListDataEvent pEvent)
Callback method for our list model.
|
void |
intervalRemoved(ListDataEvent pEvent)
Callback method for our list model.
|
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.
|
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 SwingListModelFillState(JList pList)
pList - list we take the model from, must not be nullpublic SwingListModelFillState(JList pList, int pThreshold)
pList - list we take the model from, must not be nullpThreshold - threshold of items in the listpublic SwingListModelFillState(ListModel pModel, int pThreshold)
pThreshold - threshold of items in the listpModel - the model we monitor, must not be nullpublic void setCompareContent(int pThreshold)
pThreshold - threshold of items in the listpublic void contentsChanged(ListDataEvent pEvent)
contentsChanged in interface ListDataListenerpEvent - not usedpublic void intervalAdded(ListDataEvent pEvent)
intervalAdded in interface ListDataListenerpEvent - not usedpublic void intervalRemoved(ListDataEvent pEvent)
intervalRemoved in interface ListDataListenerpEvent - not usedprotected boolean getInternalState()
getInternalState in class AbstractSwingStateprotected void setReason()
setReason in class AbstractSwingStateCopyright © 2017 Jürgen Zeller (privat). All rights reserved.