Class DesiredHeadwayColorer

    • Field Detail

      • tMin

        public final Duration tMin
        Minimum value on input scale.
      • tMax

        public final Duration tMax
        Maximum value on input scale.
      • UNKNOWN

        protected static final Color UNKNOWN
        Unknown color.
    • Constructor Detail

      • DesiredHeadwayColorer

        public DesiredHeadwayColorer()
        Constructor using Tmin and Tmax parameters.
      • DesiredHeadwayColorer

        public DesiredHeadwayColorer​(Duration tMin,
                                     Duration tMax)
        Constructor using input Tmin and Tmax.
        Parameters:
        tMin - Duration; minimum headway
        tMax - Duration; maximum headway
    • Method Detail

      • getColor

        public final Color getColor​(Gtu gtu)
        Get the color, based on the Drawable object.
        Specified by:
        getColor in interface Colorer<Gtu>
        Parameters:
        gtu - D; the object to determine the color for
        Returns:
        the (fill, line) color of the drawable object
      • getLegend

        public final 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:
        getLegend in interface GtuColorer
        Returns:
        List<LegendEntry>; the list of legend entries; the caller should not (try to) modify this List