public abstract class ExtCommand
extends java.lang.Object
Constructor and Description |
---|
ExtCommand(java.lang.String name,
boolean immediate) |
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute() |
abstract boolean |
execute()
Execute the command
|
boolean |
executeCommand()
Execute the command.
|
java.lang.String |
getName() |
java.lang.String |
getReturnString()
Get the return string from the command.
|
boolean |
isImmediate() |
void |
setImmediate(boolean immediate) |
void |
setName(java.lang.String name) |
public ExtCommand(java.lang.String name, boolean immediate)
name
- Name of command (must be a single word)immediate
- immediate execution. If false, then the command will be queued in the AWT
thread for later execution (SwingUtilitiies.invokeLater(...)public boolean canExecute()
public final boolean executeCommand()
Note that if immediate is set false, then the command will be executed later in the AWT thread and this function will return true.
public abstract boolean execute()
public java.lang.String getReturnString()
By default this is just the command name, but many commands will need to send back extensive information.
public java.lang.String getName()
public void setName(java.lang.String name)
name
- the name to setpublic boolean isImmediate()
public void setImmediate(boolean immediate)
immediate:
- true if execution should be immediate (i.e. not later in the
swing thread).