jimm.datavision.gui.cmd
Class ParamEditCommand

java.lang.Object
  extended by jimm.datavision.gui.cmd.CommandAdapter
      extended by 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

Field Summary
(package private)  int newArity
           
(package private)  java.util.List newDefaultValues
           
(package private)  java.lang.String newName
           
(package private)  java.lang.String newQuestion
           
(package private)  int newType
           
(package private)  int oldArity
           
(package private)  java.util.List oldDefaultValues
           
(package private)  java.lang.String oldName
           
(package private)  java.lang.String oldQuestion
           
(package private)  int oldType
           
(package private)  Parameter param
           
 
Fields inherited from class jimm.datavision.gui.cmd.CommandAdapter
name
 
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 jimm.datavision.gui.cmd.CommandAdapter
getName, redo, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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 parameter
name - the new name of this parameter
question - the new question
type - 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
Method Detail

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)