com.dlsc.flexgantt.command.layer
Class DefaultRemoveLayerCommand

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

public class DefaultRemoveLayerCommand
extends AbstractCommand

A command to remove a layer from a model.

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

Constructor Summary
DefaultRemoveLayerCommand(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 removed from the model.
 IGanttChartModel getModel()
          Returns the model from which the layer will be removed
 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

DefaultRemoveLayerCommand

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

Parameters:
layer - the layer to remove
model - the model from which to remove the layer
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 removed from the model.

Returns:
the layer that will be removed from the model
Since:
1.0

getModel

public IGanttChartModel getModel()
Returns the model from which the layer will be removed

Returns:
the model from which the layer will be removed
Since:
1.0