|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pietschy.command.Command
com.pietschy.command.ActionCommand
com.pietschy.command.ProxyCommand
public class ProxyCommand
A utility command that locates and executes a command in the
CommandContainer heirarchy. This is a replacement for manually using
CommandContainer.findCommand(String). The proxy automatically monitors
changes to the container heirarchy and updates accordingly.
This command will automatically update its enabled and visible properties to track the actual command. Please note that the proxy doesn't track programmatic changes to the faces of the real command.
| Field Summary |
|---|
| Fields inherited from class com.pietschy.command.ActionCommand |
|---|
PARAMETER_ACTION_EVENT, PARAMETER_INVOKER, PARAMETER_INVOKER_WINDOW, PARAMETER_MODIFIERS |
| Fields inherited from class com.pietschy.command.Command |
|---|
internalLog, PROPERTY_ENABLED, PROPERTY_VISIBLE |
| Constructor Summary | |
|---|---|
ProxyCommand(java.lang.String id)
Creates a new instance with the specified id. |
|
| Method Summary | |
|---|---|
protected void |
bindToContainer(CommandContainer container)
Invoked to bind this instance to the specified container. |
protected void |
handleExecute()
Executes the real command. |
protected void |
registerBoundProperty(java.lang.String property)
Registers a property that will be monitored in the real command. |
protected void |
unbindFromContainer(CommandContainer container)
Invoked to unbind this instance to the specified container. |
protected void |
updateState()
Invoked to update the proxy state when ever the real command or one of it's registred properties change. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.pietschy.command.ActionCommandExecutor |
|---|
addPropertyChangeListener, addPropertyChangeListener, isEnabled, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.pietschy.command.Identifiable |
|---|
getId |
| Constructor Detail |
|---|
public ProxyCommand(java.lang.String id)
id - the id of the command to proxy.| Method Detail |
|---|
protected void registerBoundProperty(java.lang.String property)
updateState()
will be called when ever the real command or the named property changes.
property - the property to monitor.protected void bindToContainer(CommandContainer container)
ActionCommandCommand.isAnonymous() is false.
Subclasses may override this method to perform additional configuration such as
adding a listener to the container. In this case subclasses must also override
ActionCommand.unbindFromContainer(CommandContainer).
bindToContainer in class ActionCommandcontainer - the container to bind to.ActionCommand.unbindFromContainer(CommandContainer)protected void unbindFromContainer(CommandContainer container)
ActionCommandCommand.isAnonymous() is false.
unbindFromContainer in class ActionCommandcontainer - the container to unbind from.ActionCommand.bindToContainer(CommandContainer)protected void updateState()
registerBoundProperty(String)protected void handleExecute()
handleExecute in class ActionCommand
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||