|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.commands.AbstractCommandAdapter
com.sdm.quasar.client.swing.commands.adapters.AbstractButtonCommandAdapter
The AbstractButtonCommandAdapter is an bidirectional adapter
between an AbstractButton and a Command:
It trigges the Command, when the ActionEvent is fired
and it sets the enabled state of the AbstractButton due to the executable BooleanState
of the Command.
| Constructor Summary | |
AbstractButtonCommandAdapter(javax.swing.AbstractButton abstractButton,
Command command)
Creates a new AbstractButtonCommandAdapter. |
|
AbstractButtonCommandAdapter(java.lang.String name,
javax.swing.AbstractButton abstractButton,
Command command)
Creates a new AbstractButtonCommandAdapter. |
|
| Method Summary | |
void |
dispose()
Disposes the component. |
javax.swing.AbstractButton |
getAbstractButton()
Returns the AbstractButton adapted to the command. |
BooleanState |
getEnabledBooleanState()
|
void |
setAbstractButton(javax.swing.AbstractButton abstractButton)
Sets the AbstractButton to adapt to the command. |
void |
setCommand(Command command)
Sets (or resets if command==null) the Command this
adapter adapts. |
void |
setEnabledBooleanState(BooleanState enabledState)
Sets the BooleanState that controls the enabled state of the
adapted JComponent. |
| Methods inherited from class com.sdm.quasar.client.core.commands.AbstractCommandAdapter |
executeCommand, getCommand, getName, setName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractButtonCommandAdapter(javax.swing.AbstractButton abstractButton,
Command command)
AbstractButtonCommandAdapter.
public AbstractButtonCommandAdapter(java.lang.String name,
javax.swing.AbstractButton abstractButton,
Command command)
AbstractButtonCommandAdapter.
name - | Method Detail |
public void setCommand(Command command)
CommandAdaptercommand==null) the Command this
adapter adapts.
setCommand in interface CommandAdaptersetCommand in class AbstractCommandAdapterAbstractCommandAdapter.setCommand(com.sdm.quasar.client.core.commands.Command)public javax.swing.AbstractButton getAbstractButton()
AbstractButton adapted to the command.
public void setAbstractButton(javax.swing.AbstractButton abstractButton)
AbstractButton to adapt to the command.
abstractButton - the AbstractButton to adaptpublic BooleanState getEnabledBooleanState()
BooleanState that controls the enabled state of the
adapted JComponent.public void setEnabledBooleanState(BooleanState enabledState)
BooleanState that controls the enabled state of the
adapted JComponent.
enabledState - the BooleanState to use
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.
DisposeException - if there was one or more errors while
disposing the component.Disposable.dispose()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||