Package org.opentrafficsim.animation
Class FixedColorer<D extends org.opentrafficsim.core.animation.Drawable>
java.lang.Object
org.opentrafficsim.animation.FixedColorer<D>
- Type Parameters:
D
- the Drawable type
- All Implemented Interfaces:
Colorer<D>
public class FixedColorer<D extends org.opentrafficsim.core.animation.Drawable>
extends Object
implements Colorer<D>
FixedColorer stores a fixed color for drawing.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Alexander Verbraeck
-
Constructor Summary
ModifierConstructorDescriptionprotected
FixedColorer
(Color color) Initialize the FixedColorer with a color. -
Method Summary
Modifier and TypeMethodDescriptionstatic <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>black()
static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>blue()
static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>Instantiate a singleton fixed colorer for a certain color.static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>cyan()
static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>darkGray()
Get the color, based on the Drawable object.static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>gray()
static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>green()
static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>magenta()
static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>orange()
static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>pink()
static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>red()
static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>white()
static <D extends org.opentrafficsim.core.animation.Drawable>
FixedColorer<D>yellow()
-
Constructor Details
-
FixedColorer
Initialize the FixedColorer with a color.- Parameters:
color
- Color; the fixed color to use
-
-
Method Details
-
getColor
Get the color, based on the Drawable object. -
create
public static <D extends org.opentrafficsim.core.animation.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
- Type Parameters:
D
- the Drawable type- Returns:
- black color
-
blue
- Type Parameters:
D
- the Drawable type- Returns:
- blue color
-
cyan
- Type Parameters:
D
- the Drawable type- Returns:
- cyan color
-
darkGray
- Type Parameters:
D
- the Drawable type- Returns:
- darkGray color
-
gray
- Type Parameters:
D
- the Drawable type- Returns:
- gray color
-
green
- Type Parameters:
D
- the Drawable type- Returns:
- green color
-
lightGray
- Type Parameters:
D
- the Drawable type- Returns:
- lightGray color
-
magenta
- Type Parameters:
D
- the Drawable type- Returns:
- magenta color
-
orange
- Type Parameters:
D
- the Drawable type- Returns:
- orange color
-
pink
- Type Parameters:
D
- the Drawable type- Returns:
- pink color
-
red
- Type Parameters:
D
- the Drawable type- Returns:
- red color
-
white
- Type Parameters:
D
- the Drawable type- Returns:
- white color
-
yellow
- Type Parameters:
D
- the Drawable type- Returns:
- yellow color
-