1 package org.opentrafficsim.swing.gui;
2
3 import java.awt.Color;
4
5 /**
6 * Contains a background color, foreground color and a font name, to be set throughout all components.
7 * <p>
8 * Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
9 * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>.
10 * <p>
11 * @version $Revision$, $LastChangedDate$, by $Author$, initial version 6 feb. 2018 <br>
12 * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
13 * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
14 * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a>
15 */
16 public enum Appearance
17 {
18
19 /** MOTUS mimic. Grid not visible. */
20 MOTUS("Motus", new Color(236, 233, 216), Color.BLACK, Color.BLACK, "Verdana"),
21
22 /** Green. */
23 FOSIM("Fosim", new Color(240, 240, 240), Color.BLACK, new Color(0, 128, 0), "Verdana"),
24
25 /** Dark. */
26 DARK("Dark", new Color(96, 96, 96), Color.WHITE, Color.DARK_GRAY, "Verdana"),
27
28 /** Gray. */
29 GRAY("Gray", Color.LIGHT_GRAY, Color.BLACK, new Color(96, 96, 96), "Verdana"),
30
31 /** Bright. */
32 BRIGHT("Bright", Color.LIGHT_GRAY, Color.BLACK, Color.WHITE, "Verdana"),
33
34 /** Legacy, as the initial OTS had. */
35 LEGACY("Legacy", new Color(238, 238, 238), Color.BLACK, Color.WHITE, "Dialog"),
36
37 /** Red. */
38 RED("Red", new Color(208, 192, 192), Color.RED.darker().darker(), new Color(208, 192, 192).darker(), "Verdana"),
39
40 /** Green. */
41 GREEN("Green", new Color(192, 208, 192), Color.GREEN.darker().darker(), new Color(192, 208, 192).darker(), "Verdana"),
42
43 /** Blue. */
44 BLUE("Blue", new Color(192, 192, 208), Color.BLUE.darker().darker(), new Color(192, 192, 208).darker(), "Verdana");
45
46 /** Name. */
47 private final String name;
48
49 /** Background color. */
50 private final Color background;
51
52 /** Foreground color. */
53 private final Color foreground;
54
55 /** Backdrop color. (network panel) */
56 private final Color backdrop;
57
58 /** font name. */
59 private final String font;
60
61 /**
62 * Constructor.
63 * @param name String; name
64 * @param background Color; background color
65 * @param foreground Color; foreground color
66 * @param backdrop Color; backdrop color (network panel)
67 * @param font String; font name
68 */
69 Appearance(final String name, final Color background, final Color foreground, final Color backdrop, final String font)
70 {
71 this.name = name;
72 this.background = background;
73 this.foreground = foreground;
74 this.backdrop = backdrop;
75 this.font = font;
76 }
77
78 /**
79 * Returns the name.
80 * @return String; name
81 */
82 public final String getName()
83 {
84 return this.name;
85 }
86
87 /**
88 * Returns the background color.
89 * @return Color; color
90 */
91 public final Color getBackground()
92 {
93 return this.background;
94 }
95
96 /**
97 * Returns the foreground color.
98 * @return Color; color
99 */
100 public final Color getForeground()
101 {
102 return this.foreground;
103 }
104
105 /**
106 * Returns the backdrop color.
107 * @return Color; color
108 */
109 public final Color getBackdrop()
110 {
111 return this.backdrop;
112 }
113
114 /**
115 * Returns the font name.
116 * @return String; font name
117 */
118 public final String getFont()
119 {
120 return this.font;
121 }
122
123 }