Class DistractionColorer

    • Constructor Detail

      • DistractionColorer

        public DistractionColorer​(DefaultDistraction... distractions)
        Constructor.
        Parameters:
        distractions - DefaultDistraction...; DefaultDistraction... distractions to color
    • Method Detail

      • getColor

        public java.awt.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 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:
        getLegend in interface GTUColorer
        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:
        toString in class java.lang.Object