Class AccelerationGtuColorer

    • Constructor Detail

      • AccelerationGtuColorer

        public AccelerationGtuColorer​(Acceleration maximumDeceleration,
                                      Acceleration maximumAcceleration)
        Construct a new AccelerationGTUColorer.
        Parameters:
        maximumDeceleration - Acceleration; the deceleration (negative acceleration) that corresponds to the first (red) legend entry
        maximumAcceleration - Acceleration; the deceleration that corresponds to the last (blue) legend entry
    • 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