Package nl.tudelft.simulation.dsol.animation.gis.map

## Class Layer

- java.lang.Object
- - nl.tudelft.simulation.dsol.animation.gis.map.Layer

All Implemented Interfaces:
  `Serializable`, `LayerInterface`

    public class Layer
    extends Object
    implements LayerInterface

This is an implementation of the LayerInterface that just stores the basic metadata for each layer. The actual information of the layer (points, shapes) is contained in the DataSource.

Copyright (c) 2020-2021 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information DSOL Manual. The DSOL project is distributed under a three-clause BSD-style license, which can be found at DSOL License.

Author:
  Alexander Verbraeck
See Also:
  Serialized Form

### Constructor Summary

Constructors
`Layer()` constructs a new layer.

### Method Summary

All Methods Instance Methods Concrete Methods
`DataSourceInterface` `getDataSource()` Return the data source, which contains the location of an ESRI shape datasource for now.
`Color` `getFillColor()` Return the fill color for the layer.
`int` `getMaxScale()` Return the maximum scale at which this layer has to be drawn.
`int` `getMinScale()` Return the minimum scale at which this layer has to be drawn.
`String` `getName()` Return the layer name.
`Color` `getOutlineColor()` Return the outline (line) color for the layer.
`boolean` `isDisplay()` Return the display status of the layer (displayed or not).
`boolean` `isTransform()` Return the status for the transformation: should the transform be used for this layer or not?
`void` `setDataSource​(DataSourceInterface dataSource)` Set the data source, which contains the location of an ESRI shape datasource for now.
`void` `setDisplay​(boolean status)` Set the display status of the layer (displayed or not).
`void` `setFillColor​(Color color)` Set the fill color for the layer.
`void` `setMaxScale​(int maxScale)` Set the maximum scale at which this layer has to be drawn.
`void` `setMinScale​(int minScale)` Set the minimum scale at which this layer has to be drawn.
`void` `setName​(String name)` Set the layer name.
`void` `setOutlineColor​(Color outlineColor)` Set the outline (line) color for the layer.
`void` `setTransform​(boolean transform)` Set the status for the transformation: should the transform be used for this layer or not?

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

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

### Constructor Detail

#### Layer

    public Layer()

constructs a new layer.

### Method Detail

#### getFillColor

    public Color getFillColor()

Return the fill color for the layer.

Specified by:
  `getFillColor` in interface `LayerInterface`
Returns:
  Color; the rgb(a) fill color for the layer

#### setFillColor

    public void setFillColor​(Color color)

Set the fill color for the layer.

Specified by:
  `setFillColor` in interface `LayerInterface`
Parameters:
  `color` - Color; the rgb(a) fill color for the layer

#### getDataSource

    public DataSourceInterface getDataSource()

Return the data source, which contains the location of an ESRI shape datasource for now.

Specified by:
  `getDataSource` in interface `LayerInterface`
Returns:
  DataSourceInterface the data source, contains the location of an ESRI shape datasource for now

#### setDataSource

    public void setDataSource​(DataSourceInterface dataSource)

Set the data source, which contains the location of an ESRI shape datasource for now.

Specified by:
  `setDataSource` in interface `LayerInterface`
Parameters:
  `dataSource` - DataSourceInterface; the data source, contains the location of an ESRI shape datasource for now

#### getMaxScale

    public int getMaxScale()

Return the maximum scale at which this layer has to be drawn. FIXME: how do we define scale?

Specified by:
  `getMaxScale` in interface `LayerInterface`
Returns:
  int; the maximum scale at which this layer has to be drawn

#### setMaxScale

    public void setMaxScale​(int maxScale)

Set the maximum scale at which this layer has to be drawn.

Specified by:
  `setMaxScale` in interface `LayerInterface`
Parameters:
  `maxScale` - int; the maximum scale at which this layer has to be drawn

#### getMinScale

    public int getMinScale()

Return the minimum scale at which this layer has to be drawn. FIXME: how do we define scale?

Specified by:
  `getMinScale` in interface `LayerInterface`
Returns:
  int; the minimum scale at which this layer has to be drawn

#### setMinScale

    public void setMinScale​(int minScale)

Set the minimum scale at which this layer has to be drawn.

Specified by:
  `setMinScale` in interface `LayerInterface`
Parameters:
  `minScale` - int; the minimum scale at which this layer has to be drawn

#### getName

    public String getName()

Return the layer name.

Specified by:
  `getName` in interface `LayerInterface`
Returns:
  String; layer name

#### setName

    public void setName​(String name)

Set the layer name.

Specified by:
  `setName` in interface `LayerInterface`
Parameters:
  `name` - String; layer name

#### getOutlineColor

    public Color getOutlineColor()

Return the outline (line) color for the layer.

Specified by:
  `getOutlineColor` in interface `LayerInterface`
Returns:
  Color; the rgb(a) outline (line) color for the layer

#### setOutlineColor

    public void setOutlineColor​(Color outlineColor)

Set the outline (line) color for the layer.

Specified by:
  `setOutlineColor` in interface `LayerInterface`
Parameters:
  `outlineColor` - Color; the rgb(a) outline (line) color for the layer

#### isDisplay

    public boolean isDisplay()

Return the display status of the layer (displayed or not).

Specified by:
  `isDisplay` in interface `LayerInterface`
Returns:
  boolean; the display status of the layer (displayed or not)

#### setDisplay

    public void setDisplay​(boolean status)

Set the display status of the layer (displayed or not).

Specified by:
  `setDisplay` in interface `LayerInterface`
Parameters:
  `status` - boolean; the display status of the layer (displayed or not)

#### isTransform

    public boolean isTransform()

Return the status for the transformation: should the transform be used for this layer or not?

Specified by:
  `isTransform` in interface `LayerInterface`
Returns:
  boolean; the status for the transformation: should the transform be used for this layer or not?

#### setTransform

    public void setTransform​(boolean transform)

Set the status for the transformation: should the transform be used for this layer or not?

Specified by:
  `setTransform` in interface `LayerInterface`
Parameters:
  `transform` - boolean; the status for the transformation: should the transform be used for this layer or not?