Mercurial > projects > dwt-addons
annotate dwtx/draw2d/ColorConstants.d @ 192:c3583c6ec027
Added missing default cases for switch statements
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 03 Nov 2008 22:52:26 +0100 |
parents | 2d6540440fe6 |
children |
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 ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
51 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
52 if( buttonLightest_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
53 buttonLightest_ = getColor(DWT.COLOR_WIDGET_HIGHLIGHT_SHADOW); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
54 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
55 } |
102 | 56 } |
57 return buttonLightest_; | |
58 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
59 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
60 * @see DWT#COLOR_WIDGET_BACKGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
61 */ |
102 | 62 private static Color button_; |
63 public static Color button(){ | |
64 if( button_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
65 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
66 if( button_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
67 button_ = getColor(DWT.COLOR_WIDGET_BACKGROUND); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
68 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
69 } |
102 | 70 } |
71 return button_; | |
72 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
73 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
74 * @see DWT#COLOR_WIDGET_NORMAL_SHADOW |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
75 */ |
102 | 76 private static Color buttonDarker_; |
77 public static Color buttonDarker(){ | |
78 if( buttonDarker_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
79 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
80 if( buttonDarker_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
81 buttonDarker_ = getColor(DWT.COLOR_WIDGET_NORMAL_SHADOW); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
82 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
83 } |
102 | 84 } |
85 return buttonDarker_; | |
86 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
87 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
88 * @see DWT#COLOR_WIDGET_DARK_SHADOW |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
89 */ |
102 | 90 private static Color buttonDarkest_; |
91 public static Color buttonDarkest(){ | |
92 if( buttonDarkest_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
93 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
94 if( buttonDarkest_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
95 buttonDarkest_ = getColor(DWT.COLOR_WIDGET_DARK_SHADOW); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
96 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
97 } |
102 | 98 } |
99 return buttonDarkest_; | |
100 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
101 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
102 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
103 * @see DWT#COLOR_LIST_BACKGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
104 */ |
102 | 105 private static Color listBackground_; |
106 public static Color listBackground(){ | |
107 if( listBackground_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
108 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
109 if( listBackground_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
110 listBackground_ = getColor(DWT.COLOR_LIST_BACKGROUND); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
111 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
112 } |
102 | 113 } |
114 return listBackground_; | |
115 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
116 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
117 * @see DWT#COLOR_LIST_FOREGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
118 */ |
102 | 119 private static Color listForeground_; |
120 public static Color listForeground(){ | |
121 if( listForeground_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
122 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
123 if( listForeground_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
124 listForeground_ = getColor(DWT.COLOR_LIST_FOREGROUND); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
125 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
126 } |
102 | 127 } |
128 return listForeground_; | |
129 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
130 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
131 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
132 * @see DWT#COLOR_WIDGET_BACKGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
133 */ |
102 | 134 private static Color menuBackground_; |
135 public static Color menuBackground(){ | |
136 if( menuBackground_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
137 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
138 if( menuBackground_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
139 menuBackground_ = getColor(DWT.COLOR_WIDGET_BACKGROUND); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
140 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
141 } |
102 | 142 } |
143 return menuBackground_; | |
144 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
145 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
146 * @see DWT#COLOR_WIDGET_FOREGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
147 */ |
102 | 148 private static Color menuForeground_; |
149 public static Color menuForeground(){ | |
150 if( menuForeground_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
151 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
152 if( menuForeground_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
153 menuForeground_ = getColor(DWT.COLOR_WIDGET_FOREGROUND); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
154 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
155 } |
102 | 156 } |
157 return menuForeground_; | |
158 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
159 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
160 * @see DWT#COLOR_LIST_SELECTION |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
161 */ |
102 | 162 private static Color menuBackgroundSelected_; |
163 public static Color menuBackgroundSelected(){ | |
164 if( menuBackgroundSelected_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
165 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
166 if( menuBackgroundSelected_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
167 menuBackgroundSelected_ = getColor(DWT.COLOR_LIST_SELECTION); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
168 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
169 } |
102 | 170 } |
171 return menuBackgroundSelected_; | |
172 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
173 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
174 * @see DWT#COLOR_LIST_SELECTION_TEXT |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
175 */ |
102 | 176 private static Color menuForegroundSelected_; |
177 public static Color menuForegroundSelected(){ | |
178 if( menuForegroundSelected_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
179 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
180 if( menuForegroundSelected_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
181 menuForegroundSelected_ = getColor(DWT.COLOR_LIST_SELECTION_TEXT); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
182 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
183 } |
102 | 184 } |
185 return menuForegroundSelected_; | |
186 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
187 |
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_BACKGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
190 */ |
102 | 191 private static Color titleBackground_; |
192 public static Color titleBackground(){ | |
193 if( titleBackground_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
194 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
195 if( titleBackground_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
196 titleBackground_ = getColor(DWT.COLOR_TITLE_BACKGROUND); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
197 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
198 } |
102 | 199 } |
200 return titleBackground_; | |
201 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
202 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
203 * @see DWT#COLOR_TITLE_BACKGROUND_GRADIENT |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
204 */ |
102 | 205 private static Color titleGradient_; |
206 public static Color titleGradient(){ | |
207 if( titleGradient_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
208 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
209 if( titleGradient_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
210 titleGradient_ = getColor(DWT.COLOR_TITLE_BACKGROUND_GRADIENT); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
211 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
212 } |
102 | 213 } |
214 return titleGradient_; | |
215 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
216 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
217 * @see DWT#COLOR_TITLE_FOREGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
218 */ |
102 | 219 private static Color titleForeground_; |
220 public static Color titleForeground(){ | |
221 if( titleForeground_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
222 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
223 if( titleForeground_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
224 titleForeground_ = getColor(DWT.COLOR_TITLE_FOREGROUND); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
225 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
226 } |
102 | 227 } |
228 return titleForeground_; | |
229 } | |
98
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 * @see DWT#COLOR_TITLE_INACTIVE_FOREGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
232 */ |
102 | 233 private static Color titleInactiveForeground_; |
234 public static Color titleInactiveForeground(){ | |
235 if( titleInactiveForeground_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
236 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
237 if( titleInactiveForeground_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
238 titleInactiveForeground_ = getColor(DWT.COLOR_TITLE_INACTIVE_FOREGROUND); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
239 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
240 } |
102 | 241 } |
242 return titleInactiveForeground_; | |
243 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
244 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
245 * @see DWT#COLOR_TITLE_INACTIVE_BACKGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
246 */ |
102 | 247 private static Color titleInactiveBackground_; |
248 public static Color titleInactiveBackground(){ | |
249 if( titleInactiveBackground_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
250 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
251 if( titleInactiveBackground_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
252 titleInactiveBackground_ = getColor(DWT.COLOR_TITLE_INACTIVE_BACKGROUND); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
253 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
254 } |
102 | 255 } |
256 return titleInactiveBackground_; | |
257 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
258 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
259 * @see DWT#COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
260 */ |
102 | 261 private static Color titleInactiveGradient_; |
262 public static Color titleInactiveGradient(){ | |
263 if( titleInactiveGradient_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
264 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
265 if( titleInactiveGradient_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
266 titleInactiveGradient_ = getColor(DWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
267 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
268 } |
102 | 269 } |
270 return titleInactiveGradient_; | |
271 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
272 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
273 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
274 * @see DWT#COLOR_INFO_FOREGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
275 */ |
102 | 276 private static Color tooltipForeground_; |
277 public static Color tooltipForeground(){ | |
278 if( tooltipForeground_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
279 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
280 if( tooltipForeground_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
281 tooltipForeground_ = getColor(DWT.COLOR_INFO_FOREGROUND); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
282 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
283 } |
102 | 284 } |
285 return tooltipForeground_; | |
286 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
287 /** |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
288 * @see DWT#COLOR_INFO_BACKGROUND |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
289 */ |
102 | 290 private static Color tooltipBackground_; |
291 public static Color tooltipBackground(){ | |
292 if( tooltipBackground_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
293 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
294 if( tooltipBackground_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
295 tooltipBackground_ = getColor(DWT.COLOR_INFO_BACKGROUND); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
296 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
297 } |
102 | 298 } |
299 return tooltipBackground_; | |
300 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
301 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
302 /* |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
303 * Misc. colors |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
304 */ |
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 white_; |
307 public static Color white(){ | |
308 if( white_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
309 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
310 if( white_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
311 white_ = new Color(null, 255, 255, 255); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
312 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
313 } |
102 | 314 } |
315 return white_; | |
316 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
317 /** One of the pre-defined colors */ |
102 | 318 private static Color lightGray_; |
319 public static Color lightGray(){ | |
320 if( lightGray_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
321 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
322 if( lightGray_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
323 lightGray_ = new Color(null, 192, 192, 192); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
324 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
325 } |
102 | 326 } |
327 return lightGray_; | |
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 gray_; |
331 public static Color gray(){ | |
332 if( gray_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
333 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
334 if( gray_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
335 gray_ = new Color(null, 128, 128, 128); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
336 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
337 } |
102 | 338 } |
339 return gray_; | |
340 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
341 /** One of the pre-defined colors */ |
102 | 342 private static Color darkGray_; |
343 public static Color darkGray(){ | |
344 if( darkGray_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
345 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
346 if( darkGray_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
347 darkGray_ = new Color(null, 64, 64, 64); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
348 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
349 } |
102 | 350 } |
351 return darkGray_; | |
352 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
353 /** One of the pre-defined colors */ |
102 | 354 private static Color black_; |
355 public static Color black(){ | |
356 if( black_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
357 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
358 if( black_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
359 black_ = new Color(null, 0, 0, 0); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
360 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
361 } |
102 | 362 } |
363 return black_; | |
364 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
365 /** One of the pre-defined colors */ |
102 | 366 private static Color red_; |
367 public static Color red(){ | |
368 if( red_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
369 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
370 if( red_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
371 red_ = new Color(null, 255, 0, 0); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
372 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
373 } |
102 | 374 } |
375 return red_; | |
376 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
377 /** One of the pre-defined colors */ |
102 | 378 private static Color orange_; |
379 public static Color orange(){ | |
380 if( orange_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
381 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
382 if( orange_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
383 orange_ = new Color(null, 255, 196, 0); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
384 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
385 } |
102 | 386 } |
387 return orange_; | |
388 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
389 /** One of the pre-defined colors */ |
102 | 390 private static Color yellow_; |
391 public static Color yellow(){ | |
392 if( yellow_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
393 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
394 if( yellow_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
395 yellow_ = new Color(null, 255, 255, 0); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
396 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
397 } |
102 | 398 } |
399 return yellow_; | |
400 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
401 /** One of the pre-defined colors */ |
102 | 402 private static Color green_; |
403 public static Color green(){ | |
404 if( green_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
405 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
406 if( green_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
407 green_ = new Color(null, 0, 255, 0); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
408 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
409 } |
102 | 410 } |
411 return green_; | |
412 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
413 /** One of the pre-defined colors */ |
102 | 414 private static Color lightGreen_; |
415 public static Color lightGreen(){ | |
416 if( lightGreen_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
417 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
418 if( lightGreen_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
419 lightGreen_ = new Color(null, 96, 255, 96); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
420 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
421 } |
102 | 422 } |
423 return lightGreen_; | |
424 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
425 /** One of the pre-defined colors */ |
102 | 426 private static Color darkGreen_; |
427 public static Color darkGreen(){ | |
428 if( darkGreen_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
429 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
430 if( darkGreen_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
431 darkGreen_ = new Color(null, 0, 127, 0); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
432 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
433 } |
102 | 434 } |
435 return darkGreen_; | |
436 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
437 /** One of the pre-defined colors */ |
102 | 438 private static Color cyan_; |
439 public static Color cyan(){ | |
440 if( cyan_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
441 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
442 if( cyan_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
443 cyan_ = new Color(null, 0, 255, 255); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
444 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
445 } |
102 | 446 } |
447 return cyan_; | |
448 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
449 /** One of the pre-defined colors */ |
102 | 450 private static Color lightBlue_; |
451 public static Color lightBlue(){ | |
452 if( lightBlue_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
453 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
454 if( lightBlue_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
455 lightBlue_ = new Color(null, 127, 127, 255); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
456 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
457 } |
102 | 458 } |
459 return lightBlue_; | |
460 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
461 /** One of the pre-defined colors */ |
102 | 462 private static Color blue_; |
463 public static Color blue(){ | |
464 if( blue_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
465 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
466 if( blue_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
467 blue_ = new Color(null, 0, 0, 255); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
468 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
469 } |
102 | 470 } |
471 return blue_; | |
472 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
473 /** One of the pre-defined colors */ |
102 | 474 private static Color darkBlue_; |
475 public static Color darkBlue(){ | |
476 if( darkBlue_ is null ){ | |
103
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
477 synchronized( Display.classinfo ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
478 if( darkBlue_ is null ){ |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
479 darkBlue_ = new Color(null, 0, 0, 127); |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
480 } |
2d6540440fe6
Replace static ctors with lazy init.
Frank Benoit <benoit@tionex.de>
parents:
102
diff
changeset
|
481 } |
102 | 482 } |
483 return darkBlue_; | |
484 } | |
98
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
485 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
486 } |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
487 |
95307ad235d9
Added Draw2d code, still work in progress
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
488 |