org.xwiki.gwt.user.client.ui.rta.cmd.internal
Class DefaultExecutable
java.lang.Object
org.xwiki.gwt.user.client.ui.rta.cmd.internal.AbstractRichTextAreaExecutable
org.xwiki.gwt.user.client.ui.rta.cmd.internal.DefaultExecutable
- All Implemented Interfaces:
- Executable
- Direct Known Subclasses:
- DeleteExecutable, ListExecutable
public class DefaultExecutable
- extends AbstractRichTextAreaExecutable
Executes a predefined command on a specific document.
Field Summary |
protected String |
command
The predefined command executed by this executable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
command
protected String command
- The predefined command executed by this executable.
DefaultExecutable
public DefaultExecutable(RichTextArea rta,
String command)
- Creates a new instance that will execute the specified command.
- Parameters:
rta
- the execution targetcommand
- A predefined command to be executed by this executable.
execute
public boolean execute(String parameter)
- Description copied from interface:
Executable
- Runs this executable with the given parameter.
- Parameters:
parameter
- the execution parameter
- Returns:
true
if the execution succeeds, false
otherwise- See Also:
CommandManager.execute(Command, String)
getParameter
public String getParameter()
- Returns:
- the previous execution parameter, if
Executable.isExecuted()
returns true
, null
otherwise
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interface Executable
- Overrides:
isEnabled
in class AbstractRichTextAreaExecutable
- Returns:
true
if this executable can be executed on its underlying execution target, false
otherwise- See Also:
CommandManager.isEnabled(Command)
isExecuted
public boolean isExecuted()
- Returns:
true
if this executable has been executed on its underlying execution target, false
otherwise area.- See Also:
CommandManager.isExecuted(Command)
isSupported
public boolean isSupported()
- Specified by:
isSupported
in interface Executable
- Overrides:
isSupported
in class AbstractRichTextAreaExecutable
- Returns:
true
if this executable is supported by its underlying execution target, false
otherwise- See Also:
CommandManager.isSupported(Command)