com.dlsc.flexgantt.command.layer
Class DefaultAddLayerCommand

java.lang.Object
  extended by com.dlsc.flexgantt.command.AbstractCommand
      extended by com.dlsc.flexgantt.command.layer.DefaultAddLayerCommand
All Implemented Interfaces:
ICommand, java.io.Serializable

public class DefaultAddLayerCommand
extends AbstractCommand

A command to add a layer to a model.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
Serialized Form

Constructor Summary
DefaultAddLayerCommand(ILayer layer, DefaultGanttChartModel model)
          Constructs a new command.
 
Method Summary
 void executeCommand(IProgressMonitor monitor)
          Executes the command.
 ILayer getLayer()
          Returns the layer that will be added to the model.
 IGanttChartModel getModel()
          Returns the model to which the layer will be added
 void undoCommand(IProgressMonitor monitor)
          Undos the command.
 
Methods inherited from class com.dlsc.flexgantt.command.AbstractCommand
getName, isRedoable, isRelevant, isUndoable, redoCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAddLayerCommand

public DefaultAddLayerCommand(ILayer layer,
                              DefaultGanttChartModel model)
Constructs a new command.

Parameters:
layer - the layer to add
model - the model to which the layer will be added
Since:
1.0
Method Detail

executeCommand

public void executeCommand(IProgressMonitor monitor)
Description copied from interface: ICommand
Executes the command.

Parameters:
monitor - a progress monitor

undoCommand

public void undoCommand(IProgressMonitor monitor)
Description copied from interface: ICommand
Undos the command.

Parameters:
monitor - a progress monitor

getLayer

public ILayer getLayer()
Returns the layer that will be added to the model.

Returns:
the layer that will be added to the model
Since:
1.0

getModel

public IGanttChartModel getModel()
Returns the model to which the layer will be added

Returns:
the model to which the layer will be added
Since:
1.0