public final class FalseCommand extends Object implements Command
prepareCommand(com.xmlmind.xmledit.gadget.Gadget, java.lang.String, int, int)
always returns
false
.Modifier and Type | Field and Description |
---|---|
static FalseCommand |
INSTANCE
A ready-to-use instance of FalseCommand.
|
Constructor and Description |
---|
FalseCommand() |
Modifier and Type | Method and Description |
---|---|
CommandResult |
executeCommand(Gadget gadget,
String parameter,
int x,
int y)
Actually executes this command with specified parameter and in
specified context.
|
boolean |
prepareCommand(Gadget gadget,
String parameter,
int x,
int y)
Tests whether this command can be executed with specified parameter
and in specified context.
|
public static final FalseCommand INSTANCE
public boolean prepareCommand(Gadget gadget, String parameter, int x, int y)
Command
If the command can be executed, this method returns
true
after having configured its internal state for
consumption by method Command.executeCommand(com.xmlmind.xmledit.gadget.Gadget, java.lang.String, int, int)
which should be invoked
immediately after this one.
Returns false
if this command cannot be executed with
specified parameter and in specified context.
prepareCommand
in interface Command
gadget
- the target of this commandparameter
- parameterizes the command (that is, modifies the
behavior of the command in a command specific way)x
- X position relative to gadget of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputy
- Y position relative to gadget of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputpublic CommandResult executeCommand(Gadget gadget, String parameter, int x, int y)
Command
This method assumes that Command.prepareCommand(com.xmlmind.xmledit.gadget.Gadget, java.lang.String, int, int)
has been
successfully invoked immediately before its own invocation.
executeCommand
in interface Command
gadget
- the target of this commandparameter
- parameterizes the command (that is, modifies the
behavior of the command in a command specific way)x
- X position relative to gadget of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputy
- Y position relative to gadget of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputnull