Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdesktop.swingx.action
Interface Targetable

All Known Implementing Classes:
  JXEditorPane

    public interface Targetable

An interface which exposes the allowable actions to a TargetManager. The getCommands method will expose the allowable actions to another class and the doCommand method is called to invoke an action on the class.

Usually, the command key will be the key value of the Action. For components This could be the ActionMap keys. For actions managed with the ActionManager, this will be the value of an actions Action.ACTION_COMMAND_KEY

Author:
  Mark Davidson
See Also:
  `TargetManager`

Method Summary
`boolean` | `doCommand(java.lang.Object command, java.lang.Object value)` Perform the command using the object value.
`java.lang.Object[]` | `getCommands()` Returns an array of supported commands.
`boolean` | `hasCommand(java.lang.Object command)` Return a flag that indicates if a command is supported.

Method Detail

### doCommand

    boolean doCommand(java.lang.Object command,
                      java.lang.Object value)

  Perform the command using the object value.

  Parameters:
    `command` - is a Action.ACTION_COMMAND_KEY
    `value` - an arbitrary value. Usually this will be EventObject which trigered the command.

### hasCommand

    boolean hasCommand(java.lang.Object command)

  Return a flag that indicates if a command is supported.

  Parameters:
    `command` - is a Action.ACTION_COMMAND_KEY
  Returns:
    true if command is supported; false otherwise

### getCommands

    java.lang.Object[] getCommands()

  Returns an array of supported commands. If this Targetable doesn't support any commands (which is unlikely) then an empty array is returned.

  Returns:
    array of supported commands

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010. All Rights Reserved.