|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.states.AbstractBooleanStateAdapter
An abstract BooleanStateAdapter implementation, which supports more
than one target object to adapt.
| Constructor Summary | |
AbstractBooleanStateAdapter()
Creates a new AbstractBooleanStateAdapter. |
|
AbstractBooleanStateAdapter(BooleanState state)
Creates a new AbstractBooleanStateAdapter. |
|
AbstractBooleanStateAdapter(java.lang.String name)
Creates a new AbstractBooleanStateAdapter. |
|
AbstractBooleanStateAdapter(java.lang.String name,
BooleanState state)
Creates a new AbstractBooleanStateAdapter. |
|
| Method Summary | |
protected void |
addTarget(java.lang.Object target)
Adds a target object to the adapter with normal state change logic. |
protected void |
addTarget(java.lang.Object target,
boolean invert)
Adds a target object to the adapter. |
protected void |
addTargetInverse(java.lang.Object target)
Adds a target object to the adapter with inverse state change logic. |
void |
dispose()
Disposes the component. |
BooleanState |
getBooleanState()
|
java.lang.String |
getName()
Return the name of the BooleanStateAdapter. |
protected void |
removeTarget(java.lang.Object target)
Removes a previously added taregt object from this adapter. |
protected void |
setAdaptedValue(boolean value)
Adapts the state value given. |
protected abstract void |
setAdaptedValue(java.lang.Object target,
boolean value)
Sets the adapted value for the given target object (that was added before to this adapter). |
void |
setBooleanState(BooleanState state)
Sets (or resets if state==null) the state this adapter acts on. |
void |
setName(java.lang.String name)
Set the name of the BooleanStateAdapter. |
void |
updateAdaptedValue()
Forces an update of the current state value to the adapted objects. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractBooleanStateAdapter()
AbstractBooleanStateAdapter.
public AbstractBooleanStateAdapter(java.lang.String name)
AbstractBooleanStateAdapter.
name - the name to setpublic AbstractBooleanStateAdapter(BooleanState state)
AbstractBooleanStateAdapter.
state - the state to set
public AbstractBooleanStateAdapter(java.lang.String name,
BooleanState state)
AbstractBooleanStateAdapter.
name - the name to setstate - the state to set| 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()
BooleanStateAdapterBooleanStateAdapter.
getName in interface BooleanStateAdapterBooleanStateAdapter (never null)BooleanStateAdapter.getName()public void setName(java.lang.String name)
BooleanStateAdapterBooleanStateAdapter.
setName in interface BooleanStateAdaptername - the name of the BooleanStateAdapter (not null)BooleanStateAdapter.setName(java.lang.String)public BooleanState getBooleanState()
getBooleanState in interface BooleanStateAdapterState to adapt, or null, if currently
no state is adapted.BooleanStateAdapter.getBooleanState()public void setBooleanState(BooleanState state)
BooleanStateAdapterstate==null) the state this adapter acts on.
setBooleanState in interface BooleanStateAdapterstate - the state we act upon or nullBooleanStateAdapter.setBooleanState(com.sdm.quasar.client.core.states.BooleanState)protected void setAdaptedValue(boolean value)
value - the BooleanState's value to adapt.
protected abstract void setAdaptedValue(java.lang.Object target,
boolean value)
target - the target to adapt the value tovalue - the value to adaptpublic void updateAdaptedValue()
protected void addTarget(java.lang.Object target)
target - the target we should act on when state changes
java.lang.IllegalArgumentException - if the target is null
or if the target was already added beforeprotected void addTargetInverse(java.lang.Object target)
target - the target we should act on when state changes
java.lang.IllegalArgumentException - if the target is null
or if the target was already added before
protected void addTarget(java.lang.Object target,
boolean invert)
target - the target we should act on when state changesinvert - if true, the state value will be
inverted before adapting
java.lang.IllegalArgumentException - if the target is null
or if the target was already added beforeprotected void removeTarget(java.lang.Object target)
target - the target object to remove.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||