|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.states.AbstractState
A abstract uncomplete implementation of State
which support listeners and adds a fireStateChanged() method
to notify them.
| Constructor Summary | |
AbstractState()
Creates a new AbstractState. |
|
AbstractState(java.lang.String name)
Creates a new AbstractState. |
|
| Method Summary | |
void |
addStateListener(StateListener listener)
Registers the given StateListenerto listen to state changes of this
State. |
protected void |
appendParametersToString(java.lang.StringBuffer str)
Overwrite this method to display additional parameters in the toString() representation of this State. |
void |
dispose()
Disposes the component. |
protected void |
fireStateChanged()
Fires a state change to all registered listeners. |
java.lang.String |
getName()
Return the name of this State. |
void |
removeStateListener(StateListener listener)
Unregisters the given StateListenerfrom this State. |
void |
setName(java.lang.String name)
Set the name of the state. |
java.lang.String |
stateValueToString()
Converts the current state value to a string representation and returns it. |
java.lang.String |
toString()
|
java.lang.String |
toString(boolean display_listeners)
Returns a string representation of this State. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.sdm.quasar.client.core.states.State |
getValue |
| Constructor Detail |
public AbstractState()
AbstractState.
public AbstractState(java.lang.String name)
AbstractState.
name - the name of this State (not null)| Method Detail |
public void dispose()
throws DisposeException
Disposable
Important:
This method is called by an administrating component
and must never be called directly.
The implementation should release any resources or objects allocated and
any services registered. Furthermore, this method should be developed
carefully to free a maximum of resources even when the system may
have become unstable. In case of one or multiple errors, you should collect
them in a DisposeException, continue with the execution,
and throw it at the end of the method.
Note: The implementation must not return before the component is disposed. Any threads or asynchronous calls started must be completed before this method returns.
dispose in interface DisposableDisposeException - if there was one or more errors while
disposing the component.Disposable.dispose()public java.lang.String getName()
StateState.
getName in interface StateState (never null)State.getName()public void setName(java.lang.String name)
State
setName in interface Statename - the name of the state (must not be null)State.setName(java.lang.String)protected void fireStateChanged()
Note: It is guaranteed, that the listeners are called back in the event dispatch thread. If the caller calls this method outside the EDT, it switches to the EDT, calls the listeners, switches back to the original thread and returns.
public void addStateListener(StateListener listener)
StateStateListenerto listen to state changes of this
State.
addStateListener in interface Statelistener - the StateListenerto addpublic void removeStateListener(StateListener listener)
StateStateListenerfrom this State.
removeStateListener in interface Statelistener - the StateListenerto removepublic java.lang.String toString()
public java.lang.String stateValueToString()
public java.lang.String toString(boolean display_listeners)
State.
display_listeners - if true, the registered
listeners will be displayedprotected void appendParametersToString(java.lang.StringBuffer str)
toString() representation of this State.
str - the StringBuffer to append the string representation to
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||