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
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanPerform the command using the object value.Object[]Returns an array of supported commands.booleanhasCommand(Object command) Return a flag that indicates if a command is supported.
-
Method Details
-
doCommand
-
hasCommand
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
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
-