|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface ActionCommand_
The ActionCommand annotation can be used to mark a method as being
an action command. These annotated methods can then be automatically
converted into action commands using GuiCommands.bindAnnotatedCommands(CommandContainer, Object).
The following is an example marking a save method as the implementation of the "save" action command.
@ActionCommand_("save")
public void save()
{
// do the save operation...
}
The annotated methods can optionally define either a Map,
ActionCommand or Window argument. Methods with a
Map will be passed the invoking commands parameter map, those with an
ActionCommand will be passed the command, and those with a Window will be
passed the commands invoker window.
@ActionCommand_("save")
public void save(Map parameters)
{
Object invoker = parameters.get(com.pietschy.command.ActionCommand.INVOKER);
// do the save operation...
}
GuiCommands.bindAnnotatedCommands(CommandContainer, Object),
GuiCommands.bindAnnotatedCommands(JComponent, Object),
GuiCommands.bindAnnotatedCommands(JComponent),
SwingWorkerCommand_| Required Element Summary | |
|---|---|
java.lang.String |
value
The id of the action command. |
| Element Detail |
|---|
public abstract java.lang.String value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||