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

## Class AbstractAttribute

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

All Implemented Interfaces:
  `Serializable`, `AttributeInterface`

Direct Known Subclasses:
  `Attribute`, `StaticAttribute`

    public abstract class AbstractAttribute
    extends Object
    implements AttributeInterface

This class defines a general, abstract layer attribute.

Copyright (c) 2020-2020 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

### Field Summary

Fields
`protected LayerInterface` `layer` the layer of this attribute.

### Constructor Summary

Constructors
`AbstractAttribute​(LayerInterface layer)` constructs a new AbstractAttribute.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract double` `getAngle​(int shapeIndex)` returns the angle of the attribute.
`Font` `getFont()`
`Color` `getFontColor()`
`LayerInterface` `getLayer()` returns the layer.
`double` `getMaxScale()`
`double` `getMinScale()`
`ScreenPosition` `getPosition()`
`abstract String` `getValue​(int shapeIndex)`
`void` `setFont​(Font font)`
`void` `setFontColor​(Color fontColor)`
`void` `setMaxScale​(double maxScale)` sets the maxScale of the attribute.
`void` `setMinScale​(double minScale)` sets the minScale of the attribute.
`void` `setPosition​(ScreenPosition position)`

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

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

### Field Detail

#### layer

    protected LayerInterface layer

the layer of this attribute.

### Constructor Detail

#### AbstractAttribute

    public AbstractAttribute​(LayerInterface layer)

constructs a new AbstractAttribute.

Parameters:
  `layer` - LayerInterface; the layer of this attribute

### Method Detail

#### setFont

    public void setFont​(Font font)

Specified by:
  `setFont` in interface `AttributeInterface`
Parameters:
  `font` - Font; the font to set

#### getFont

    public Font getFont()

Specified by:
  `getFont` in interface `AttributeInterface`
Returns:
  the font

#### getFontColor

    public Color getFontColor()

Specified by:
  `getFontColor` in interface `AttributeInterface`
Returns:
  the color

#### setFontColor

    public void setFontColor​(Color fontColor)

Specified by:
  `setFontColor` in interface `AttributeInterface`
Parameters:
  `fontColor` - Color; the font color to set

#### getValue

    public abstract String getValue​(int shapeIndex)

Specified by:
  `getValue` in interface `AttributeInterface`
Parameters:
  `shapeIndex` - int; the shapeIndex
Returns:
  the value of the attribute

#### getAngle

    public abstract double getAngle​(int shapeIndex)

returns the angle of the attribute.

Specified by:
  `getAngle` in interface `AttributeInterface`
Parameters:
  `shapeIndex` - int; the shapeIndex
Returns:
  the angle

#### getPosition

    public ScreenPosition getPosition()

Specified by:
  `getPosition` in interface `AttributeInterface`
Returns:
  the position

#### setPosition

    public void setPosition​(ScreenPosition position)

Specified by:
  `setPosition` in interface `AttributeInterface`
Parameters:
  `position` - int; the position to set

#### getLayer

    public LayerInterface getLayer()

returns the layer.

Specified by:
  `getLayer` in interface `AttributeInterface`
Returns:
  the layer of this attribute

#### getMaxScale

    public double getMaxScale()

Specified by:
  `getMaxScale` in interface `AttributeInterface`
Returns:
  the maxScale

#### getMinScale

    public double getMinScale()

Specified by:
  `getMinScale` in interface `AttributeInterface`
Returns:
  the minScale

#### setMaxScale

    public void setMaxScale​(double maxScale)

sets the maxScale of the attribute.

Specified by:
  `setMaxScale` in interface `AttributeInterface`
Parameters:
  `maxScale` - double; the maxscale to set

#### setMinScale

    public void setMinScale​(double minScale)

sets the minScale of the attribute.

Specified by:
  `setMinScale` in interface `AttributeInterface`
Parameters:
  `minScale` - double; the minscale to set