com.dlsc.flexgantt.model.gantt

## Class Layer

- java.lang.Object
- - com.dlsc.flexgantt.util.NamedObject
  - - com.dlsc.flexgantt.model.gantt.Layer

- All Implemented Interfaces:
    ILayer, INamedObject, Comparable<INamedObject>

      public class Layer
      extends NamedObject
      implements ILayer

  An implementation of the layer interface. For a detailed description of what layers are and how they are used please refer to the class documentation of `ILayer`.
  Since:
    1.0
  Version:
    $Revision: 1.24 $
  Author:
    Dirk Lemmermann

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.dlsc.flexgantt.model.gantt.ILayer

      `ILayer.Feature`

  - ### Field Summary

    - ### Fields inherited from class com.dlsc.flexgantt.util.NamedObject

      `PROPERTY_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Layer(String name)` Constructs a new layer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addFeature(ILayer.Feature feature)` Adds a feature to the layer.
    `boolean` | `isCustomLayer()` Returns TRUE if the layer will be visualized by a custom layer (see `AbstractCustomLayer`) instead of the standard `TimelineObjectLayer`.
    `boolean` | `isFeatureEnabled(ILayer.Feature feature)` Determines whether a feature is currently supported / required by a layer or not.
    `void` | `removeFeature(ILayer.Feature feature)` Removes a feature from the layer.
    `void` | `setCustomLayer(boolean b)` Specifies whether the layer will be visualized by a custom layer implementation.

    - ### Methods inherited from class com.dlsc.flexgantt.util.NamedObject

      `addPropertyChangeListener, compareTo, getChangeSupport, getName, removePropertyChangeListener, setName, toString`

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

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

    - ### Methods inherited from interface com.dlsc.flexgantt.util.INamedObject

      `getName`

    - ### Methods inherited from interface java.lang.Comparable

      `compareTo`

- - ### Constructor Detail

    - #### Layer

          public Layer(String name)

      Constructs a new layer.
      Parameters:
        `name` - the layer's name
      Since:
        1.0

  - ### Method Detail

    - #### isCustomLayer

          public boolean isCustomLayer()

      Description copied from interface: `ILayer`
      Returns TRUE if the layer will be visualized by a custom layer (see `AbstractCustomLayer`) instead of the standard `TimelineObjectLayer`. The custom layer implementation needs to be provided by the application code. An implementation of `ILayerFactory` or a subclass of `DefaultLayerFactory` needs to be provided, which returns the custom layer implementation when the factories create method for custom layers gets invoked.
      Specified by:
        `isCustomLayer` in interface `ILayer`
      Returns:
        TRUE if the layer is a custom layer

    - #### setCustomLayer

          public void setCustomLayer(boolean b)

      Specifies whether the layer will be visualized by a custom layer implementation.
      Parameters:
        `b` -
      Since:
        1.0
      See Also:
        `AbstractCustomLayer`, `ILayerFactory.createCustomLayer(com.dlsc.flexgantt.swing.layer.LayerContainer, ILayer)`

    - #### isFeatureEnabled

          public boolean isFeatureEnabled(ILayer.Feature feature)

      Description copied from interface: `ILayer`
      Determines whether a feature is currently supported / required by a layer or not.
      Specified by:
        `isFeatureEnabled` in interface `ILayer`
      Parameters:
        `feature` - the feature to check for enablement
      Returns:
        TRUE if the given feature is supported / required

    - #### addFeature

          public void addFeature(ILayer.Feature feature)

      Adds a feature to the layer.
      Parameters:
        `feature` - the feature that is being added
      Since:
        1.0

    - #### removeFeature

          public void removeFeature(ILayer.Feature feature)

      Removes a feature from the layer.
      Parameters:
        `feature` - the feature that is being removed
      Since:
        1.0

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