Package adams.gui.scripting
Class ScriptingCommandCode
- java.lang.Object
-
- adams.gui.scripting.ScriptingCommandCode
-
public abstract class ScriptingCommandCode extends Object
Class for the optional code to execute when a command finishes.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description ScriptingCommandCode()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
execute()
The code that gets executed after the command was run.BasePanel
getBasePanel()
Returns the BasePanel that was affected.String
getCommand()
Returns the command that was run.String
getError()
Returns the error message, if any.boolean
hasError()
Checks whether an error message exists.void
setBasePanel(BasePanel value)
Sets the BasePanel that was affected.void
setCommand(String value)
Sets the command that was executed.void
setError(String value)
Sets the error message, if any.
-
-
-
Method Detail
-
setCommand
public void setCommand(String value)
Sets the command that was executed.- Parameters:
value
- the command
-
getCommand
public String getCommand()
Returns the command that was run.- Returns:
- the command
-
setBasePanel
public void setBasePanel(BasePanel value)
Sets the BasePanel that was affected.- Parameters:
value
- the BasePanel
-
getBasePanel
public BasePanel getBasePanel()
Returns the BasePanel that was affected.- Returns:
- the BasePanel
-
setError
public void setError(String value)
Sets the error message, if any.- Parameters:
value
- the error or null if none
-
getError
public String getError()
Returns the error message, if any.- Returns:
- the error, null if none available
-
hasError
public boolean hasError()
Checks whether an error message exists.- Returns:
- true if an error message exists
-
execute
public abstract void execute()
The code that gets executed after the command was run.
-
-