Mercurial > projects > dwt-addons
annotate dwtx/draw2d/ColorConstants.d @ 102:0de61c6f08ca
Reduce static ctors
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 03 Aug 2008 03:07:30 +0200 |
parents | 95307ad235d9 |
children | 2d6540440fe6 |
rev | line source |
---|---|
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1 /******************************************************************************* |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
2 * Copyright (c) 2000, 2008 IBM Corporation and others. |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
3 * All rights reserved. This program and the accompanying materials |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
5 * which accompanies this distribution, and is available at |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
6 * http://www.eclipse.org/legal/epl-v10.html |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
7 * |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
8 * Contributors: |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
9 * IBM Corporation - initial API and implementation |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
10 * Port to the D programming language: |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
11 * Frank Benoit <benoit@tionex.de> |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
12 *******************************************************************************/ |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
13 module dwtx.draw2d.ColorConstants; |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
14 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
15 import dwt.dwthelper.utils; |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
16 import dwt.dwthelper.Runnable; |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
17 import tango.core.sync.Mutex; |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
18 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
19 import dwt.DWT; |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
20 import dwt.graphics.Color; |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
21 import dwt.widgets.Display; |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
22 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
23 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
24 * A collection of color-related constants. |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
25 */ |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
26 public struct ColorConstants { |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
27 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
28 private static Color getColor(int which) { |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
29 Display display = Display.getCurrent(); |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
30 if (display !is null) |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
31 return display.getSystemColor(which); |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
32 display = Display.getDefault(); |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
33 Color result; |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
34 scope Mutex mutex = new Mutex; |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
35 display.syncExec(dgRunnable( { |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
36 synchronized (mutex) { |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
37 result = Display.getCurrent().getSystemColor(which); |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
38 } |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
39 } )); |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
40 synchronized (mutex) { |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
41 return result; |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
42 } |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
43 } |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
44 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
45 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
46 * @see DWT#COLOR_WIDGET_HIGHLIGHT_SHADOW |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
47 */ |
102 | 48 private static Color buttonLightest_; |
49 public static Color buttonLightest(){ | |
50 if( buttonLightest_ is null ){ | |
51 buttonLightest_ = getColor(DWT.COLOR_WIDGET_HIGHLIGHT_SHADOW); | |
52 } | |
53 return buttonLightest_; | |
54 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
55 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
56 * @see DWT#COLOR_WIDGET_BACKGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
57 */ |
102 | 58 private static Color button_; |
59 public static Color button(){ | |
60 if( button_ is null ){ | |
61 button_ = getColor(DWT.COLOR_WIDGET_BACKGROUND); | |
62 } | |
63 return button_; | |
64 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
65 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
66 * @see DWT#COLOR_WIDGET_NORMAL_SHADOW |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
67 */ |
102 | 68 private static Color buttonDarker_; |
69 public static Color buttonDarker(){ | |
70 if( buttonDarker_ is null ){ | |
71 buttonDarker_ = getColor(DWT.COLOR_WIDGET_NORMAL_SHADOW); | |
72 } | |
73 return buttonDarker_; | |
74 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
75 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
76 * @see DWT#COLOR_WIDGET_DARK_SHADOW |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
77 */ |
102 | 78 private static Color buttonDarkest_; |
79 public static Color buttonDarkest(){ | |
80 if( buttonDarkest_ is null ){ | |
81 buttonDarkest_ = getColor(DWT.COLOR_WIDGET_DARK_SHADOW); | |
82 } | |
83 return buttonDarkest_; | |
84 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
85 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
86 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
87 * @see DWT#COLOR_LIST_BACKGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
88 */ |
102 | 89 private static Color listBackground_; |
90 public static Color listBackground(){ | |
91 if( listBackground_ is null ){ | |
92 listBackground_ = getColor(DWT.COLOR_LIST_BACKGROUND); | |
93 } | |
94 return listBackground_; | |
95 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
96 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
97 * @see DWT#COLOR_LIST_FOREGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
98 */ |
102 | 99 private static Color listForeground_; |
100 public static Color listForeground(){ | |
101 if( listForeground_ is null ){ | |
102 listForeground_ = getColor(DWT.COLOR_LIST_FOREGROUND); | |
103 } | |
104 return listForeground_; | |
105 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
106 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
107 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
108 * @see DWT#COLOR_WIDGET_BACKGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
109 */ |
102 | 110 private static Color menuBackground_; |
111 public static Color menuBackground(){ | |
112 if( menuBackground_ is null ){ | |
113 menuBackground_ = getColor(DWT.COLOR_WIDGET_BACKGROUND); | |
114 } | |
115 return menuBackground_; | |
116 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
117 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
118 * @see DWT#COLOR_WIDGET_FOREGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
119 */ |
102 | 120 private static Color menuForeground_; |
121 public static Color menuForeground(){ | |
122 if( menuForeground_ is null ){ | |
123 menuForeground_ = getColor(DWT.COLOR_WIDGET_FOREGROUND); | |
124 } | |
125 return menuForeground_; | |
126 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
127 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
128 * @see DWT#COLOR_LIST_SELECTION |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
129 */ |
102 | 130 private static Color menuBackgroundSelected_; |
131 public static Color menuBackgroundSelected(){ | |
132 if( menuBackgroundSelected_ is null ){ | |
133 menuBackgroundSelected_ = getColor(DWT.COLOR_LIST_SELECTION); | |
134 } | |
135 return menuBackgroundSelected_; | |
136 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
137 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
138 * @see DWT#COLOR_LIST_SELECTION_TEXT |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
139 */ |
102 | 140 private static Color menuForegroundSelected_; |
141 public static Color menuForegroundSelected(){ | |
142 if( menuForegroundSelected_ is null ){ | |
143 menuForegroundSelected_ = getColor(DWT.COLOR_LIST_SELECTION_TEXT); | |
144 } | |
145 return menuForegroundSelected_; | |
146 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
147 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
148 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
149 * @see DWT#COLOR_TITLE_BACKGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
150 */ |
102 | 151 private static Color titleBackground_; |
152 public static Color titleBackground(){ | |
153 if( titleBackground_ is null ){ | |
154 titleBackground_ = getColor(DWT.COLOR_TITLE_BACKGROUND); | |
155 } | |
156 return titleBackground_; | |
157 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
158 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
159 * @see DWT#COLOR_TITLE_BACKGROUND_GRADIENT |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
160 */ |
102 | 161 private static Color titleGradient_; |
162 public static Color titleGradient(){ | |
163 if( titleGradient_ is null ){ | |
164 titleGradient_ = getColor(DWT.COLOR_TITLE_BACKGROUND_GRADIENT); | |
165 } | |
166 return titleGradient_; | |
167 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
168 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
169 * @see DWT#COLOR_TITLE_FOREGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
170 */ |
102 | 171 private static Color titleForeground_; |
172 public static Color titleForeground(){ | |
173 if( titleForeground_ is null ){ | |
174 titleForeground_ = getColor(DWT.COLOR_TITLE_FOREGROUND); | |
175 } | |
176 return titleForeground_; | |
177 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
178 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
179 * @see DWT#COLOR_TITLE_INACTIVE_FOREGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
180 */ |
102 | 181 private static Color titleInactiveForeground_; |
182 public static Color titleInactiveForeground(){ | |
183 if( titleInactiveForeground_ is null ){ | |
184 titleInactiveForeground_ = getColor(DWT.COLOR_TITLE_INACTIVE_FOREGROUND); | |
185 } | |
186 return titleInactiveForeground_; | |
187 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
188 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
189 * @see DWT#COLOR_TITLE_INACTIVE_BACKGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
190 */ |
102 | 191 private static Color titleInactiveBackground_; |
192 public static Color titleInactiveBackground(){ | |
193 if( titleInactiveBackground_ is null ){ | |
194 titleInactiveBackground_ = getColor(DWT.COLOR_TITLE_INACTIVE_BACKGROUND); | |
195 } | |
196 return titleInactiveBackground_; | |
197 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
198 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
199 * @see DWT#COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
200 */ |
102 | 201 private static Color titleInactiveGradient_; |
202 public static Color titleInactiveGradient(){ | |
203 if( titleInactiveGradient_ is null ){ | |
204 titleInactiveGradient_ = getColor(DWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT); | |
205 } | |
206 return titleInactiveGradient_; | |
207 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
208 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
209 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
210 * @see DWT#COLOR_INFO_FOREGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
211 */ |
102 | 212 private static Color tooltipForeground_; |
213 public static Color tooltipForeground(){ | |
214 if( tooltipForeground_ is null ){ | |
215 tooltipForeground_ = getColor(DWT.COLOR_INFO_FOREGROUND); | |
216 } | |
217 return tooltipForeground_; | |
218 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
219 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
220 * @see DWT#COLOR_INFO_BACKGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
221 */ |
102 | 222 private static Color tooltipBackground_; |
223 public static Color tooltipBackground(){ | |
224 if( tooltipBackground_ is null ){ | |
225 tooltipBackground_ = getColor(DWT.COLOR_INFO_BACKGROUND); | |
226 } | |
227 return tooltipBackground_; | |
228 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
229 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
230 /* |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
231 * Misc. colors |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
232 */ |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
233 /** One of the pre-defined colors */ |
102 | 234 private static Color white_; |
235 public static Color white(){ | |
236 if( white_ is null ){ | |
237 white_ = new Color(null, 255, 255, 255); | |
238 } | |
239 return white_; | |
240 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
241 /** One of the pre-defined colors */ |
102 | 242 private static Color lightGray_; |
243 public static Color lightGray(){ | |
244 if( lightGray_ is null ){ | |
245 lightGray_ = new Color(null, 192, 192, 192); | |
246 } | |
247 return lightGray_; | |
248 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
249 /** One of the pre-defined colors */ |
102 | 250 private static Color gray_; |
251 public static Color gray(){ | |
252 if( gray_ is null ){ | |
253 gray_ = new Color(null, 128, 128, 128); | |
254 } | |
255 return gray_; | |
256 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
257 /** One of the pre-defined colors */ |
102 | 258 private static Color darkGray_; |
259 public static Color darkGray(){ | |
260 if( darkGray_ is null ){ | |
261 darkGray_ = new Color(null, 64, 64, 64); | |
262 } | |
263 return darkGray_; | |
264 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
265 /** One of the pre-defined colors */ |
102 | 266 private static Color black_; |
267 public static Color black(){ | |
268 if( black_ is null ){ | |
269 black_ = new Color(null, 0, 0, 0); | |
270 } | |
271 return black_; | |
272 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
273 /** One of the pre-defined colors */ |
102 | 274 private static Color red_; |
275 public static Color red(){ | |
276 if( red_ is null ){ | |
277 red_ = new Color(null, 255, 0, 0); | |
278 } | |
279 return red_; | |
280 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
281 /** One of the pre-defined colors */ |
102 | 282 private static Color orange_; |
283 public static Color orange(){ | |
284 if( orange_ is null ){ | |
285 orange_ = new Color(null, 255, 196, 0); | |
286 } | |
287 return orange_; | |
288 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
289 /** One of the pre-defined colors */ |
102 | 290 private static Color yellow_; |
291 public static Color yellow(){ | |
292 if( yellow_ is null ){ | |
293 yellow_ = new Color(null, 255, 255, 0); | |
294 } | |
295 return yellow_; | |
296 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
297 /** One of the pre-defined colors */ |
102 | 298 private static Color green_; |
299 public static Color green(){ | |
300 if( green_ is null ){ | |
301 green_ = new Color(null, 0, 255, 0); | |
302 } | |
303 return green_; | |
304 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
305 /** One of the pre-defined colors */ |
102 | 306 private static Color lightGreen_; |
307 public static Color lightGreen(){ | |
308 if( lightGreen_ is null ){ | |
309 lightGreen_ = new Color(null, 96, 255, 96); | |
310 } | |
311 return lightGreen_; | |
312 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
313 /** One of the pre-defined colors */ |
102 | 314 private static Color darkGreen_; |
315 public static Color darkGreen(){ | |
316 if( darkGreen_ is null ){ | |
317 darkGreen_ = new Color(null, 0, 127, 0); | |
318 } | |
319 return darkGreen_; | |
320 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
321 /** One of the pre-defined colors */ |
102 | 322 private static Color cyan_; |
323 public static Color cyan(){ | |
324 if( cyan_ is null ){ | |
325 cyan_ = new Color(null, 0, 255, 255); | |
326 } | |
327 return cyan_; | |
328 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
329 /** One of the pre-defined colors */ |
102 | 330 private static Color lightBlue_; |
331 public static Color lightBlue(){ | |
332 if( lightBlue_ is null ){ | |
333 lightBlue_ = new Color(null, 127, 127, 255); | |
334 } | |
335 return lightBlue_; | |
336 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
337 /** One of the pre-defined colors */ |
102 | 338 private static Color blue_; |
339 public static Color blue(){ | |
340 if( blue_ is null ){ | |
341 blue_ = new Color(null, 0, 0, 255); | |
342 } | |
343 return blue_; | |
344 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
345 /** One of the pre-defined colors */ |
102 | 346 private static Color darkBlue_; |
347 public static Color darkBlue(){ | |
348 if( darkBlue_ is null ){ | |
349 darkBlue_ = new Color(null, 0, 0, 127); | |
350 } | |
351 return darkBlue_; | |
352 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
353 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
354 } |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
355 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
356 |