Class DesiredHeadwayColorer
java.lang.Object
org.opentrafficsim.road.gtu.colorer.DesiredHeadwayColorer
- All Implemented Interfaces:
Serializable,Colorer<GTU>,GTUColorer
public class DesiredHeadwayColorer extends Object implements GTUColorer, Serializable
Color on a scale from Tmin to Tmax parameters, or two given limits.
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 20 apr. 2017
- 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
-
Constructor Summary
Constructors Constructor Description DesiredHeadwayColorer()Constructor using Tmin and Tmax parameters.DesiredHeadwayColorer(Duration tMin, Duration tMax)Constructor using input Tmin and Tmax. -
Method Summary
-
Field Details
-
Constructor Details
-
DesiredHeadwayColorer
public DesiredHeadwayColorer()Constructor using Tmin and Tmax parameters. -
DesiredHeadwayColorer
Constructor using input Tmin and Tmax.- Parameters:
tMin- Duration; minimum headwaytMax- Duration; maximum headway
-
-
Method Details
-
getColor
Get the color, based on the Drawable object. -
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
-