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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addChangeListener, dispose, getChangeReason, getDependents, getName, isDisposed, isEnabled, isInitialized, removeChangeListener, setName
public SimpleState()
public SimpleState(boolean pIsEnabled)
pIsEnabled
- true if our state should be enabledpublic void setEnabled(boolean pEnabled)
setEnabled
in interface MutableState
pEnabled
- true if the state gets enabledpublic void setEnabled(boolean pEnabled, Object pReason)
setEnabled
in interface MutableState
pEnabled
- true if the state gets enabledpReason
- null or reason for the changeprotected boolean inSetEnabled()
public void reset()
reset
in interface MutableState
Copyright © 2017 Jürgen Zeller (privat). All rights reserved.