jimm.datavision.gui.cmd
Class GroupEditCommand
java.lang.Object
jimm.datavision.gui.cmd.CommandAdapter
jimm.datavision.gui.cmd.GroupEditCommand
- All Implemented Interfaces:
- Command, Nameable
public class GroupEditCommand
- extends CommandAdapter
A command for changing a report's Group
s.
- Author:
- Jim Menard, jimm@io.com
Method Summary |
void |
perform()
Performs the command. |
protected void |
setGroups(java.util.Collection fromList,
java.util.Collection toList)
|
void |
undo()
Undoes the command. |
protected int |
whatChanged(java.util.Collection fromList,
java.util.Collection toList)
Determines the severity of the difference between the report and what we
have now: NO_CHANGE , ONLY_SORTING_CHANGE , or
DRASTIC_CHANGE . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_CHANGE
protected static final int NO_CHANGE
- See Also:
- Constant Field Values
ONLY_SORTING_CHANGE
protected static final int ONLY_SORTING_CHANGE
- See Also:
- Constant Field Values
DRASTIC_CHANGE
protected static final int DRASTIC_CHANGE
- See Also:
- Constant Field Values
report
protected Report report
designer
protected Designer designer
newGroupItems
protected java.util.Collection newGroupItems
oldGroupItems
protected java.util.Collection oldGroupItems
GroupEditCommand
public GroupEditCommand(Report r,
Designer designer,
java.util.Collection groupItems)
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
setGroups
protected void setGroups(java.util.Collection fromList,
java.util.Collection toList)
whatChanged
protected int whatChanged(java.util.Collection fromList,
java.util.Collection toList)
- Determines the severity of the difference between the report and what we
have now:
NO_CHANGE
, ONLY_SORTING_CHANGE
, or
DRASTIC_CHANGE
.
- Parameters:
fromList
- the list of groups before the pending changetoList
- the list of groups after the pending change
- Returns:
- one of
NO_CHANGE
, ONLY_SORTING_CHANGE
,
or DRASTIC_CHANGE