public class ClusteredCommand extends AbstractUndoRedoCommand
Constructor and Description |
---|
ClusteredCommand()
Creates a new Clustered Command.
|
ClusteredCommand(java.util.List commands)
Creates a new Clustered Command witha list of pre-set commands.
|
Modifier and Type | Method and Description |
---|---|
void |
addCommand(IUndoRedoCommand command)
Adds a new command to the cluster.
|
void |
dispose()
Called when the event is about to be destroyed.
|
java.util.List |
getCommandList()
Simple getter for the list of commands that are transported by this
ClusteredCommand.
|
java.util.List |
getCommands()
Deprecated.
Because the name of this method is not unique and might me interpreted wrong.
|
java.util.List |
getEvents()
Return the individual events that are clustered in this command.
|
java.util.List |
getFlattenedCommands()
Return the individual commands that are clustered in this command.
|
void |
redo()
Redoes an event in the chart.
|
void |
removeCommand(IUndoRedoCommand command)
Removes a command from the cluster.
|
int |
size()
Returns the number of commands that are inside the cluster.
|
void |
undo()
Undoes an event in the chart.
|
public ClusteredCommand()
public ClusteredCommand(java.util.List commands)
public void addCommand(IUndoRedoCommand command)
command
- Command to addpublic void removeCommand(IUndoRedoCommand command)
command
- Command to removepublic int size()
public java.util.List getCommandList()
Note that this will only return the list of commands as is. There is no transformation made to the list.
getFlattenedCommands()
public void dispose()
IUndoRedoCommand
public void redo()
IUndoRedoCommand
public void undo()
IUndoRedoCommand
public java.util.List getCommands()
EventMoveCommand
s.getCommandList()
,
getFlattenedCommands()
public java.util.List getFlattenedCommands()
EventMoveCommand
s.getCommandList()
public java.util.List getEvents()
GanttEvent
s.