jimm.datavision.gui.cmd
Class ParamEditCommand
java.lang.Object
jimm.datavision.gui.cmd.CommandAdapter
jimm.datavision.gui.cmd.ParamEditCommand
- All Implemented Interfaces:
- Command, Nameable
public class ParamEditCommand
- extends CommandAdapter
A command for changing a Parameter
's values---not the runtime
values, but the default values presented to the user as initial choices.
- Author:
- Jim Menard, jimm@io.com
Constructor Summary |
ParamEditCommand(Parameter param,
java.lang.String name,
java.lang.String question,
int type,
int arity,
java.util.List defaultValues)
Constructor. |
Method Summary |
protected void |
editParam(java.lang.String name,
java.lang.String question,
int type,
int arity,
java.util.List defaultValues)
|
void |
perform()
Performs the command. |
void |
undo()
Undoes the command. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
param
Parameter param
newName
java.lang.String newName
newQuestion
java.lang.String newQuestion
newType
int newType
newArity
int newArity
newDefaultValues
java.util.List newDefaultValues
oldName
java.lang.String oldName
oldQuestion
java.lang.String oldQuestion
oldType
int oldType
oldArity
int oldArity
oldDefaultValues
java.util.List oldDefaultValues
ParamEditCommand
public ParamEditCommand(Parameter param,
java.lang.String name,
java.lang.String question,
int type,
int arity,
java.util.List defaultValues)
- Constructor.
- Parameters:
param
- the parametername
- the new name of this parameterquestion
- the new questiontype
- the new type; one of the Parameter
constants
TYPE_BOOLEAN
, TYPE_STRING
,
TYPE_NUMERIC
, or TYPE_DATE
arity
- one of the Parameter
constants
ARITY_ONE
, ARITY_RANGE
,
ARITY_LIST_SINGLE
, or ARITY_LIST_MULTIPLE
defaultValues
- the new list of parameter default values
perform
public void perform()
- Description copied from class:
CommandAdapter
- Performs the command. The default implementation does nothing.
- Specified by:
perform
in interface Command
- Overrides:
perform
in class CommandAdapter
undo
public void undo()
- Description copied from class:
CommandAdapter
- Undoes the command. The default implementation does nothing.
- Specified by:
undo
in interface Command
- Overrides:
undo
in class CommandAdapter
editParam
protected void editParam(java.lang.String name,
java.lang.String question,
int type,
int arity,
java.util.List defaultValues)