public class GTUTypeColorer extends Object implements org.opentrafficsim.core.gtu.animation.GTUColorer, Serializable
Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier and Type | Field and Description |
|---|---|
static GTUTypeColorer |
DEFAULT
Default instance with colors for common GTUTypes.
|
| Constructor and Description |
|---|
GTUTypeColorer() |
| Modifier and Type | Method and Description |
|---|---|
GTUTypeColorer |
add(org.opentrafficsim.core.gtu.GTUType gtuType)
Adds a GTU type to the list with color from a default list.
|
GTUTypeColorer |
add(org.opentrafficsim.core.gtu.GTUType gtuType,
Color color)
Adds a GTU type to the list with given color.
|
Color |
getColor(org.opentrafficsim.core.gtu.GTU gtu) |
List<org.opentrafficsim.core.gtu.animation.GTUColorer.LegendEntry> |
getLegend() |
String |
toString() |
public static final GTUTypeColorer DEFAULT
public GTUTypeColorer add(org.opentrafficsim.core.gtu.GTUType gtuType)
gtuType - GTUType; GTU typepublic GTUTypeColorer add(org.opentrafficsim.core.gtu.GTUType gtuType, Color color)
gtuType - GTUType; GTU typecolor - Color; colorpublic Color getColor(org.opentrafficsim.core.gtu.GTU gtu)
getColor in interface org.opentrafficsim.core.gtu.animation.GTUColorerpublic List<org.opentrafficsim.core.gtu.animation.GTUColorer.LegendEntry> getLegend()
getLegend in interface org.opentrafficsim.core.gtu.animation.GTUColorerCopyright © 2014–2018 Delft University of Technology. All rights reserved.