com.dlsc.flexgantt.command.layer

## Class DefaultAddLayerCommand

- java.lang.Object
- - com.dlsc.flexgantt.command.AbstractCommand
  - - com.dlsc.flexgantt.command.layer.DefaultAddLayerCommand

- All Implemented Interfaces:
    ICommand, Serializable

      public class DefaultAddLayerCommand
      extends AbstractCommand

  A command to add a layer to a model.
  Since:
    1.0
  Version:
    $Revision: 1.3 $
  Author:
    Dirk Lemmermann
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultAddLayerCommand(ILayer layer, DefaultGanttChartModel model)` Constructs a new command.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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, setName`

    - ### 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)
                              throws CommandException

      Description copied from interface: `ICommand`
      Executes the command.
      Parameters:
        `monitor` - a progress monitor
      Throws:
        `CommandException` - if anything during the execution of the command has gone wrong

    - #### undoCommand

          public void undoCommand(IProgressMonitor monitor)
                           throws CommandException

      Description copied from interface: `ICommand`
      Undos the command.
      Parameters:
        `monitor` - a progress monitor
      Throws:
        `CommandException` - if anything during the execution of the command has gone wrong

    - #### 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

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.