com.dlsc.flexgantt.policy.layer

## Class DefaultEditLayerPolicy

- java.lang.Object
- - com.dlsc.flexgantt.policy.AbstractPolicy
  - - com.dlsc.flexgantt.policy.layer.DefaultEditLayerPolicy

- All Implemented Interfaces:
    IPolicy, IEditLayerPolicy

      public class DefaultEditLayerPolicy
      extends AbstractPolicy
      implements IEditLayerPolicy

  The default implementation of the edit policy for layers, which assumes that the layers to add or remove are instances of `Layer`.
  Since:
    1.0
  Version:
    $Revision: 1.4 $
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultEditLayerPolicy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ICommand` | `getAddLayerCommand(ILayer layer, IGanttChartModel model)` Returns the command used to add a layer to a model.
    `ICommand` | `getRemoveLayerCommand(ILayer layer, IGanttChartModel model)` Returns the command used to remove a layer from a model.

    - ### Methods inherited from class com.dlsc.flexgantt.policy.AbstractPolicy

      `assertClass`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultEditLayerPolicy

          public DefaultEditLayerPolicy()

  - ### Method Detail

    - #### getAddLayerCommand

          public ICommand getAddLayerCommand(ILayer layer,
                                             IGanttChartModel model)

      Description copied from interface: `IEditLayerPolicy`
      Returns the command used to add a layer to a model.
      Specified by:
        `getAddLayerCommand` in interface `IEditLayerPolicy`
      Parameters:
        `layer` - the layer to add
        `model` - the model to which the layer will be added
      Returns:
        a command that performs the actual addition of the layer to the model

    - #### getRemoveLayerCommand

          public ICommand getRemoveLayerCommand(ILayer layer,
                                                IGanttChartModel model)

      Description copied from interface: `IEditLayerPolicy`
      Returns the command used to remove a layer from a model.
      Specified by:
        `getRemoveLayerCommand` in interface `IEditLayerPolicy`
      Parameters:
        `layer` - the layer to remove
        `model` - the model from which the layer will be removed
      Returns:
        a command that performs the actual removal of the layer from the model

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