|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StateOriginator
This interface has to be implemented by the components which will exchange
its state with the StateKeeper
Method Summary | |
---|---|
State |
getState()
Will be called by the StateKeeper in the process of the
application state saving. |
void |
setState(State state)
Will be called by the StateKeepr when it reads
State object which belongs to this component. |
Method Detail |
---|
State getState()
StateKeeper
in the process of the
application state saving. The component which implements this interface
will tipycally use StateFactory
to create a
State
object and fill it with needed values. For example a
component can use this snippet.
public State getState() {
State s = StateFactory.createState();
s.putDouble("Min", getMinimum());
s.putDouble("Max", getMaximum());
s.putString("Format", getFormat());
s.putString("Units", getUnits());
return s;
}
void setState(State state)
StateKeepr
when it reads
State
object which belongs to this component.
state
- object previously created by this component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |