Class FixedColorer<D extends Drawable>
- java.lang.Object
-
- org.opentrafficsim.core.animation.FixedColorer<D>
-
- Type Parameters:
D- the Drawable type
- All Implemented Interfaces:
Colorer<D>
public class FixedColorer<D extends Drawable> extends Object implements Colorer<D>
FixedColorer stores a fixed color for drawing.Copyright (c) 2003-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFixedColorer(Color color)Initialize the FixedColorer with a color.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <D extends Drawable>
FixedColorer<D>black()static <D extends Drawable>
FixedColorer<D>blue()static <D extends Drawable>
FixedColorer<D>create(Color color)Instantiate a singleton fixed colorer for a certain color.static <D extends Drawable>
FixedColorer<D>cyan()static <D extends Drawable>
FixedColorer<D>darkGray()ColorgetColor(D drawable)Get the color, based on the Drawable object.static <D extends Drawable>
FixedColorer<D>gray()static <D extends Drawable>
FixedColorer<D>green()static <D extends Drawable>
FixedColorer<D>lightGray()static <D extends Drawable>
FixedColorer<D>magenta()static <D extends Drawable>
FixedColorer<D>orange()static <D extends Drawable>
FixedColorer<D>pink()static <D extends Drawable>
FixedColorer<D>red()static <D extends Drawable>
FixedColorer<D>white()static <D extends Drawable>
FixedColorer<D>yellow()
-
-
-
Constructor Detail
-
FixedColorer
protected FixedColorer(Color color)
Initialize the FixedColorer with a color.- Parameters:
color- Color; the fixed color to use
-
-
Method Detail
-
create
public static <D extends Drawable> FixedColorer<D> create(Color color)
Instantiate a singleton fixed colorer for a certain color.- Type Parameters:
D- the Drawable type- Parameters:
color- Color; the fixed color to use- Returns:
- the FixedColorer
-
black
public static <D extends Drawable> FixedColorer<D> black()
- Type Parameters:
D- the Drawable type- Returns:
- black color
-
blue
public static <D extends Drawable> FixedColorer<D> blue()
- Type Parameters:
D- the Drawable type- Returns:
- blue color
-
cyan
public static <D extends Drawable> FixedColorer<D> cyan()
- Type Parameters:
D- the Drawable type- Returns:
- cyan color
-
darkGray
public static <D extends Drawable> FixedColorer<D> darkGray()
- Type Parameters:
D- the Drawable type- Returns:
- darkGray color
-
gray
public static <D extends Drawable> FixedColorer<D> gray()
- Type Parameters:
D- the Drawable type- Returns:
- gray color
-
green
public static <D extends Drawable> FixedColorer<D> green()
- Type Parameters:
D- the Drawable type- Returns:
- green color
-
lightGray
public static <D extends Drawable> FixedColorer<D> lightGray()
- Type Parameters:
D- the Drawable type- Returns:
- lightGray color
-
magenta
public static <D extends Drawable> FixedColorer<D> magenta()
- Type Parameters:
D- the Drawable type- Returns:
- magenta color
-
orange
public static <D extends Drawable> FixedColorer<D> orange()
- Type Parameters:
D- the Drawable type- Returns:
- orange color
-
pink
public static <D extends Drawable> FixedColorer<D> pink()
- Type Parameters:
D- the Drawable type- Returns:
- pink color
-
red
public static <D extends Drawable> FixedColorer<D> red()
- Type Parameters:
D- the Drawable type- Returns:
- red color
-
white
public static <D extends Drawable> FixedColorer<D> white()
- Type Parameters:
D- the Drawable type- Returns:
- white color
-
yellow
public static <D extends Drawable> FixedColorer<D> yellow()
- Type Parameters:
D- the Drawable type- Returns:
- yellow color
-
-