jimm.datavision.gui.cmd
Class NewAggregateCommand

java.lang.Object
  extended by jimm.datavision.gui.cmd.CommandAdapter
      extended by jimm.datavision.gui.cmd.AbstractAggregateCommand
          extended by jimm.datavision.gui.cmd.NewAggregateCommand
All Implemented Interfaces:
Command, Nameable

public class NewAggregateCommand
extends AbstractAggregateCommand

A command for adding a aggregate to a field for a particular section.

Author:
Jim Menard, jimm@io.com

Field Summary
 
Fields inherited from class jimm.datavision.gui.cmd.AbstractAggregateCommand
aggregateWidget, fieldWidget, functionName, group, report
 
Fields inherited from class jimm.datavision.gui.cmd.CommandAdapter
name
 
Constructor Summary
NewAggregateCommand(Report report, FieldWidget fw, Group group, java.lang.String functionName)
          Constructor.
 
Method Summary
 void perform()
          Performs the command.
 void undo()
          Undoes the command.
 
Methods inherited from class jimm.datavision.gui.cmd.AbstractAggregateCommand
createAggregate, deleteAggregate, getAggregateWidget
 
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
 

Constructor Detail

NewAggregateCommand

public NewAggregateCommand(Report report,
                           FieldWidget fw,
                           Group group,
                           java.lang.String functionName)
Constructor.

Parameters:
report - the report containing the field and the aggregate
fw - the field widget to which we are adding a aggregate
group - if null, the aggregate is added to the report footer; else the aggregate is added to the first section in the group's footer.
functionName - the aggregate function name
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