public class SimpleState extends AbstractState implements MutableState
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
mInSetEnabled
Marker if we are in setEnabled().
|
mIsEnabled, mIsInitialized, mListenerList, mName, mReason| Constructor and Description |
|---|
SimpleState()
The default constructor creates an uninitialized state,
which is not enabled.
|
SimpleState(boolean pIsEnabled)
Creates an initialized state.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
inSetEnabled()
Marker method that indicates if the object is just firing a state change
due to a call of setEnabled().
|
void |
reset()
Resets a MutableState to not initilized.
|
void |
setEnabled(boolean pEnabled)
Sets the state.
|
void |
setEnabled(boolean pEnabled,
Object pReason)
Sets the state with a reason object.
|
addChangeListener, 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 SimpleState()
public SimpleState(boolean pIsEnabled)
pIsEnabled - true if our state should be enabledpublic void setEnabled(boolean pEnabled)
setEnabled in interface MutableStatepEnabled - true if the state gets enabledpublic void setEnabled(boolean pEnabled,
Object pReason)
setEnabled in interface MutableStatepEnabled - true if the state gets enabledpReason - null or reason for the changeprotected boolean inSetEnabled()
public void reset()
reset in interface MutableStateCopyright © 2017 Jürgen Zeller (privat). All rights reserved.