public class SwingTableModelFillState extends AbstractSwingState implements State, TableModelListener
mSilent
mIsEnabled, mIsInitialized, mListenerList, mName, mReason
Constructor and Description |
---|
SwingTableModelFillState(JTable pTable)
Creates a new state, using the model of the handed table as its state source.
|
SwingTableModelFillState(JTable pTable,
int pThreshold)
Creates a new state, using the model of the handed list as its state source.
|
SwingTableModelFillState(TableModel pModel,
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 table model contains at least our threshold number of rows.
|
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 |
tableChanged(TableModelEvent pEvent)
Callback method for our table model.
|
checkStateChange, isSilent, setSilent
addChangeListener, checkDisposed, dispose, fireStateChanged, getChangeReason, getDependents, getName, isDisposed, isEnabled, isInitialized, removeChangeListener, setName, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addChangeListener, dispose, getChangeReason, getDependents, getName, isDisposed, isEnabled, isInitialized, removeChangeListener, setName
public SwingTableModelFillState(JTable pTable)
pTable
- table we take the model from, must not be nullpublic SwingTableModelFillState(JTable pTable, int pThreshold)
pTable
- table we take the model from, must not be nullpThreshold
- threshold of rows in the tablepublic SwingTableModelFillState(TableModel pModel, int pThreshold)
pThreshold
- threshold of rows in the tablepModel
- the model we monitor, must not be nullpublic void setCompareContent(int pThreshold)
pThreshold
- threshold of rows in the tablepublic void tableChanged(TableModelEvent pEvent)
tableChanged
in interface TableModelListener
pEvent
- not usedprotected boolean getInternalState()
getInternalState
in class AbstractSwingState
protected void setReason()
setReason
in class AbstractSwingState
Copyright © 2017 Jürgen Zeller (privat). All rights reserved.