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, java.lang.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
- Author:
- Dirk Lemmermann
Nested classes/interfaces inherited from interface com.dlsc.flexgantt.model.gantt.ILayer |
ILayer.Feature |
Constructor Summary |
Layer(java.lang.String name)
Constructs a new layer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
compareTo |
Layer
public Layer(java.lang.String name)
- Constructs a new layer.
- Parameters:
name
- the layer's name- Since:
- 1.0
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