author | dxu |
Thu, 04 Apr 2013 15:39:17 -0700 | |
changeset 16734 | da1901d79073 |
parent 12813 | c10ab96dcf41 |
child 24151 | a558c7acb1ad |
permissions | -rw-r--r-- |
12047 | 1 |
/* |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
2 |
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
12047 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
26 |
package apple.laf; |
|
27 |
||
28 |
import java.lang.reflect.Field; |
|
29 |
import java.nio.ByteBuffer; |
|
30 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
31 |
import java.lang.annotation.Native; |
12813
c10ab96dcf41
7170969: Add @GenerateNativeHeader to classes whose fields need to be exported for JNI
erikj
parents:
12047
diff
changeset
|
32 |
|
12047 | 33 |
public final class JRSUIConstants { |
34 |
private static native long getPtrForConstant(final int constant); |
|
35 |
||
36 |
static class Key { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
37 |
@Native protected static final int _value = 20; |
12047 | 38 |
public static final Key VALUE = new Key(_value); |
39 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
40 |
@Native protected static final int _thumbProportion = 24; |
12047 | 41 |
public static final Key THUMB_PROPORTION = new Key(_thumbProportion); |
42 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
43 |
@Native protected static final int _thumbStart = 25; |
12047 | 44 |
public static final Key THUMB_START = new Key(_thumbStart); |
45 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
46 |
@Native protected static final int _windowTitleBarHeight = 28; |
12047 | 47 |
public static final Key WINDOW_TITLE_BAR_HEIGHT = new Key(_windowTitleBarHeight); |
48 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
49 |
@Native protected static final int _animationFrame = 23; |
12047 | 50 |
public static final Key ANIMATION_FRAME = new Key(_animationFrame); |
51 |
||
52 |
final int constant; |
|
53 |
private long ptr; |
|
54 |
||
55 |
private Key(final int constant) { |
|
56 |
this.constant = constant; |
|
57 |
} |
|
58 |
||
59 |
long getConstantPtr() { |
|
60 |
if (ptr != 0) return ptr; |
|
61 |
ptr = getPtrForConstant(constant); |
|
62 |
if (ptr != 0) return ptr; |
|
63 |
throw new RuntimeException("Constant not implemented in native: " + this); |
|
64 |
} |
|
65 |
||
66 |
public String toString() { |
|
67 |
return getConstantName(this) + (ptr == 0 ? "(unlinked)" : ""); |
|
68 |
} |
|
69 |
} |
|
70 |
||
71 |
static class DoubleValue { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
72 |
@Native protected static final byte TYPE_CODE = 1; |
12047 | 73 |
|
74 |
final double doubleValue; |
|
75 |
||
76 |
DoubleValue(final double doubleValue) { |
|
77 |
this.doubleValue = doubleValue; |
|
78 |
} |
|
79 |
||
80 |
public byte getTypeCode() { |
|
81 |
return TYPE_CODE; |
|
82 |
} |
|
83 |
||
84 |
public void putValueInBuffer(final ByteBuffer buffer) { |
|
85 |
buffer.putDouble(doubleValue); |
|
86 |
} |
|
87 |
||
88 |
public boolean equals(final Object obj) { |
|
89 |
return (obj instanceof DoubleValue) && (((DoubleValue)obj).doubleValue == doubleValue); |
|
90 |
} |
|
91 |
||
92 |
public int hashCode() { |
|
93 |
final long bits = Double.doubleToLongBits(doubleValue); |
|
94 |
return (int)(bits ^ (bits >>> 32)); |
|
95 |
} |
|
96 |
||
97 |
public String toString() { |
|
98 |
return Double.toString(doubleValue); |
|
99 |
} |
|
100 |
} |
|
101 |
||
102 |
||
103 |
static class PropertyEncoding { |
|
104 |
final long mask; |
|
105 |
final byte shift; |
|
106 |
||
107 |
PropertyEncoding(final long mask, final byte shift) { |
|
108 |
this.mask = mask; |
|
109 |
this.shift = shift; |
|
110 |
} |
|
111 |
} |
|
112 |
||
113 |
static class Property { |
|
114 |
final PropertyEncoding encoding; |
|
115 |
final long value; |
|
116 |
final byte ordinal; |
|
117 |
||
118 |
Property(final PropertyEncoding encoding, final byte ordinal) { |
|
119 |
this.encoding = encoding; |
|
120 |
this.value = ((long)ordinal) << encoding.shift; |
|
121 |
this.ordinal = ordinal; |
|
122 |
} |
|
123 |
||
124 |
/** |
|
125 |
* Applies this property value to the provided state |
|
126 |
* @param encodedState the incoming JRSUI encoded state |
|
127 |
* @return the composite of the provided JRSUI encoded state and this value |
|
128 |
*/ |
|
129 |
public long apply(final long encodedState) { |
|
130 |
return (encodedState & ~encoding.mask) | value; |
|
131 |
} |
|
132 |
||
133 |
public String toString() { |
|
134 |
return getConstantName(this); |
|
135 |
} |
|
136 |
} |
|
137 |
||
138 |
public static class Size extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
139 |
@Native private static final byte SHIFT = 0; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
140 |
@Native private static final byte SIZE = 3; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
141 |
@Native private static final long MASK = (long)0x7 << SHIFT; |
12047 | 142 |
private static final PropertyEncoding size = new PropertyEncoding(MASK, SHIFT); |
143 |
||
144 |
Size(final byte value) { |
|
145 |
super(size, value); |
|
146 |
} |
|
147 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
148 |
@Native private static final byte _mini = 1; |
12047 | 149 |
public static final Size MINI = new Size(_mini); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
150 |
@Native private static final byte _small = 2; |
12047 | 151 |
public static final Size SMALL = new Size(_small); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
152 |
@Native private static final byte _regular = 3; |
12047 | 153 |
public static final Size REGULAR = new Size(_regular); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
154 |
@Native private static final byte _large = 4; |
12047 | 155 |
public static final Size LARGE = new Size(_large); |
156 |
} |
|
157 |
||
158 |
public static class State extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
159 |
@Native private static final byte SHIFT = Size.SHIFT + Size.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
160 |
@Native private static final byte SIZE = 4; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
161 |
@Native private static final long MASK = (long)0xF << SHIFT; |
12047 | 162 |
private static final PropertyEncoding state = new PropertyEncoding(MASK, SHIFT); |
163 |
||
164 |
State(final byte value) { |
|
165 |
super(state, value); |
|
166 |
} |
|
167 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
168 |
@Native private static final byte _active = 1; |
12047 | 169 |
public static final State ACTIVE = new State(_active); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
170 |
@Native private static final byte _inactive = 2; |
12047 | 171 |
public static final State INACTIVE = new State(_inactive); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
172 |
@Native private static final byte _disabled = 3; |
12047 | 173 |
public static final State DISABLED = new State(_disabled); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
174 |
@Native private static final byte _pressed = 4; |
12047 | 175 |
public static final State PRESSED = new State(_pressed); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
176 |
@Native private static final byte _pulsed = 5; |
12047 | 177 |
public static final State PULSED = new State(_pulsed); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
178 |
@Native private static final byte _rollover = 6; |
12047 | 179 |
public static final State ROLLOVER = new State(_rollover); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
180 |
@Native private static final byte _drag = 7; |
12047 | 181 |
public static final State DRAG = new State(_drag); |
182 |
} |
|
183 |
||
184 |
public static class Direction extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
185 |
@Native private static final byte SHIFT = State.SHIFT + State.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
186 |
@Native private static final byte SIZE = 4; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
187 |
@Native private static final long MASK = (long)0xF << SHIFT; |
12047 | 188 |
private static final PropertyEncoding direction = new PropertyEncoding(MASK, SHIFT); |
189 |
||
190 |
Direction(final byte value) { |
|
191 |
super(direction, value); |
|
192 |
} |
|
193 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
194 |
@Native private static final byte _none = 1; |
12047 | 195 |
public static final Direction NONE = new Direction(_none); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
196 |
@Native private static final byte _up = 2; |
12047 | 197 |
public static final Direction UP = new Direction(_up); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
198 |
@Native private static final byte _down = 3; |
12047 | 199 |
public static final Direction DOWN = new Direction(_down); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
200 |
@Native private static final byte _left = 4; |
12047 | 201 |
public static final Direction LEFT = new Direction(_left); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
202 |
@Native private static final byte _right = 5; |
12047 | 203 |
public static final Direction RIGHT = new Direction(_right); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
204 |
@Native private static final byte _north = 6; |
12047 | 205 |
public static final Direction NORTH = new Direction(_north); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
206 |
@Native private static final byte _south = 7; |
12047 | 207 |
public static final Direction SOUTH = new Direction(_south); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
208 |
@Native private static final byte _east = 8; |
12047 | 209 |
public static final Direction EAST = new Direction(_east); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
210 |
@Native private static final byte _west = 9; |
12047 | 211 |
public static final Direction WEST = new Direction(_west); |
212 |
} |
|
213 |
||
214 |
public static class Orientation extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
215 |
@Native private static final byte SHIFT = Direction.SHIFT + Direction.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
216 |
@Native private static final byte SIZE = 2; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
217 |
@Native private static final long MASK = (long)0x3 << SHIFT; |
12047 | 218 |
private static final PropertyEncoding orientation = new PropertyEncoding(MASK, SHIFT); |
219 |
||
220 |
Orientation(final byte value) { |
|
221 |
super(orientation, value); |
|
222 |
} |
|
223 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
224 |
@Native private static final byte _horizontal = 1; |
12047 | 225 |
public static final Orientation HORIZONTAL = new Orientation(_horizontal); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
226 |
@Native private static final byte _vertical = 2; |
12047 | 227 |
public static final Orientation VERTICAL = new Orientation(_vertical); |
228 |
} |
|
229 |
||
230 |
public static class AlignmentVertical extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
231 |
@Native private static final byte SHIFT = Orientation.SHIFT + Orientation.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
232 |
@Native private static final byte SIZE = 2; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
233 |
@Native private static final long MASK = (long)0x3 << SHIFT; |
12047 | 234 |
private static final PropertyEncoding alignmentVertical = new PropertyEncoding(MASK, SHIFT); |
235 |
||
236 |
AlignmentVertical(final byte value){ |
|
237 |
super(alignmentVertical, value); |
|
238 |
} |
|
239 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
240 |
@Native private static final byte _top = 1; |
12047 | 241 |
public static final AlignmentVertical TOP = new AlignmentVertical(_top); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
242 |
@Native private static final byte _center = 2; |
12047 | 243 |
public static final AlignmentVertical CENTER = new AlignmentVertical(_center); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
244 |
@Native private static final byte _bottom = 3; |
12047 | 245 |
public static final AlignmentVertical BOTTOM = new AlignmentVertical(_bottom); |
246 |
} |
|
247 |
||
248 |
public static class AlignmentHorizontal extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
249 |
@Native private static final byte SHIFT = AlignmentVertical.SHIFT + AlignmentVertical.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
250 |
@Native private static final byte SIZE = 2; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
251 |
@Native private static final long MASK = (long)0x3 << SHIFT; |
12047 | 252 |
private static final PropertyEncoding alignmentHorizontal = new PropertyEncoding(MASK, SHIFT); |
253 |
||
254 |
AlignmentHorizontal(final byte value){ |
|
255 |
super(alignmentHorizontal, value); |
|
256 |
} |
|
257 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
258 |
@Native private static final byte _left = 1; |
12047 | 259 |
public static final AlignmentHorizontal LEFT = new AlignmentHorizontal(_left); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
260 |
@Native private static final byte _center = 2; |
12047 | 261 |
public static final AlignmentHorizontal CENTER = new AlignmentHorizontal(_center); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
262 |
@Native private static final byte _right = 3; |
12047 | 263 |
public static final AlignmentHorizontal RIGHT = new AlignmentHorizontal(_right); |
264 |
} |
|
265 |
||
266 |
public static class SegmentPosition extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
267 |
@Native private static final byte SHIFT = AlignmentHorizontal.SHIFT + AlignmentHorizontal.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
268 |
@Native private static final byte SIZE = 3; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
269 |
@Native private static final long MASK = (long)0x7 << SHIFT; |
12047 | 270 |
private static final PropertyEncoding segmentPosition = new PropertyEncoding(MASK, SHIFT); |
271 |
||
272 |
SegmentPosition(final byte value) { |
|
273 |
super(segmentPosition, value); |
|
274 |
} |
|
275 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
276 |
@Native private static final byte _first = 1; |
12047 | 277 |
public static final SegmentPosition FIRST = new SegmentPosition(_first); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
278 |
@Native private static final byte _middle = 2; |
12047 | 279 |
public static final SegmentPosition MIDDLE = new SegmentPosition(_middle); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
280 |
@Native private static final byte _last = 3; |
12047 | 281 |
public static final SegmentPosition LAST = new SegmentPosition(_last); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
282 |
@Native private static final byte _only = 4; |
12047 | 283 |
public static final SegmentPosition ONLY = new SegmentPosition(_only); |
284 |
} |
|
285 |
||
286 |
public static class ScrollBarPart extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
287 |
@Native private static final byte SHIFT = SegmentPosition.SHIFT + SegmentPosition.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
288 |
@Native private static final byte SIZE = 4; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
289 |
@Native private static final long MASK = (long)0xF << SHIFT; |
12047 | 290 |
private static final PropertyEncoding scrollBarPart = new PropertyEncoding(MASK, SHIFT); |
291 |
||
292 |
ScrollBarPart(final byte value) { |
|
293 |
super(scrollBarPart, value); |
|
294 |
} |
|
295 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
296 |
@Native private static final byte _none = 1; |
12047 | 297 |
public static final ScrollBarPart NONE = new ScrollBarPart(_none); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
298 |
@Native private static final byte _thumb = 2; |
12047 | 299 |
public static final ScrollBarPart THUMB = new ScrollBarPart(_thumb); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
300 |
@Native private static final byte _arrowMin = 3; |
12047 | 301 |
public static final ScrollBarPart ARROW_MIN = new ScrollBarPart(_arrowMin); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
302 |
@Native private static final byte _arrowMax = 4; |
12047 | 303 |
public static final ScrollBarPart ARROW_MAX = new ScrollBarPart(_arrowMax); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
304 |
@Native private static final byte _arrowMaxInside = 5; |
12047 | 305 |
public static final ScrollBarPart ARROW_MAX_INSIDE = new ScrollBarPart(_arrowMaxInside); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
306 |
@Native private static final byte _arrowMinInside = 6; |
12047 | 307 |
public static final ScrollBarPart ARROW_MIN_INSIDE = new ScrollBarPart(_arrowMinInside); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
308 |
@Native private static final byte _trackMin = 7; |
12047 | 309 |
public static final ScrollBarPart TRACK_MIN = new ScrollBarPart(_trackMin); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
310 |
@Native private static final byte _trackMax = 8; |
12047 | 311 |
public static final ScrollBarPart TRACK_MAX = new ScrollBarPart(_trackMax); |
312 |
} |
|
313 |
||
314 |
public static class Variant extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
315 |
@Native private static final byte SHIFT = ScrollBarPart.SHIFT + ScrollBarPart.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
316 |
@Native private static final byte SIZE = 4; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
317 |
@Native private static final long MASK = (long)0xF << SHIFT; |
12047 | 318 |
private static final PropertyEncoding variant = new PropertyEncoding(MASK, SHIFT); |
319 |
||
320 |
Variant(final byte value) { |
|
321 |
super(variant, value); |
|
322 |
} |
|
323 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
324 |
@Native private static final byte _menuGlyph = 1; |
12047 | 325 |
public static final Variant MENU_GLYPH = new Variant(_menuGlyph); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
326 |
@Native private static final byte _menuPopup = Variant._menuGlyph + 1; |
12047 | 327 |
public static final Variant MENU_POPUP = new Variant(_menuPopup); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
328 |
@Native private static final byte _menuPulldown = Variant._menuPopup + 1; |
12047 | 329 |
public static final Variant MENU_PULLDOWN = new Variant(_menuPulldown); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
330 |
@Native private static final byte _menuHierarchical = Variant._menuPulldown + 1; |
12047 | 331 |
public static final Variant MENU_HIERARCHICAL = new Variant(_menuHierarchical); |
332 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
333 |
@Native private static final byte _gradientListBackgroundEven = Variant._menuHierarchical + 1; |
12047 | 334 |
public static final Variant GRADIENT_LIST_BACKGROUND_EVEN = new Variant(_gradientListBackgroundEven); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
335 |
@Native private static final byte _gradientListBackgroundOdd = Variant._gradientListBackgroundEven + 1; |
12047 | 336 |
public static final Variant GRADIENT_LIST_BACKGROUND_ODD = new Variant(_gradientListBackgroundOdd); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
337 |
@Native private static final byte _gradientSideBar = Variant._gradientListBackgroundOdd + 1; |
12047 | 338 |
public static final Variant GRADIENT_SIDE_BAR = new Variant(_gradientSideBar); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
339 |
@Native private static final byte _gradientSideBarSelection = Variant._gradientSideBar + 1; |
12047 | 340 |
public static final Variant GRADIENT_SIDE_BAR_SELECTION = new Variant(_gradientSideBarSelection); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
341 |
@Native private static final byte _gradientSideBarFocusedSelection = Variant._gradientSideBarSelection + 1; |
12047 | 342 |
public static final Variant GRADIENT_SIDE_BAR_FOCUSED_SELECTION = new Variant(_gradientSideBarFocusedSelection); |
343 |
} |
|
344 |
||
345 |
public static class WindowType extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
346 |
@Native private static final byte SHIFT = Variant.SHIFT + Variant.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
347 |
@Native private static final byte SIZE = 2; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
348 |
@Native private static final long MASK = (long)0x3 << SHIFT; |
12047 | 349 |
private static final PropertyEncoding windowType = new PropertyEncoding(MASK, SHIFT); |
350 |
||
351 |
WindowType(final byte value){ |
|
352 |
super(windowType, value); |
|
353 |
} |
|
354 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
355 |
@Native private static final byte _document = 1; |
12047 | 356 |
public static final WindowType DOCUMENT = new WindowType(_document); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
357 |
@Native private static final byte _utility = 2; |
12047 | 358 |
public static final WindowType UTILITY = new WindowType(_utility); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
359 |
@Native private static final byte _titlelessUtility = 3; |
12047 | 360 |
public static final WindowType TITLELESS_UTILITY = new WindowType(_titlelessUtility); |
361 |
} |
|
362 |
||
363 |
public static class Focused extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
364 |
@Native private static final byte SHIFT = WindowType.SHIFT + WindowType.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
365 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
366 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 367 |
private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT); |
368 |
||
369 |
Focused(final byte value) { |
|
370 |
super(focused, value); |
|
371 |
} |
|
372 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
373 |
@Native private static final byte _no = 0; |
12047 | 374 |
public static final Focused NO = new Focused(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
375 |
@Native private static final byte _yes = 1; |
12047 | 376 |
public static final Focused YES = new Focused(_yes); |
377 |
} |
|
378 |
||
379 |
public static class IndicatorOnly extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
380 |
@Native private static final byte SHIFT = Focused.SHIFT + Focused.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
381 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
382 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 383 |
private static final PropertyEncoding indicatorOnly = new PropertyEncoding(MASK, SHIFT); |
384 |
||
385 |
IndicatorOnly(final byte value) { |
|
386 |
super(indicatorOnly, value); |
|
387 |
} |
|
388 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
389 |
@Native private static final byte _no = 0; |
12047 | 390 |
public static final IndicatorOnly NO = new IndicatorOnly(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
391 |
@Native private static final byte _yes = 1; |
12047 | 392 |
public static final IndicatorOnly YES = new IndicatorOnly(_yes); |
393 |
} |
|
394 |
||
395 |
public static class NoIndicator extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
396 |
@Native private static final byte SHIFT = IndicatorOnly.SHIFT + IndicatorOnly.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
397 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
398 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 399 |
private static final PropertyEncoding noIndicator = new PropertyEncoding(MASK, SHIFT); |
400 |
||
401 |
NoIndicator(final byte value) { |
|
402 |
super(noIndicator, value); |
|
403 |
} |
|
404 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
405 |
@Native private static final byte _no = 0; |
12047 | 406 |
public static final NoIndicator NO = new NoIndicator(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
407 |
@Native private static final byte _yes = 1; |
12047 | 408 |
public static final NoIndicator YES = new NoIndicator(_yes); |
409 |
} |
|
410 |
||
411 |
public static class ArrowsOnly extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
412 |
@Native private static final byte SHIFT = NoIndicator.SHIFT + NoIndicator.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
413 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
414 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 415 |
private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT); |
416 |
||
417 |
ArrowsOnly(final byte value) { |
|
418 |
super(focused, value); |
|
419 |
} |
|
420 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
421 |
@Native private static final byte _no = 0; |
12047 | 422 |
public static final ArrowsOnly NO = new ArrowsOnly(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
423 |
@Native private static final byte _yes = 1; |
12047 | 424 |
public static final ArrowsOnly YES = new ArrowsOnly(_yes); |
425 |
} |
|
426 |
||
427 |
public static class FrameOnly extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
428 |
@Native private static final byte SHIFT = ArrowsOnly.SHIFT + ArrowsOnly.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
429 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
430 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 431 |
private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT); |
432 |
||
433 |
FrameOnly(final byte value) { |
|
434 |
super(focused, value); |
|
435 |
} |
|
436 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
437 |
@Native private static final byte _no = 0; |
12047 | 438 |
public static final FrameOnly NO = new FrameOnly(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
439 |
@Native private static final byte _yes = 1; |
12047 | 440 |
public static final FrameOnly YES = new FrameOnly(_yes); |
441 |
} |
|
442 |
||
443 |
public static class SegmentTrailingSeparator extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
444 |
@Native private static final byte SHIFT = FrameOnly.SHIFT + FrameOnly.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
445 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
446 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 447 |
private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT); |
448 |
||
449 |
SegmentTrailingSeparator(final byte value) { |
|
450 |
super(focused, value); |
|
451 |
} |
|
452 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
453 |
@Native private static final byte _no = 0; |
12047 | 454 |
public static final SegmentTrailingSeparator NO = new SegmentTrailingSeparator(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
455 |
@Native private static final byte _yes = 1; |
12047 | 456 |
public static final SegmentTrailingSeparator YES = new SegmentTrailingSeparator(_yes); |
457 |
} |
|
458 |
||
459 |
public static class SegmentLeadingSeparator extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
460 |
@Native private static final byte SHIFT = SegmentTrailingSeparator.SHIFT + SegmentTrailingSeparator.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
461 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
462 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 463 |
private static final PropertyEncoding leadingSeparator = new PropertyEncoding(MASK, SHIFT); |
464 |
||
465 |
SegmentLeadingSeparator(final byte value) { |
|
466 |
super(leadingSeparator, value); |
|
467 |
} |
|
468 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
469 |
@Native private static final byte _no = 0; |
12047 | 470 |
public static final SegmentLeadingSeparator NO = new SegmentLeadingSeparator(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
471 |
@Native private static final byte _yes = 1; |
12047 | 472 |
public static final SegmentLeadingSeparator YES = new SegmentLeadingSeparator(_yes); |
473 |
} |
|
474 |
||
475 |
public static class NothingToScroll extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
476 |
@Native private static final byte SHIFT = SegmentLeadingSeparator.SHIFT + SegmentLeadingSeparator.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
477 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
478 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 479 |
private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT); |
480 |
||
481 |
NothingToScroll(final byte value) { |
|
482 |
super(focused, value); |
|
483 |
} |
|
484 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
485 |
@Native private static final byte _no = 0; |
12047 | 486 |
public static final NothingToScroll NO = new NothingToScroll(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
487 |
@Native private static final byte _yes = 1; |
12047 | 488 |
public static final NothingToScroll YES = new NothingToScroll(_yes); |
489 |
} |
|
490 |
||
491 |
public static class WindowTitleBarSeparator extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
492 |
@Native private static final byte SHIFT = NothingToScroll.SHIFT + NothingToScroll.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
493 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
494 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 495 |
private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT); |
496 |
||
497 |
WindowTitleBarSeparator(final byte value) { |
|
498 |
super(focused, value); |
|
499 |
} |
|
500 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
501 |
@Native private static final byte _no = 0; |
12047 | 502 |
public static final WindowTitleBarSeparator NO = new WindowTitleBarSeparator(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
503 |
@Native private static final byte _yes = 1; |
12047 | 504 |
public static final WindowTitleBarSeparator YES = new WindowTitleBarSeparator(_yes); |
505 |
} |
|
506 |
||
507 |
public static class WindowClipCorners extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
508 |
@Native private static final byte SHIFT = WindowTitleBarSeparator.SHIFT + WindowTitleBarSeparator.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
509 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
510 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 511 |
private static final PropertyEncoding focused = new PropertyEncoding(MASK, SHIFT); |
512 |
||
513 |
WindowClipCorners(final byte value) { |
|
514 |
super(focused, value); |
|
515 |
} |
|
516 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
517 |
@Native private static final byte _no = 0; |
12047 | 518 |
public static final WindowClipCorners NO = new WindowClipCorners(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
519 |
@Native private static final byte _yes = 1; |
12047 | 520 |
public static final WindowClipCorners YES = new WindowClipCorners(_yes); |
521 |
} |
|
522 |
||
523 |
public static class ShowArrows extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
524 |
@Native private static final byte SHIFT = WindowClipCorners.SHIFT + WindowClipCorners.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
525 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
526 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 527 |
private static final PropertyEncoding showArrows = new PropertyEncoding(MASK, SHIFT); |
528 |
||
529 |
ShowArrows(final byte value) { |
|
530 |
super(showArrows, value); |
|
531 |
} |
|
532 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
533 |
@Native private static final byte _no = 0; |
12047 | 534 |
public static final ShowArrows NO = new ShowArrows(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
535 |
@Native private static final byte _yes = 1; |
12047 | 536 |
public static final ShowArrows YES = new ShowArrows(_yes); |
537 |
} |
|
538 |
||
539 |
public static class BooleanValue extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
540 |
@Native private static final byte SHIFT = ShowArrows.SHIFT + ShowArrows.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
541 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
542 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 543 |
private static final PropertyEncoding booleanValue = new PropertyEncoding(MASK, SHIFT); |
544 |
||
545 |
BooleanValue(final byte value) { |
|
546 |
super(booleanValue, value); |
|
547 |
} |
|
548 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
549 |
@Native private static final byte _no = 0; |
12047 | 550 |
public static final BooleanValue NO = new BooleanValue(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
551 |
@Native private static final byte _yes = 1; |
12047 | 552 |
public static final BooleanValue YES = new BooleanValue(_yes); |
553 |
} |
|
554 |
||
555 |
public static class Animating extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
556 |
@Native private static final byte SHIFT = BooleanValue.SHIFT + BooleanValue.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
557 |
@Native private static final byte SIZE = 1; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
558 |
@Native private static final long MASK = (long)0x1 << SHIFT; |
12047 | 559 |
private static final PropertyEncoding animating = new PropertyEncoding(MASK, SHIFT); |
560 |
||
561 |
Animating(final byte value) { |
|
562 |
super(animating, value); |
|
563 |
} |
|
564 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
565 |
@Native private static final byte _no = 0; |
12047 | 566 |
public static final Animating NO = new Animating(_no); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
567 |
@Native private static final byte _yes = 1; |
12047 | 568 |
public static final Animating YES = new Animating(_yes); |
569 |
} |
|
570 |
||
571 |
public static class Widget extends Property { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
572 |
@Native private static final byte SHIFT = Animating.SHIFT + Animating.SIZE; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
573 |
@Native private static final byte SIZE = 7; |
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
574 |
@Native private static final long MASK = (long)0x7F << SHIFT; |
12047 | 575 |
private static final PropertyEncoding widget = new PropertyEncoding(MASK, SHIFT); |
576 |
||
577 |
Widget(final byte constant) { |
|
578 |
super(widget, constant); |
|
579 |
} |
|
580 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
581 |
@Native private static final byte _background = 1; |
12047 | 582 |
public static final Widget BACKGROUND = new Widget(_background); |
583 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
584 |
@Native private static final byte _buttonBevel = _background + 1; |
12047 | 585 |
public static final Widget BUTTON_BEVEL = new Widget(_buttonBevel); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
586 |
@Native private static final byte _buttonBevelInset = _buttonBevel + 1; |
12047 | 587 |
public static final Widget BUTTON_BEVEL_INSET = new Widget(_buttonBevelInset); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
588 |
@Native private static final byte _buttonBevelRound = _buttonBevelInset + 1; |
12047 | 589 |
public static final Widget BUTTON_BEVEL_ROUND = new Widget(_buttonBevelRound); |
590 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
591 |
@Native private static final byte _buttonCheckBox = _buttonBevelRound + 1; |
12047 | 592 |
public static final Widget BUTTON_CHECK_BOX = new Widget(_buttonCheckBox); |
593 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
594 |
@Native private static final byte _buttonComboBox = _buttonCheckBox + 1; |
12047 | 595 |
public static final Widget BUTTON_COMBO_BOX = new Widget(_buttonComboBox); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
596 |
@Native private static final byte _buttonComboBoxInset = _buttonComboBox + 1; |
12047 | 597 |
public static final Widget BUTTON_COMBO_BOX_INSET = new Widget(_buttonComboBoxInset); // not hooked up in JRSUIConstants.m |
598 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
599 |
@Native private static final byte _buttonDisclosure = _buttonComboBoxInset + 1; |
12047 | 600 |
public static final Widget BUTTON_DISCLOSURE = new Widget(_buttonDisclosure); |
601 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
602 |
@Native private static final byte _buttonListHeader = _buttonDisclosure + 1; |
12047 | 603 |
public static final Widget BUTTON_LIST_HEADER = new Widget(_buttonListHeader); |
604 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
605 |
@Native private static final byte _buttonLittleArrows = _buttonListHeader + 1; |
12047 | 606 |
public static final Widget BUTTON_LITTLE_ARROWS = new Widget(_buttonLittleArrows); |
607 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
608 |
@Native private static final byte _buttonPopDown = _buttonLittleArrows + 1; |
12047 | 609 |
public static final Widget BUTTON_POP_DOWN = new Widget(_buttonPopDown); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
610 |
@Native private static final byte _buttonPopDownInset = _buttonPopDown + 1; |
12047 | 611 |
public static final Widget BUTTON_POP_DOWN_INSET = new Widget(_buttonPopDownInset); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
612 |
@Native private static final byte _buttonPopDownSquare = _buttonPopDownInset + 1; |
12047 | 613 |
public static final Widget BUTTON_POP_DOWN_SQUARE = new Widget(_buttonPopDownSquare); |
614 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
615 |
@Native private static final byte _buttonPopUp = _buttonPopDownSquare + 1; |
12047 | 616 |
public static final Widget BUTTON_POP_UP = new Widget(_buttonPopUp); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
617 |
@Native private static final byte _buttonPopUpInset = _buttonPopUp + 1; |
12047 | 618 |
public static final Widget BUTTON_POP_UP_INSET = new Widget(_buttonPopUpInset); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
619 |
@Native private static final byte _buttonPopUpSquare = _buttonPopUpInset + 1; |
12047 | 620 |
public static final Widget BUTTON_POP_UP_SQUARE = new Widget(_buttonPopUpSquare); |
621 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
622 |
@Native private static final byte _buttonPush = _buttonPopUpSquare + 1; |
12047 | 623 |
public static final Widget BUTTON_PUSH = new Widget(_buttonPush); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
624 |
@Native private static final byte _buttonPushScope = _buttonPush + 1; |
12047 | 625 |
public static final Widget BUTTON_PUSH_SCOPE = new Widget(_buttonPushScope); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
626 |
@Native private static final byte _buttonPushScope2 = _buttonPushScope + 1; |
12047 | 627 |
public static final Widget BUTTON_PUSH_SCOPE2 = new Widget(_buttonPushScope2); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
628 |
@Native private static final byte _buttonPushTextured = _buttonPushScope2 + 1; |
12047 | 629 |
public static final Widget BUTTON_PUSH_TEXTURED = new Widget(_buttonPushTextured); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
630 |
@Native private static final byte _buttonPushInset = _buttonPushTextured + 1; |
12047 | 631 |
public static final Widget BUTTON_PUSH_INSET = new Widget(_buttonPushInset); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
632 |
@Native private static final byte _buttonPushInset2 = _buttonPushInset + 1; |
12047 | 633 |
public static final Widget BUTTON_PUSH_INSET2 = new Widget(_buttonPushInset2); |
634 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
635 |
@Native private static final byte _buttonRadio = _buttonPushInset2 + 1; |
12047 | 636 |
public static final Widget BUTTON_RADIO = new Widget(_buttonRadio); |
637 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
638 |
@Native private static final byte _buttonRound = _buttonRadio + 1; |
12047 | 639 |
public static final Widget BUTTON_ROUND = new Widget(_buttonRound); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
640 |
@Native private static final byte _buttonRoundHelp = _buttonRound + 1; |
12047 | 641 |
public static final Widget BUTTON_ROUND_HELP = new Widget(_buttonRoundHelp); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
642 |
@Native private static final byte _buttonRoundInset = _buttonRoundHelp + 1; |
12047 | 643 |
public static final Widget BUTTON_ROUND_INSET = new Widget(_buttonRoundInset); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
644 |
@Native private static final byte _buttonRoundInset2 =_buttonRoundInset + 1; |
12047 | 645 |
public static final Widget BUTTON_ROUND_INSET2 = new Widget(_buttonRoundInset2); |
646 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
647 |
@Native private static final byte _buttonSearchFieldCancel = _buttonRoundInset2 + 1; |
12047 | 648 |
public static final Widget BUTTON_SEARCH_FIELD_CANCEL = new Widget(_buttonSearchFieldCancel); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
649 |
@Native private static final byte _buttonSearchFieldFind = _buttonSearchFieldCancel + 1; |
12047 | 650 |
public static final Widget BUTTON_SEARCH_FIELD_FIND = new Widget(_buttonSearchFieldFind); |
651 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
652 |
@Native private static final byte _buttonSegmented = _buttonSearchFieldFind + 1; |
12047 | 653 |
public static final Widget BUTTON_SEGMENTED = new Widget(_buttonSegmented); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
654 |
@Native private static final byte _buttonSegmentedInset = _buttonSegmented + 1; |
12047 | 655 |
public static final Widget BUTTON_SEGMENTED_INSET = new Widget(_buttonSegmentedInset); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
656 |
@Native private static final byte _buttonSegmentedInset2 = _buttonSegmentedInset + 1; |
12047 | 657 |
public static final Widget BUTTON_SEGMENTED_INSET2 = new Widget(_buttonSegmentedInset2); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
658 |
@Native private static final byte _buttonSegmentedSCurve = _buttonSegmentedInset2 + 1; |
12047 | 659 |
public static final Widget BUTTON_SEGMENTED_SCURVE = new Widget(_buttonSegmentedSCurve); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
660 |
@Native private static final byte _buttonSegmentedTextured = _buttonSegmentedSCurve + 1; |
12047 | 661 |
public static final Widget BUTTON_SEGMENTED_TEXTURED = new Widget(_buttonSegmentedTextured); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
662 |
@Native private static final byte _buttonSegmentedToolbar = _buttonSegmentedTextured + 1; |
12047 | 663 |
public static final Widget BUTTON_SEGMENTED_TOOLBAR = new Widget(_buttonSegmentedToolbar); |
664 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
665 |
@Native private static final byte _dial = _buttonSegmentedToolbar + 1; |
12047 | 666 |
public static final Widget DIAL = new Widget(_dial); |
667 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
668 |
@Native private static final byte _disclosureTriangle = _dial + 1; |
12047 | 669 |
public static final Widget DISCLOSURE_TRIANGLE = new Widget(_disclosureTriangle); |
670 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
671 |
@Native private static final byte _dividerGrabber = _disclosureTriangle + 1; |
12047 | 672 |
public static final Widget DIVIDER_GRABBER = new Widget(_dividerGrabber); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
673 |
@Native private static final byte _dividerSeparatorBar = _dividerGrabber + 1; |
12047 | 674 |
public static final Widget DIVIDER_SEPARATOR_BAR = new Widget(_dividerSeparatorBar); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
675 |
@Native private static final byte _dividerSplitter = _dividerSeparatorBar + 1; |
12047 | 676 |
public static final Widget DIVIDER_SPLITTER = new Widget(_dividerSplitter); |
677 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
678 |
@Native private static final byte _focus = _dividerSplitter + 1; |
12047 | 679 |
public static final Widget FOCUS = new Widget(_focus); |
680 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
681 |
@Native private static final byte _frameGroupBox = _focus + 1; |
12047 | 682 |
public static final Widget FRAME_GROUP_BOX = new Widget(_frameGroupBox); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
683 |
@Native private static final byte _frameGroupBoxSecondary = _frameGroupBox + 1; |
12047 | 684 |
public static final Widget FRAME_GROUP_BOX_SECONDARY = new Widget(_frameGroupBoxSecondary); |
685 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
686 |
@Native private static final byte _frameListBox = _frameGroupBoxSecondary + 1; |
12047 | 687 |
public static final Widget FRAME_LIST_BOX = new Widget(_frameListBox); |
688 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
689 |
@Native private static final byte _framePlacard = _frameListBox + 1; |
12047 | 690 |
public static final Widget FRAME_PLACARD = new Widget(_framePlacard); |
691 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
692 |
@Native private static final byte _frameTextField = _framePlacard + 1; |
12047 | 693 |
public static final Widget FRAME_TEXT_FIELD = new Widget(_frameTextField); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
694 |
@Native private static final byte _frameTextFieldRound = _frameTextField + 1; |
12047 | 695 |
public static final Widget FRAME_TEXT_FIELD_ROUND = new Widget(_frameTextFieldRound); |
696 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
697 |
@Native private static final byte _frameWell = _frameTextFieldRound + 1; |
12047 | 698 |
public static final Widget FRAME_WELL = new Widget(_frameWell); |
699 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
700 |
@Native private static final byte _growBox = _frameWell + 1; |
12047 | 701 |
public static final Widget GROW_BOX = new Widget(_growBox); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
702 |
@Native private static final byte _growBoxTextured = _growBox + 1; |
12047 | 703 |
public static final Widget GROW_BOX_TEXTURED = new Widget(_growBoxTextured); |
704 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
705 |
@Native private static final byte _gradient = _growBoxTextured + 1; |
12047 | 706 |
public static final Widget GRADIENT = new Widget(_gradient); |
707 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
708 |
@Native private static final byte _menu = _gradient + 1; |
12047 | 709 |
public static final Widget MENU = new Widget(_menu); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
710 |
@Native private static final byte _menuItem = _menu + 1; |
12047 | 711 |
public static final Widget MENU_ITEM = new Widget(_menuItem); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
712 |
@Native private static final byte _menuBar = _menuItem + 1; |
12047 | 713 |
public static final Widget MENU_BAR = new Widget(_menuBar); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
714 |
@Native private static final byte _menuTitle = _menuBar + 1; |
12047 | 715 |
public static final Widget MENU_TITLE = new Widget(_menuTitle); |
716 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
717 |
@Native private static final byte _progressBar = _menuTitle + 1; |
12047 | 718 |
public static final Widget PROGRESS_BAR = new Widget(_progressBar); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
719 |
@Native private static final byte _progressIndeterminateBar = _progressBar + 1; |
12047 | 720 |
public static final Widget PROGRESS_INDETERMINATE_BAR = new Widget(_progressIndeterminateBar); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
721 |
@Native private static final byte _progressRelevance = _progressIndeterminateBar + 1; |
12047 | 722 |
public static final Widget PROGRESS_RELEVANCE = new Widget(_progressRelevance); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
723 |
@Native private static final byte _progressSpinner = _progressRelevance + 1; |
12047 | 724 |
public static final Widget PROGRESS_SPINNER = new Widget(_progressSpinner); |
725 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
726 |
@Native private static final byte _scrollBar = _progressSpinner + 1; |
12047 | 727 |
public static final Widget SCROLL_BAR = new Widget(_scrollBar); |
728 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
729 |
@Native private static final byte _scrollColumnSizer = _scrollBar + 1; |
12047 | 730 |
public static final Widget SCROLL_COLUMN_SIZER = new Widget(_scrollColumnSizer); |
731 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
732 |
@Native private static final byte _slider = _scrollColumnSizer + 1; |
12047 | 733 |
public static final Widget SLIDER = new Widget(_slider); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
734 |
@Native private static final byte _sliderThumb = _slider + 1; |
12047 | 735 |
public static final Widget SLIDER_THUMB = new Widget(_sliderThumb); |
736 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
737 |
@Native private static final byte _synchronization = _sliderThumb + 1; |
12047 | 738 |
public static final Widget SYNCHRONIZATION = new Widget(_synchronization); |
739 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
740 |
@Native private static final byte _tab = _synchronization + 1; |
12047 | 741 |
public static final Widget TAB = new Widget(_tab); |
742 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
743 |
@Native private static final byte _titleBarCloseBox = _tab + 1; |
12047 | 744 |
public static final Widget TITLE_BAR_CLOSE_BOX = new Widget(_titleBarCloseBox); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
745 |
@Native private static final byte _titleBarCollapseBox = _titleBarCloseBox + 1; |
12047 | 746 |
public static final Widget TITLE_BAR_COLLAPSE_BOX = new Widget(_titleBarCollapseBox); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
747 |
@Native private static final byte _titleBarZoomBox = _titleBarCollapseBox + 1; |
12047 | 748 |
public static final Widget TITLE_BAR_ZOOM_BOX = new Widget(_titleBarZoomBox); |
749 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
750 |
@Native private static final byte _titleBarToolbarButton = _titleBarZoomBox + 1; |
12047 | 751 |
public static final Widget TITLE_BAR_TOOLBAR_BUTTON = new Widget(_titleBarToolbarButton); |
752 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
753 |
@Native private static final byte _toolbarItemWell = _titleBarToolbarButton + 1; |
12047 | 754 |
public static final Widget TOOLBAR_ITEM_WELL = new Widget(_toolbarItemWell); |
755 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
756 |
@Native private static final byte _windowFrame = _toolbarItemWell + 1; |
12047 | 757 |
public static final Widget WINDOW_FRAME = new Widget(_windowFrame); |
758 |
} |
|
759 |
||
760 |
public static class Hit { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
761 |
@Native private static final int _unknown = -1; |
12047 | 762 |
public static final Hit UNKNOWN = new Hit(_unknown); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
763 |
@Native private static final int _none = 0; |
12047 | 764 |
public static final Hit NONE = new Hit(_none); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
765 |
@Native private static final int _hit = 1; |
12047 | 766 |
public static final Hit HIT = new Hit(_hit); |
767 |
||
768 |
final int hit; |
|
769 |
Hit(final int hit) { this.hit = hit; } |
|
770 |
||
771 |
public boolean isHit() { |
|
772 |
return hit > 0; |
|
773 |
} |
|
774 |
||
775 |
public String toString() { |
|
776 |
return getConstantName(this); |
|
777 |
} |
|
778 |
} |
|
779 |
||
780 |
public static class ScrollBarHit extends Hit { |
|
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
781 |
@Native private static final int _thumb = 2; |
12047 | 782 |
public static final ScrollBarHit THUMB = new ScrollBarHit(_thumb); |
783 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
784 |
@Native private static final int _trackMin = 3; |
12047 | 785 |
public static final ScrollBarHit TRACK_MIN = new ScrollBarHit(_trackMin); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
786 |
@Native private static final int _trackMax = 4; |
12047 | 787 |
public static final ScrollBarHit TRACK_MAX = new ScrollBarHit(_trackMax); |
788 |
||
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
789 |
@Native private static final int _arrowMin = 5; |
12047 | 790 |
public static final ScrollBarHit ARROW_MIN = new ScrollBarHit(_arrowMin); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
791 |
@Native private static final int _arrowMax = 6; |
12047 | 792 |
public static final ScrollBarHit ARROW_MAX = new ScrollBarHit(_arrowMax); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
793 |
@Native private static final int _arrowMaxInside = 7; |
12047 | 794 |
public static final ScrollBarHit ARROW_MAX_INSIDE = new ScrollBarHit(_arrowMaxInside); |
16734
da1901d79073
8000406: change files using @GenerateNativeHeader to use @Native
dxu
parents:
12813
diff
changeset
|
795 |
@Native private static final int _arrowMinInside = 8; |
12047 | 796 |
public static final ScrollBarHit ARROW_MIN_INSIDE = new ScrollBarHit(_arrowMinInside); |
797 |
||
798 |
ScrollBarHit(final int hit) { super(hit); } |
|
799 |
} |
|
800 |
||
801 |
static Hit getHit(final int hit) { |
|
802 |
switch (hit) { |
|
803 |
case Hit._none: |
|
804 |
return Hit.NONE; |
|
805 |
case Hit._hit: |
|
806 |
return Hit.HIT; |
|
807 |
||
808 |
case ScrollBarHit._thumb: |
|
809 |
return ScrollBarHit.THUMB; |
|
810 |
case ScrollBarHit._trackMin: |
|
811 |
return ScrollBarHit.TRACK_MIN; |
|
812 |
case ScrollBarHit._trackMax: |
|
813 |
return ScrollBarHit.TRACK_MAX; |
|
814 |
case ScrollBarHit._arrowMin: |
|
815 |
return ScrollBarHit.ARROW_MIN; |
|
816 |
case ScrollBarHit._arrowMax: |
|
817 |
return ScrollBarHit.ARROW_MAX; |
|
818 |
case ScrollBarHit._arrowMaxInside: |
|
819 |
return ScrollBarHit.ARROW_MAX_INSIDE; |
|
820 |
case ScrollBarHit._arrowMinInside: |
|
821 |
return ScrollBarHit.ARROW_MIN_INSIDE; |
|
822 |
} |
|
823 |
return Hit.UNKNOWN; |
|
824 |
} |
|
825 |
||
826 |
static String getConstantName(final Object object) { |
|
827 |
final Class<? extends Object> clazz = object.getClass(); |
|
828 |
try { |
|
829 |
for (final Field field : clazz.getFields()) { |
|
830 |
if (field.get(null) == object) { |
|
831 |
return field.getName(); |
|
832 |
} |
|
833 |
} |
|
834 |
} catch (final Exception e) {} |
|
835 |
return clazz.getSimpleName(); |
|
836 |
} |
|
837 |
} |