Class SynchronizationColorer
- java.lang.Object
-
- org.opentrafficsim.road.gtu.colorer.SynchronizationColorer
-
- All Implemented Interfaces:
java.io.Serializable,Colorer<GTU>,GTUColorer
public class SynchronizationColorer extends java.lang.Object implements GTUColorer, java.io.Serializable
Color based on synchronization state.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 23 feb. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opentrafficsim.core.animation.gtu.colorer.GTUColorer
GTUColorer.LegendEntry
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.awt.ColorNAN/A color.
-
Constructor Summary
Constructors Constructor Description SynchronizationColorer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.ColorgetColor(GTU gtu)Get the color, based on the Drawable object.java.util.List<GTUColorer.LegendEntry>getLegend()Return a list of legend entries (useful to make a legend of the colors used to render the GTUs).java.lang.StringtoString()
-
-
-
Method Detail
-
getColor
public java.awt.Color getColor(GTU gtu)
Get the color, based on the Drawable object.
-
getLegend
public java.util.List<GTUColorer.LegendEntry> getLegend()
Return a list of legend entries (useful to make a legend of the colors used to render the GTUs).- Specified by:
getLegendin interfaceGTUColorer- Returns:
- List<LegendEntry>; the list of legend entries; the caller should not (try to) modify this List
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-