1 /*******************************************************************************
2  * Copyright (c) 2000, 2019 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *     Lars Vogel <Lars.Vogel@vogella.com> - Bug 455263
14  *******************************************************************************/
15 package org.eclipse.swt;
16 
17 
18 import org.eclipse.swt.internal.*;
19 import org.eclipse.swt.widgets.*;
20 
21 /**
22  * This class provides access to a small number of SWT system-wide
23  * methods, and in addition defines the public constants provided
24  * by SWT.
25  * <p>
26  * By defining constants like UP and DOWN in a single class, SWT
27  * can share common names and concepts at the same time minimizing
28  * the number of classes, names and constants for the application
29  * programmer.
30  * </p><p>
31  * Note that some of the constants provided by this class represent
32  * optional, appearance related aspects of widgets which are available
33  * either only on some window systems, or for a differing set of
34  * widgets on each window system. These constants are marked
35  * as <em>HINT</em>s. The set of widgets which support a particular
36  * <em>HINT</em> may change from release to release, although we typically
37  * will not withdraw support for a <em>HINT</em> once it is made available.
38  * </p>
39  *
40  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
41  */
42 
43 /* NOTE:
44  *   Good javadoc coding style is to put the values of static final
45  *   constants in the comments. This reinforces the fact that
46  *   consumers are allowed to rely on the value (and they must
47  *   since the values are compiled inline in their code). We
48  *   can <em>not</em> change the values of these constants between
49  *   releases.
50  */
51 public class SWT {
52 
53 	/* Widget Event Constants */
54 
55 	/**
56 	 * The null event type (value is 0).
57 	 *
58 	 * @since 3.0
59 	 */
60 	public static final int None = 0;
61 
62 	/**
63 	 * The key down event type (value is 1).
64 	 *
65 	 * @see org.eclipse.swt.widgets.Widget#addListener
66 	 * @see org.eclipse.swt.widgets.Display#addFilter
67 	 * @see org.eclipse.swt.widgets.Event
68 	 *
69 	 * @see org.eclipse.swt.widgets.Control#addKeyListener
70 	 * @see org.eclipse.swt.widgets.Tracker#addKeyListener
71 	 * @see org.eclipse.swt.events.KeyListener#keyPressed
72 	 * @see org.eclipse.swt.events.KeyEvent
73 	 */
74 	public static final int KeyDown = 1;
75 
76 	/**
77 	 * The key up event type (value is 2).
78 	 *
79 	 * @see org.eclipse.swt.widgets.Widget#addListener
80 	 * @see org.eclipse.swt.widgets.Display#addFilter
81 	 * @see org.eclipse.swt.widgets.Event
82 	 *
83 	 * @see org.eclipse.swt.widgets.Control#addKeyListener
84 	 * @see org.eclipse.swt.widgets.Tracker#addKeyListener
85 	 * @see org.eclipse.swt.events.KeyListener#keyReleased
86 	 * @see org.eclipse.swt.events.KeyEvent
87 	 */
88 	public static final int KeyUp = 2;
89 
90 	/**
91 	 * The mouse down event type (value is 3).
92 	 *
93 	 * @see org.eclipse.swt.widgets.Widget#addListener
94 	 * @see org.eclipse.swt.widgets.Display#addFilter
95 	 * @see org.eclipse.swt.widgets.Event
96 	 *
97 	 * @see org.eclipse.swt.widgets.Control#addMouseListener
98 	 * @see org.eclipse.swt.events.MouseListener#mouseDown
99 	 * @see org.eclipse.swt.events.MouseEvent
100 	 */
101 	public static final int MouseDown = 3;
102 
103 	/**
104 	 * The mouse up event type (value is 4).
105 	 *
106 	 * @see org.eclipse.swt.widgets.Widget#addListener
107 	 * @see org.eclipse.swt.widgets.Display#addFilter
108 	 * @see org.eclipse.swt.widgets.Event
109 	 *
110 	 * @see org.eclipse.swt.widgets.Control#addMouseListener
111 	 * @see org.eclipse.swt.events.MouseListener#mouseUp
112 	 * @see org.eclipse.swt.events.MouseEvent
113 	 */
114 	public static final int MouseUp = 4;
115 
116 	/**
117 	 * The mouse move event type (value is 5).
118 	 *
119 	 * @see org.eclipse.swt.widgets.Widget#addListener
120 	 * @see org.eclipse.swt.widgets.Display#addFilter
121 	 * @see org.eclipse.swt.widgets.Event
122 	 *
123 	 * @see org.eclipse.swt.widgets.Control#addMouseMoveListener
124 	 * @see org.eclipse.swt.events.MouseMoveListener#mouseMove
125 	 * @see org.eclipse.swt.events.MouseEvent
126 	 */
127 	public static final int MouseMove = 5;
128 
129 	/**
130 	 * The mouse enter event type (value is 6).
131 	 *
132 	 * @see org.eclipse.swt.widgets.Widget#addListener
133 	 * @see org.eclipse.swt.widgets.Display#addFilter
134 	 * @see org.eclipse.swt.widgets.Event
135 	 *
136 	 * @see org.eclipse.swt.widgets.Control#addMouseTrackListener
137 	 * @see org.eclipse.swt.events.MouseTrackListener#mouseEnter
138 	 * @see org.eclipse.swt.events.MouseEvent
139 	 */
140 	public static final int MouseEnter = 6;
141 
142 	/**
143 	 * The mouse exit event type (value is 7).
144 	 *
145 	 * @see org.eclipse.swt.widgets.Widget#addListener
146 	 * @see org.eclipse.swt.widgets.Display#addFilter
147 	 * @see org.eclipse.swt.widgets.Event
148 	 *
149 	 * @see org.eclipse.swt.widgets.Control#addMouseTrackListener
150 	 * @see org.eclipse.swt.events.MouseTrackListener#mouseExit
151 	 * @see org.eclipse.swt.events.MouseEvent
152 	 */
153 	public static final int MouseExit = 7;
154 
155 	/**
156 	 * The mouse double click event type (value is 8).
157 	 *
158 	 * @see org.eclipse.swt.widgets.Widget#addListener
159 	 * @see org.eclipse.swt.widgets.Display#addFilter
160 	 * @see org.eclipse.swt.widgets.Event
161 	 *
162 	 * @see org.eclipse.swt.widgets.Control#addMouseListener
163 	 * @see org.eclipse.swt.events.MouseListener#mouseDoubleClick
164 	 * @see org.eclipse.swt.events.MouseEvent
165 	 */
166 	public static final int MouseDoubleClick = 8;
167 
168 	/**
169 	 * The paint event type (value is 9).
170 	 *
171 	 * @see org.eclipse.swt.widgets.Widget#addListener
172 	 * @see org.eclipse.swt.widgets.Display#addFilter
173 	 * @see org.eclipse.swt.widgets.Event
174 	 *
175 	 * @see org.eclipse.swt.widgets.Control#addPaintListener
176 	 * @see org.eclipse.swt.events.PaintListener#paintControl
177 	 * @see org.eclipse.swt.events.PaintEvent
178 	 */
179 	public static final int Paint = 9;
180 
181 	/**
182 	 * The move event type (value is 10).
183 	 *
184 	 * @see org.eclipse.swt.widgets.Widget#addListener
185 	 * @see org.eclipse.swt.widgets.Display#addFilter
186 	 * @see org.eclipse.swt.widgets.Event
187 	 *
188 	 * @see org.eclipse.swt.widgets.Control#addControlListener
189 	 * @see org.eclipse.swt.widgets.TableColumn#addControlListener
190 	 * @see org.eclipse.swt.widgets.Tracker#addControlListener
191 	 * @see org.eclipse.swt.widgets.TreeColumn#addControlListener
192 	 * @see org.eclipse.swt.events.ControlListener#controlMoved
193 	 * @see org.eclipse.swt.events.ControlEvent
194 	 */
195 	public static final int Move = 10;
196 
197 	/**
198 	 * The resize event type (value is 11).
199 	 *
200 	 * @see org.eclipse.swt.widgets.Widget#addListener
201 	 * @see org.eclipse.swt.widgets.Display#addFilter
202 	 * @see org.eclipse.swt.widgets.Event
203 	 *
204 	 * @see org.eclipse.swt.widgets.Control#addControlListener
205 	 * @see org.eclipse.swt.widgets.TableColumn#addControlListener
206 	 * @see org.eclipse.swt.widgets.Tracker#addControlListener
207 	 * @see org.eclipse.swt.widgets.TreeColumn#addControlListener
208 	 * @see org.eclipse.swt.events.ControlListener#controlResized
209 	 * @see org.eclipse.swt.events.ControlEvent
210 	 */
211 	public static final int Resize = 11;
212 
213 	/**
214 	 * The dispose event type (value is 12).
215 	 *
216 	 * @see org.eclipse.swt.widgets.Widget#addListener
217 	 * @see org.eclipse.swt.widgets.Display#addListener
218 	 * @see org.eclipse.swt.widgets.Display#addFilter
219 	 * @see org.eclipse.swt.widgets.Event
220 	 *
221 	 * @see org.eclipse.swt.widgets.Widget#addDisposeListener
222 	 * @see org.eclipse.swt.events.DisposeListener#widgetDisposed
223 	 * @see org.eclipse.swt.events.DisposeEvent
224 	 */
225 	public static final int Dispose = 12;
226 
227 	/**
228 	 * The selection event type (value is 13).
229 	 *
230 	 * @see org.eclipse.swt.widgets.Widget#addListener
231 	 * @see org.eclipse.swt.widgets.Display#addFilter
232 	 * @see org.eclipse.swt.widgets.Event
233 	 *
234 	 * @see org.eclipse.swt.widgets.Button#addSelectionListener
235 	 * @see org.eclipse.swt.widgets.Combo#addSelectionListener
236 	 * @see org.eclipse.swt.widgets.CoolItem#addSelectionListener
237 	 * @see org.eclipse.swt.widgets.Link#addSelectionListener
238 	 * @see org.eclipse.swt.widgets.List#addSelectionListener
239 	 * @see org.eclipse.swt.widgets.MenuItem#addSelectionListener
240 	 * @see org.eclipse.swt.widgets.Sash#addSelectionListener
241 	 * @see org.eclipse.swt.widgets.Scale#addSelectionListener
242 	 * @see org.eclipse.swt.widgets.ScrollBar#addSelectionListener
243 	 * @see org.eclipse.swt.widgets.Slider#addSelectionListener
244 	 * @see org.eclipse.swt.widgets.TabFolder#addSelectionListener
245 	 * @see org.eclipse.swt.widgets.Table#addSelectionListener
246 	 * @see org.eclipse.swt.widgets.TableColumn#addSelectionListener
247 	 * @see org.eclipse.swt.widgets.ToolItem#addSelectionListener
248 	 * @see org.eclipse.swt.widgets.TrayItem#addSelectionListener
249 	 * @see org.eclipse.swt.widgets.Tree#addSelectionListener
250 	 * @see org.eclipse.swt.widgets.TreeColumn#addSelectionListener
251 	 * @see org.eclipse.swt.events.SelectionListener#widgetSelected
252 	 * @see org.eclipse.swt.events.SelectionEvent
253 	 */
254 	public static final int Selection = 13;
255 
256 	/**
257 	 * The default selection event type (value is 14).
258 	 *
259 	 * @see org.eclipse.swt.widgets.Widget#addListener
260 	 * @see org.eclipse.swt.widgets.Display#addFilter
261 	 * @see org.eclipse.swt.widgets.Event
262 	 *
263 	 * @see org.eclipse.swt.widgets.Combo#addSelectionListener
264 	 * @see org.eclipse.swt.widgets.List#addSelectionListener
265 	 * @see org.eclipse.swt.widgets.Spinner#addSelectionListener
266 	 * @see org.eclipse.swt.widgets.Table#addSelectionListener
267 	 * @see org.eclipse.swt.widgets.Text#addSelectionListener
268 	 * @see org.eclipse.swt.widgets.TrayItem#addSelectionListener
269 	 * @see org.eclipse.swt.widgets.Tree#addSelectionListener
270 	 * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected
271 	 * @see org.eclipse.swt.events.SelectionEvent
272 	 */
273 	public static final int DefaultSelection = 14;
274 
275 	/**
276 	 * The focus in event type (value is 15).
277 	 *
278 	 * @see org.eclipse.swt.widgets.Widget#addListener
279 	 * @see org.eclipse.swt.widgets.Display#addFilter
280 	 * @see org.eclipse.swt.widgets.Event
281 	 *
282 	 * @see org.eclipse.swt.widgets.Control#addFocusListener
283 	 * @see org.eclipse.swt.events.FocusListener#focusGained
284 	 * @see org.eclipse.swt.events.FocusEvent
285 	 */
286 	public static final int FocusIn = 15;
287 
288 	/**
289 	 * The focus out event type (value is 16).
290 	 *
291 	 * @see org.eclipse.swt.widgets.Widget#addListener
292 	 * @see org.eclipse.swt.widgets.Display#addFilter
293 	 * @see org.eclipse.swt.widgets.Event
294 	 *
295 	 * @see org.eclipse.swt.widgets.Control#addFocusListener
296 	 * @see org.eclipse.swt.events.FocusListener#focusLost
297 	 * @see org.eclipse.swt.events.FocusEvent
298 	 */
299 	public static final int FocusOut = 16;
300 
301 	/**
302 	 * The expand event type (value is 17).
303 	 *
304 	 * @see org.eclipse.swt.widgets.Widget#addListener
305 	 * @see org.eclipse.swt.widgets.Display#addFilter
306 	 * @see org.eclipse.swt.widgets.Event
307 	 *
308 	 * @see org.eclipse.swt.widgets.Tree#addTreeListener
309 	 * @see org.eclipse.swt.events.TreeListener#treeExpanded
310 	 * @see org.eclipse.swt.events.TreeEvent
311 	 */
312 	public static final int Expand = 17;
313 
314 	/**
315 	 * The collapse event type (value is 18).
316 	 *
317 	 * @see org.eclipse.swt.widgets.Widget#addListener
318 	 * @see org.eclipse.swt.widgets.Display#addFilter
319 	 * @see org.eclipse.swt.widgets.Event
320 	 *
321 	 * @see org.eclipse.swt.widgets.Tree#addTreeListener
322 	 * @see org.eclipse.swt.events.TreeListener#treeCollapsed
323 	 * @see org.eclipse.swt.events.TreeEvent
324 	 */
325 	public static final int Collapse = 18;
326 
327 	/**
328 	 * The iconify event type (value is 19).
329 	 *
330 	 * @see org.eclipse.swt.widgets.Widget#addListener
331 	 * @see org.eclipse.swt.widgets.Display#addFilter
332 	 * @see org.eclipse.swt.widgets.Event
333 	 *
334 	 * @see org.eclipse.swt.widgets.Shell#addShellListener
335 	 * @see org.eclipse.swt.events.ShellListener#shellIconified
336 	 * @see org.eclipse.swt.events.ShellEvent
337 	 */
338 	public static final int Iconify = 19;
339 
340 	/**
341 	 * The de-iconify event type (value is 20).
342 	 *
343 	 * @see org.eclipse.swt.widgets.Widget#addListener
344 	 * @see org.eclipse.swt.widgets.Display#addFilter
345 	 * @see org.eclipse.swt.widgets.Event
346 	 *
347 	 * @see org.eclipse.swt.widgets.Shell#addShellListener
348 	 * @see org.eclipse.swt.events.ShellListener#shellDeiconified
349 	 * @see org.eclipse.swt.events.ShellEvent
350 	 */
351 	public static final int Deiconify = 20;
352 
353 	/**
354 	 * The close event type (value is 21).
355 	 *
356 	 * @see org.eclipse.swt.widgets.Widget#addListener
357 	 * @see org.eclipse.swt.widgets.Display#addListener
358 	 * @see org.eclipse.swt.widgets.Display#addFilter
359 	 * @see org.eclipse.swt.widgets.Event
360 	 *
361 	 * @see org.eclipse.swt.widgets.Shell#addShellListener
362 	 * @see org.eclipse.swt.events.ShellListener#shellClosed
363 	 * @see org.eclipse.swt.events.ShellEvent
364 	 */
365 	public static final int Close = 21;
366 
367 	/**
368 	 * The show event type (value is 22).
369 	 *
370 	 * @see org.eclipse.swt.widgets.Widget#addListener
371 	 * @see org.eclipse.swt.widgets.Display#addFilter
372 	 * @see org.eclipse.swt.widgets.Event
373 	 *
374 	 * @see org.eclipse.swt.widgets.Menu#addMenuListener
375 	 * @see org.eclipse.swt.events.MenuListener#menuShown
376 	 * @see org.eclipse.swt.events.MenuEvent
377 	 */
378 	public static final int Show = 22;
379 
380 	/**
381 	 * The hide event type (value is 23).
382 	 *
383 	 * @see org.eclipse.swt.widgets.Widget#addListener
384 	 * @see org.eclipse.swt.widgets.Display#addFilter
385 	 * @see org.eclipse.swt.widgets.Event
386 	 *
387 	 * @see org.eclipse.swt.widgets.Menu#addMenuListener
388 	 * @see org.eclipse.swt.events.MenuListener#menuHidden
389 	 * @see org.eclipse.swt.events.MenuEvent
390 	 */
391 	public static final int Hide = 23;
392 
393 	/**
394 	 * The modify event type (value is 24).
395 	 *
396 	 * @see org.eclipse.swt.widgets.Widget#addListener
397 	 * @see org.eclipse.swt.widgets.Display#addFilter
398 	 * @see org.eclipse.swt.widgets.Event
399 	 *
400 	 * @see org.eclipse.swt.widgets.Combo#addModifyListener
401 	 * @see org.eclipse.swt.widgets.Spinner#addModifyListener
402 	 * @see org.eclipse.swt.widgets.Text#addModifyListener
403 	 * @see org.eclipse.swt.events.ModifyListener#modifyText
404 	 * @see org.eclipse.swt.events.ModifyEvent
405 	 */
406 	public static final int Modify = 24;
407 
408 	/**
409 	 * The verify event type (value is 25).
410 	 *
411 	 * @see org.eclipse.swt.widgets.Widget#addListener
412 	 * @see org.eclipse.swt.widgets.Display#addFilter
413 	 * @see org.eclipse.swt.widgets.Event
414 	 *
415 	 * @see org.eclipse.swt.custom.CCombo#addVerifyListener
416 	 * @see org.eclipse.swt.widgets.Combo#addVerifyListener
417 	 * @see org.eclipse.swt.custom.StyledText#addVerifyListener
418 	 * @see org.eclipse.swt.widgets.Text#addVerifyListener
419 	 * @see org.eclipse.swt.events.VerifyListener#verifyText
420 	 * @see org.eclipse.swt.events.VerifyEvent
421 	 */
422 	public static final int Verify = 25;
423 
424 	/**
425 	 * The activate event type (value is 26).
426 	 *
427 	 * @see org.eclipse.swt.widgets.Widget#addListener
428 	 * @see org.eclipse.swt.widgets.Display#addFilter
429 	 * @see org.eclipse.swt.widgets.Event
430 	 *
431 	 * @see org.eclipse.swt.widgets.Shell#addShellListener
432 	 * @see org.eclipse.swt.events.ShellListener#shellActivated
433 	 * @see org.eclipse.swt.events.ShellEvent
434 	 */
435 	public static final int Activate = 26;
436 
437 	/**
438 	 * The deactivate event type (value is 27).
439 	 *
440 	 * @see org.eclipse.swt.widgets.Widget#addListener
441 	 * @see org.eclipse.swt.widgets.Display#addFilter
442 	 * @see org.eclipse.swt.widgets.Event
443 	 *
444 	 * @see org.eclipse.swt.widgets.Shell#addShellListener
445 	 * @see org.eclipse.swt.events.ShellListener#shellDeactivated
446 	 * @see org.eclipse.swt.events.ShellEvent
447 	 */
448 	public static final int Deactivate = 27;
449 
450 	/**
451 	 * The help event type (value is 28).
452 	 *
453 	 * @see org.eclipse.swt.widgets.Widget#addListener
454 	 * @see org.eclipse.swt.widgets.Display#addFilter
455 	 * @see org.eclipse.swt.widgets.Event
456 	 *
457 	 * @see org.eclipse.swt.widgets.Control#addHelpListener
458 	 * @see org.eclipse.swt.widgets.Menu#addHelpListener
459 	 * @see org.eclipse.swt.widgets.MenuItem#addHelpListener
460 	 * @see org.eclipse.swt.events.HelpListener#helpRequested
461 	 * @see org.eclipse.swt.events.HelpEvent
462 	 */
463 	public static final int Help = 28;
464 
465 	/**
466 	 * The drag detect event type (value is 29).
467 	 *
468 	 * @see org.eclipse.swt.widgets.Widget#addListener
469 	 * @see org.eclipse.swt.widgets.Display#addFilter
470 	 * @see org.eclipse.swt.widgets.Event
471 	 *
472 	 * @see org.eclipse.swt.widgets.Control#addDragDetectListener
473 	 * @see org.eclipse.swt.events.DragDetectListener#dragDetected
474 	 * @see org.eclipse.swt.events.DragDetectEvent
475 	 * @see org.eclipse.swt.dnd.DragSource
476 	 */
477 	public static final int DragDetect = 29;
478 
479 	/**
480 	 * The arm event type (value is 30).
481 	 *
482 	 * @see org.eclipse.swt.widgets.Widget#addListener
483 	 * @see org.eclipse.swt.widgets.Display#addFilter
484 	 * @see org.eclipse.swt.widgets.Event
485 	 *
486 	 * @see org.eclipse.swt.widgets.MenuItem#addArmListener
487 	 * @see org.eclipse.swt.events.ArmListener#widgetArmed
488 	 * @see org.eclipse.swt.events.ArmEvent
489 	 */
490 	public static final int Arm = 30;
491 
492 	/**
493 	 * The traverse event type (value is 31).
494 	 *
495 	 * @see org.eclipse.swt.widgets.Widget#addListener
496 	 * @see org.eclipse.swt.widgets.Display#addFilter
497 	 * @see org.eclipse.swt.widgets.Event
498 	 *
499 	 * @see org.eclipse.swt.widgets.Control#addTraverseListener
500 	 * @see org.eclipse.swt.events.TraverseListener#keyTraversed
501 	 * @see org.eclipse.swt.events.TraverseEvent
502 	 */
503 	public static final int Traverse = 31;
504 
505 	/**
506 	 * The mouse hover event type (value is 32).
507 	 *
508 	 * @see org.eclipse.swt.widgets.Widget#addListener
509 	 * @see org.eclipse.swt.widgets.Display#addFilter
510 	 * @see org.eclipse.swt.widgets.Event
511 	 *
512 	 * @see org.eclipse.swt.widgets.Control#addMouseTrackListener
513 	 * @see org.eclipse.swt.events.MouseTrackListener#mouseHover
514 	 * @see org.eclipse.swt.events.MouseEvent
515 	 */
516 	public static final int MouseHover = 32;
517 
518 	/**
519 	 * The hardware key down event type (value is 33).
520 	 *
521 	 * @see org.eclipse.swt.widgets.Widget#addListener
522 	 * @see org.eclipse.swt.widgets.Display#addFilter
523 	 * @see org.eclipse.swt.widgets.Event
524 	 */
525 	public static final int HardKeyDown = 33;
526 
527 	/**
528 	 * The hardware key up event type (value is 34).
529 	 *
530 	 * @see org.eclipse.swt.widgets.Widget#addListener
531 	 * @see org.eclipse.swt.widgets.Display#addFilter
532 	 * @see org.eclipse.swt.widgets.Event
533 	 */
534 	public static final int HardKeyUp = 34;
535 
536 	/**
537 	 * The menu detect event type (value is 35).
538 	 *
539 	 * @see org.eclipse.swt.widgets.Widget#addListener
540 	 * @see org.eclipse.swt.widgets.Display#addFilter
541 	 * @see org.eclipse.swt.widgets.Event
542 	 *
543 	 * @see org.eclipse.swt.widgets.Control#addMenuDetectListener
544 	 * @see org.eclipse.swt.widgets.TrayItem#addMenuDetectListener
545 	 * @see org.eclipse.swt.events.MenuDetectListener#menuDetected
546 	 * @see org.eclipse.swt.events.MenuDetectEvent
547 	 *
548 	 * @since 3.0
549 	 */
550 	public static final int MenuDetect = 35;
551 
552 	/**
553 	 * The set data event type (value is 36).
554 	 *
555 	 * @see org.eclipse.swt.widgets.Widget#addListener
556 	 * @see org.eclipse.swt.widgets.Display#addFilter
557 	 * @see org.eclipse.swt.widgets.Event
558 	 *
559 	 * @see org.eclipse.swt.widgets.Table
560 	 * @see org.eclipse.swt.widgets.Tree
561 	 *
562 	 * @since 3.0
563 	 */
564 	public static final int SetData = 36;
565 
566 	/**
567 	 * The mouse vertical wheel event type (value is 37).
568 	 *
569 	 * @see org.eclipse.swt.widgets.Control#addMouseWheelListener
570 	 * @see org.eclipse.swt.widgets.Display#addFilter
571 	 * @see org.eclipse.swt.widgets.Event
572 	 *
573 	 * @since 3.6
574 	 */
575 	public static final int MouseVerticalWheel = 37;
576 
577 	/**
578 	 * The mouse horizontal wheel event type (value is 38).
579 	 *
580 	 * @see org.eclipse.swt.widgets.Widget#addListener
581 	 * @see org.eclipse.swt.widgets.Display#addFilter
582 	 * @see org.eclipse.swt.widgets.Event
583 	 *
584 	 * @since 3.6
585 	 */
586 	public static final int MouseHorizontalWheel = 38;
587 
588 	/**
589 	 * The mouse wheel event type (value is 37).
590 	 * This is a synonym for {@link #MouseVerticalWheel} (value is 37).
591 	 * Newer applications should use {@link #MouseVerticalWheel} instead
592 	 * of {@link #MouseWheel} to make code more understandable.
593 	 *
594 	 * @see org.eclipse.swt.widgets.Control#addMouseWheelListener
595 	 * @see org.eclipse.swt.widgets.Display#addFilter
596 	 * @see org.eclipse.swt.widgets.Event
597 	 *
598 	 * @since 3.1
599 	 */
600 	public static final int MouseWheel = MouseVerticalWheel;
601 
602 	/**
603 	 * The settings changed event type (value is 39).
604 	 * <p>
605 	 * The settings changed event is sent when an operating system
606 	 * property, such as a system font or color, has been changed.
607 	 * The event occurs after the property has been changed, but
608 	 * before any widget is redrawn.  Applications that cache operating
609 	 * system properties can use this event to update their caches.
610 	 * A specific property change can be detected by querying the
611 	 * new value of a property and comparing it with the equivalent
612 	 * cached value.  The operating system automatically redraws and
613 	 * lays out all widgets after this event is sent.
614 	 * </p>
615 	 *
616 	 * @see org.eclipse.swt.widgets.Display#addListener
617 	 * @see org.eclipse.swt.widgets.Event
618 	 *
619 	 * @since 3.2
620 	 */
621 	public static final int Settings = 39;
622 
623 	/**
624 	 * The erase item event type (value is 40).
625 	 *
626 	 * @see org.eclipse.swt.widgets.Widget#addListener
627 	 * @see org.eclipse.swt.widgets.Display#addFilter
628 	 * @see org.eclipse.swt.widgets.Event
629 	 *
630 	 * @since 3.2
631 	 */
632 	public static final int EraseItem = 40;
633 
634 	/**
635 	 * The measure item event type (value is 41).
636 	 *
637 	 * @see org.eclipse.swt.widgets.Widget#addListener
638 	 * @see org.eclipse.swt.widgets.Display#addFilter
639 	 * @see org.eclipse.swt.widgets.Event
640 	 *
641 	 * @since 3.2
642 	 */
643 	public static final int MeasureItem = 41;
644 
645 	/**
646 	 * The paint item event type (value is 42).
647 	 *
648 	 * @see org.eclipse.swt.widgets.Widget#addListener
649 	 * @see org.eclipse.swt.widgets.Display#addFilter
650 	 * @see org.eclipse.swt.widgets.Event
651 	 *
652 	 * @since 3.2
653 	 */
654 	public static final int PaintItem = 42;
655 
656 	/**
657 	 * The IME composition event type (value is 43).
658 	 * <p>
659 	 * The IME composition event is sent to allow
660 	 * custom text editors to implement in-line
661 	 * editing of international text.
662 	 * </p>
663 	 *
664 	 * The detail field indicates the action to be taken:
665 	 * <ul>
666 	 * <li>{@link SWT#COMPOSITION_CHANGED}</li>
667 	 * <li>{@link SWT#COMPOSITION_OFFSET}</li>
668 	 * <li>{@link SWT#COMPOSITION_SELECTION}</li>
669 	 * </ul>
670 	 *
671 	 * @see org.eclipse.swt.widgets.Widget#addListener
672 	 * @see org.eclipse.swt.widgets.Display#addFilter
673 	 * @see org.eclipse.swt.widgets.Event
674 	 *
675 	 * @since 3.4
676 	 */
677 	public static final int ImeComposition = 43;
678 
679 	/**
680 	 * The orientation change event type (value is 44).
681 	 * <p>
682 	 * On some platforms the orientation of text widgets
683 	 * can be changed by keyboard shortcut.
684 	 * The application can use the <code>doit</code> field
685 	 * of the event to stop the change from happening.
686 	 * </p>
687 	 *
688 	 * @see org.eclipse.swt.widgets.Widget#addListener
689 	 * @see org.eclipse.swt.widgets.Display#addFilter
690 	 * @see org.eclipse.swt.widgets.Event
691 	 *
692 	 * @since 3.6
693 	 */
694 	public static final int OrientationChange = 44;
695 
696 	/**
697 	 * The skin event type (value is 45).
698 	 *
699 	 * <p>
700 	 * The skin event is sent by the display when a widget needs to
701 	 * be skinned.
702 	 * </p>
703 	 *
704 	 * @see org.eclipse.swt.widgets.Widget#addListener
705 	 * @see org.eclipse.swt.widgets.Display#addFilter
706 	 * @see org.eclipse.swt.widgets.Event
707 	 * @see org.eclipse.swt.widgets.Widget#reskin(int)
708 	 *
709 	 * @since 3.6
710 	 */
711 	public static final int Skin = 45;
712 
713 	/**
714 	 * The open document event type (value is 46).
715 	 *
716 	 * <p>
717 	 * This event is sent when SWT receives notification that a document
718 	 * should be opened.
719 	 * </p>
720 	 *
721 	 * @see org.eclipse.swt.widgets.Display#addListener
722 	 * @see org.eclipse.swt.widgets.Event
723 	 *
724 	 * @since 3.6
725 	 */
726 	public static final int OpenDocument = 46;
727 
728 	/**
729 	 * The touch event type (value is 47).
730 	 *
731 	 * <p>
732 	 * This event is sent when a touch has been performed
733 	 * on a touch-based input source.
734 	 * </p>
735 	 *
736 	 * @see org.eclipse.swt.widgets.Display#addListener
737 	 * @see org.eclipse.swt.widgets.Event
738 	 *
739 	 * @since 3.7
740 	 */
741 	public static final int Touch = 47;
742 
743 	/**
744 	 * The gesture event type (value is 48).
745 	 *
746 	 * <p>
747 	 * This event is sent when a gesture has been performed.
748 	 * </p>
749 	 *
750 	 * @see org.eclipse.swt.widgets.Display#addListener
751 	 * @see org.eclipse.swt.widgets.Event
752 	 * @see SWT#GESTURE_MAGNIFY
753 	 * @see SWT#GESTURE_PAN
754 	 * @see SWT#GESTURE_ROTATE
755 	 * @see SWT#GESTURE_SWIPE
756 	 *
757 	 * @since 3.7
758 	 */
759 	public static final int Gesture = 48;
760 
761 	/**
762 	 * The segments event type (value is 49).
763 	 *
764 	 * <p>
765 	 * This event is sent when text content has been changed.
766 	 * </p>
767 	 *
768 	 * @see org.eclipse.swt.widgets.Widget#addListener
769 	 * @see org.eclipse.swt.widgets.Display#addFilter
770 	 * @see org.eclipse.swt.widgets.Event
771 	 *
772 	 * @see org.eclipse.swt.widgets.Text#addSegmentListener
773 	 * @see org.eclipse.swt.events.SegmentEvent
774 	 *
775 	 * @since 3.8
776 	 */
777 	public static final int Segments = 49;
778 
779 	/**
780 	 * The PreEvent event type (value is 50).
781 	 *
782 	 * <p>
783 	 * This event is sent before an event other than {@link #PreExternalEventDispatch} or
784 	 * {@link #PostExternalEventDispatch} is dispatched.
785 	 * </p>
786 	 * <p>
787 	 * The detail field of the event contains the type of the following event.
788 	 * </p>
789 	 *
790 	 * @since 3.103
791 	 */
792 	public static final int PreEvent = 50;
793 
794 	/**
795 	 * The PostEvent event type (value is 51).
796 	 *
797 	 * <p>
798 	 * This event is sent after an event other than {@link #PreExternalEventDispatch} or
799 	 * {@link #PostExternalEventDispatch} is dispatched.
800 	 * </p>
801 	 * <p>
802 	 * The detail field of the event contains the type of the prior event.
803 	 * </p>
804 	 *
805 	 * @since 3.103
806 	 */
807 	public static final int PostEvent = 51;
808 
809 	/**
810 	 * The PreExternalEventDispatch event type (value is 52).
811 	 *
812 	 * <p>
813 	 * This event is sent before calling a blocking method that does its own event dispatch outside
814 	 * of the SWT code.
815 	 * </p>
816 	 *
817 	 * @since 3.104
818 	 */
819 	public static final int PreExternalEventDispatch = 52;
820 
821 	/**
822 	 * The PostExternalEventDispatch event type (value is 53).
823 	 *
824 	 * <p>
825 	 * This event is sent after calling a blocking method that does its own event dispatch outside
826 	 * of the SWT code.
827 	 * </p>
828 	 *
829 	 * @since 3.104
830 	 */
831 	public static final int PostExternalEventDispatch = 53;
832 
833 	/**
834 	 * @deprecated The same as PreExternalEventDispatch (value is 52).
835 	 * @since 3.103
836 	 */
837 	@Deprecated
838 	public static final int Sleep = PreExternalEventDispatch;
839 
840 	/**
841 	 * @deprecated The same as PostExternalEventDispatch (value is 53).
842 	 * @since 3.103
843 	 */
844 	@Deprecated
845 	public static final int Wakeup = PostExternalEventDispatch;
846 
847 	/**
848 	 * The open URL event type (value is 54).
849 	 *
850 	 * <p>
851 	 * This event is sent when SWT receives notification that a URL
852 	 * should be opened.
853 	 * </p>
854 	 *
855 	 * @see org.eclipse.swt.widgets.Display#addListener
856 	 * @see org.eclipse.swt.widgets.Event
857 	 *
858 	 * @since 3.107
859 	 */
860 	public static final int OpenUrl = 54;
861 
862 	/**
863 	 * The SWT zoom change event type (value is 55).
864 	 *
865 	 * <p>
866 	 * This event is sent on <code>Shell</code> when the SWT zoom has changed. The SWT
867 	 * zoom changes when the operating system DPI or scale factor changes dynamically.
868 	 * </p>
869 	 * <p>
870 	 * Note that this is a <em>HINT</em> and is not sent on platforms that do not
871 	 * support dynamic DPI changes. This event is currently sent on Windows 10 and GTK
872 	 * only.
873 	 * </p>
874 	 *
875 	 * @see org.eclipse.swt.widgets.Widget#addListener
876 	 * @see org.eclipse.swt.widgets.Display#addFilter
877 	 * @see org.eclipse.swt.widgets.Event
878 	 *
879 	 * @since 3.108
880 	 */
881 	public static final int ZoomChanged = 55;
882 
883 	/* Event Details */
884 
885 	/**
886 	 * The IME composition event detail that indicates
887 	 * a change in the IME composition. The text field
888 	 * of the event is the new composition text.
889 	 * The start and end indicate the offsets where the
890 	 * composition text should be inserted.
891 	 * The styles and ranges are stored in the IME
892 	 * object (value is 1).
893 	 *
894 	 * @see SWT#ImeComposition
895 	 *
896 	 * @since 3.4
897 	 */
898 	public static final int COMPOSITION_CHANGED = 1;
899 
900 	/**
901 	 * The IME composition event detail that indicates
902 	 * that the IME needs the offset for a given location.
903 	 * The x and y fields of the event are used by the
904 	 * application to determine the offset.
905 	 *
906 	 * The index field of the event should be set to the
907 	 * text offset at that location. The count field should
908 	 * be set to indicate whether the location is closer to
909 	 * the leading edge (0) or the trailing edge (1) (value is 2).
910 	 *
911 	 * @see SWT#ImeComposition
912 	 * @see org.eclipse.swt.graphics.TextLayout#getOffset(int, int, int[])
913 	 *
914 	 * @since 3.4
915 	 */
916 	public static final int COMPOSITION_OFFSET = 2;
917 
918 	/**
919 	 * The IME composition event detail that indicates
920 	 * that IME needs the selected text and its start
921 	 * and end offsets (value is 3).
922 	 *
923 	 * @see SWT#ImeComposition
924 	 *
925 	 * @since 3.4
926 	 */
927 	public static final int COMPOSITION_SELECTION = 3;
928 
929 	/**
930 	 * Indicates that a user-interface component is being dragged,
931 	 * for example dragging the thumb of a scroll bar (value is 1).
932 	 */
933 	public static final int DRAG = 1;
934 
935 	/**
936 	 * Event detail field that indicates a user-interface component
937 	 * state is selected (value is 1&lt;&lt;1).
938 	 *
939 	 * @since 3.2
940 	 */
941 	public static final int SELECTED = 1 << 1;
942 
943 	/**
944 	 * Event detail field that indicates a user-interface component
945 	 * state is focused (value is 1&lt;&lt;2).
946 	 *
947 	 * @since 3.2
948 	 */
949 	public static final int FOCUSED = 1 << 2;
950 
951 	/**
952 	 * Event detail field that indicates a user-interface component
953 	 * draws the background (value is 1&lt;&lt;3).
954 	 *
955 	 * @since 3.2
956 	 */
957 	public static final int BACKGROUND = 1 << 3;
958 
959 	/**
960 	 * Event detail field that indicates a user-interface component
961 	 * draws the foreground (value is 1&lt;&lt;4).
962 	 *
963 	 * @since 3.2
964 	 */
965 	public static final int FOREGROUND = 1 << 4;
966 
967 	/**
968 	 * Event detail field that indicates a user-interface component
969 	 * state is hot (value is 1&lt;&lt;5).
970 	 *
971 	 * @since 3.3
972 	 */
973 	public static final int HOT = 1 << 5;
974 
975 	/* This code is intentionally commented */
976 	//public static final int PRESSED = 1 << 3;
977 	//public static final int ACTIVE = 1 << 4;
978 	//public static final int DISABLED = 1 << 5;
979 	//public static final int HOT = 1 << 6;
980 	//public static final int DEFAULTED = 1 << 7;
981 
982 	/**
983 	 * Traversal event detail field value indicating that no
984 	 * traversal action should be taken
985 	 * (value is 0).
986 	 */
987 	public static final int TRAVERSE_NONE = 0;
988 
989 	/**
990 	 * Traversal event detail field value indicating that the
991 	 * key which designates that a dialog should be cancelled was
992 	 * pressed; typically, this is the ESC key
993 	 * (value is 1&lt;&lt;1).
994 	 */
995 	public static final int TRAVERSE_ESCAPE = 1 << 1;
996 
997 	/**
998 	 * Traversal event detail field value indicating that the
999 	 * key which activates the default button in a dialog was
1000 	 * pressed; typically, this is the ENTER key
1001 	 * (value is 1&lt;&lt;2).
1002 	 */
1003 	public static final int TRAVERSE_RETURN = 1 << 2;
1004 
1005 	/**
1006 	 * Traversal event detail field value indicating that the
1007 	 * key which designates that focus should be given to the
1008 	 * previous tab group was pressed; typically, this is the
1009 	 * SHIFT-TAB key sequence
1010 	 * (value is 1&lt;&lt;3).
1011 	 */
1012 	public static final int TRAVERSE_TAB_PREVIOUS = 1 << 3;
1013 
1014 	/**
1015 	 * Traversal event detail field value indicating that the
1016 	 * key which designates that focus should be given to the
1017 	 * next tab group was pressed; typically, this is the
1018 	 * TAB key
1019 	 * (value is 1&lt;&lt;4).
1020 	 */
1021 	public static final int TRAVERSE_TAB_NEXT = 1 << 4;
1022 
1023 	/**
1024 	 * Traversal event detail field value indicating that the
1025 	 * key which designates that focus should be given to the
1026 	 * previous tab item was pressed; typically, this is either
1027 	 * the LEFT-ARROW or UP-ARROW keys
1028 	 * (value is 1&lt;&lt;5).
1029 	 */
1030 	public static final int TRAVERSE_ARROW_PREVIOUS = 1 << 5;
1031 
1032 	/**
1033 	 * Traversal event detail field value indicating that the
1034 	 * key which designates that focus should be given to the
1035 	 * previous tab item was pressed; typically, this is either
1036 	 * the RIGHT-ARROW or DOWN-ARROW keys
1037 	 * (value is 1&lt;&lt;6).
1038 	 */
1039 	public static final int TRAVERSE_ARROW_NEXT = 1 << 6;
1040 
1041 	/**
1042 	 * Traversal event detail field value indicating that a
1043 	 * mnemonic key sequence was pressed
1044 	 * (value is 1&lt;&lt;7).
1045 	 */
1046 	public static final int TRAVERSE_MNEMONIC = 1 << 7;
1047 
1048 	/**
1049 	 * Traversal event detail field value indicating that the
1050 	 * key which designates that the previous page of a multi-page
1051 	 * window should be shown was pressed; typically, this
1052 	 * is the CTRL-PAGEUP key sequence
1053 	 * (value is 1&lt;&lt;8).
1054 	 */
1055 	public static final int TRAVERSE_PAGE_PREVIOUS = 1 << 8;
1056 
1057 	/**
1058 	 * Traversal event detail field value indicating that the
1059 	 * key which designates that the next page of a multi-page
1060 	 * window should be shown was pressed; typically, this
1061 	 * is the CTRL-PAGEDOWN key sequence
1062 	 * (value is 1&lt;&lt;9).
1063 	 */
1064 	public static final int TRAVERSE_PAGE_NEXT = 1 << 9;
1065 
1066 	/**
1067 	 * Gesture event detail field value indicating that a continuous
1068 	 * gesture is about to begin.
1069 	 *
1070 	 * @since 3.7
1071 	 */
1072 	public static final int GESTURE_BEGIN = 1 << 1;
1073 
1074 	/**
1075 	 * Gesture event detail field value indicating that a continuous
1076 	 * gesture has ended.
1077 	 *
1078 	 * @since 3.7
1079 	 */
1080 	public static final int GESTURE_END = 1 << 2;
1081 
1082 	/**
1083 	 * Gesture event detail field value indicating that a
1084 	 * rotation gesture has happened. Only the rotation field
1085 	 * of the event is valid.
1086 	 *
1087 	 * @since 3.7
1088 	 */
1089 	public static final int GESTURE_ROTATE = 1 << 3;
1090 
1091 	/**
1092 	 * Gesture event detail field value indicating that a
1093 	 * swipe gesture has happened.
1094 	 *
1095 	 * @since 3.7
1096 	 */
1097 	public static final int GESTURE_SWIPE = 1 << 4;
1098 
1099 	/**
1100 	 * Gesture event detail field value indicating that a
1101 	 * magnification gesture has happened.
1102 	 *
1103 	 * @since 3.7
1104 	 */
1105 	public static final int GESTURE_MAGNIFY = 1 << 5;
1106 
1107 	/**
1108 	 * Gesture event detail field value indicating that a
1109 	 * panning (two-finger scroll) gesture has happened.
1110 	 *
1111 	 * @since 3.7
1112 	 */
1113 	public static final int GESTURE_PAN = 1 << 6;
1114 
1115 	/**
1116 	 * A constant indicating that a finger touched the device.
1117 	 *
1118 	 * @see org.eclipse.swt.widgets.Touch#state
1119 	 *
1120 	 * @since 3.7
1121 	 */
1122 	public static final int TOUCHSTATE_DOWN = 1 << 0;
1123 
1124 	/**
1125 	 * A constant indicating that a finger moved on the device.
1126 	 *
1127 	 * @see org.eclipse.swt.widgets.Touch#state
1128 	 *
1129 	 * @since 3.7
1130 	 */
1131 	public static final int TOUCHSTATE_MOVE = 1 << 1;
1132 
1133 	/**
1134 	 * A constant indicating that a finger was lifted from the device.
1135 	 *
1136 	 * @see org.eclipse.swt.widgets.Touch#state
1137 	 *
1138 	 * @since 3.7
1139 	 */
1140 	public static final int TOUCHSTATE_UP = 1 << 2;
1141 
1142 	/**
1143 	 * MenuDetect event detail value indicating that a context menu
1144 	 * was requested by a mouse or other pointing device (value is 0).
1145 	 *
1146 	 * @since 3.8
1147 	 */
1148 	public static final int MENU_MOUSE = 0;
1149 
1150 	/**
1151 	 * MenuDetect event detail value indicating that a context menu
1152 	 * was requested by a keyboard or other focus-based device (value is 1).
1153 	 *
1154 	 * @since 3.8
1155 	 */
1156 	public static final int MENU_KEYBOARD = 1;
1157 
1158 	/**
1159 	 * A constant indicating that widgets have changed.
1160 	 * (value is 1&lt;&lt;1).
1161 	 *
1162 	 * <p><b>Used By:</b></p>
1163 	 * <ul>
1164 	 * <li><code>Composite</code> layout</li>
1165 	 * </ul>
1166 	 *
1167 	 * @see org.eclipse.swt.widgets.Composite#layout(org.eclipse.swt.widgets.Control[], int)
1168 	 *
1169 	 * @since 3.6
1170 	 */
1171 	public static final int CHANGED = 1 << 1;
1172 
1173 	/**
1174 	 * A constant indicating that a given operation should be deferred.
1175 	 * (value is 1&lt;&lt;2).
1176 	 *
1177 	 * <p><b>Used By:</b></p>
1178 	 * <ul>
1179 	 * <li><code>Composite</code> layout</li>
1180 	 * </ul>
1181 	 *
1182 	 * @see org.eclipse.swt.widgets.Composite#layout(org.eclipse.swt.widgets.Control[], int)
1183 	 *
1184 	 * @since 3.6
1185 	 */
1186 	public static final int DEFER = 1 << 2;
1187 
1188 	/**
1189 	 * A constant known to be zero (0), typically used in operations
1190 	 * which take bit flags to indicate that "no bits are set".
1191 	 */
1192 	public static final int NONE = 0;
1193 
1194 	/**
1195 	 * A constant known to be zero (0), used in operations which
1196 	 * take pointers to indicate a null argument.
1197 	 */
1198 	public static final int NULL = 0;
1199 
1200 	/**
1201 	 * Indicates that a default should be used (value is -1).
1202 	 */
1203 	public static final int DEFAULT = -1;
1204 
1205 	/**
1206 	 * Indicates that a property is off (value is 0).
1207 	 *
1208 	 * @since 3.1
1209 	 */
1210 	public static final int OFF = 0;
1211 
1212 	/**
1213 	 * Indicates that a property is on (value is 1).
1214 	 *
1215 	 * @since 3.1
1216 	 */
1217 	public static final int ON = 1;
1218 
1219 	/**
1220 	 * Indicates low quality (value is 1).
1221 	 *
1222 	 * @since 3.1
1223 	 */
1224 	public static final int LOW = 1;
1225 
1226 	/**
1227 	 * Indicates high quality (value is 2).
1228 	 *
1229 	 * @since 3.1
1230 	 */
1231 	public static final int HIGH = 2;
1232 
1233 	/**
1234 	 * Style constant for menu bar behavior (value is 1&lt;&lt;1).
1235 	 * <p><b>Used By:</b></p>
1236 	 * <ul>
1237 	 * <li><code>Menu</code></li>
1238 	 * </ul>
1239 	 */
1240 	public static final int BAR = 1 << 1;
1241 
1242 	/**
1243 	 * Style constant for drop down menu/list behavior (value is 1&lt;&lt;2).
1244 	 * <p><b>Used By:</b></p>
1245 	 * <ul>
1246 	 * <li><code>Menu</code></li>
1247 	 * <li><code>ToolItem</code></li>
1248 	 * <li><code>CoolItem</code></li>
1249 	 * <li><code>Combo</code></li>
1250 	 * <li><code>DateTime</code></li>
1251 	 * </ul>
1252 	 */
1253 	public static final int DROP_DOWN = 1 << 2;
1254 
1255 	/**
1256 	 * Style constant for pop up menu behavior (value is 1&lt;&lt;3).
1257 	 * <p><b>Used By:</b></p>
1258 	 * <ul>
1259 	 * <li><code>Menu</code></li>
1260 	 * </ul>
1261 	 */
1262 	public static final int POP_UP = 1 << 3;
1263 
1264 	/**
1265 	 * Style constant for line separator behavior (value is 1&lt;&lt;1).
1266 	 * <p><b>Used By:</b></p>
1267 	 * <ul>
1268 	 * <li><code>Label</code></li>
1269 	 * <li><code>MenuItem</code></li>
1270 	 * <li><code>ToolItem</code></li>
1271 	 * </ul>
1272 	 */
1273 	public static final int SEPARATOR = 1 << 1;
1274 
1275 	/**
1276 	 * Constant representing a flexible space separator in a ToolBar.
1277 	 * <p><b>Used By:</b></p>
1278 	 * <ul>
1279 	 * <li><code>ToolItem.setWidth()</code></li>
1280 	 * </ul>
1281 	 *
1282 	 * @since 3.7
1283 	 */
1284 	public static final int SEPARATOR_FILL = -2;
1285 
1286 	/**
1287 	 * Style constant for toggle button behavior (value is 1&lt;&lt;1).
1288 	 * <p><b>Used By:</b></p>
1289 	 * <ul>
1290 	 * <li><code>Button</code></li>
1291 	 * </ul>
1292 	 */
1293 	public static final int TOGGLE = 1 << 1;
1294 
1295 	/**
1296 	 * Style constant for arrow button behavior (value is 1&lt;&lt;2).
1297 	 * <p><b>Used By:</b></p>
1298 	 * <ul>
1299 	 * <li><code>Button</code></li>
1300 	 * </ul>
1301 	 */
1302 	public static final int ARROW = 1 << 2;
1303 
1304 	/**
1305 	 * Style constant for push button behavior (value is 1&lt;&lt;3).
1306 	 * <p><b>Used By:</b></p>
1307 	 * <ul>
1308 	 * <li><code>Button</code></li>
1309 	 * <li><code>MenuItem</code></li>
1310 	 * <li><code>ToolItem</code></li>
1311 	 * </ul>
1312 	 */
1313 	public static final int PUSH = 1 << 3;
1314 
1315 	/**
1316 	 * Style constant for radio button behavior (value is 1&lt;&lt;4).
1317 	 * <p><b>Used By:</b></p>
1318 	 * <ul>
1319 	 * <li><code>Button</code></li>
1320 	 * <li><code>MenuItem</code></li>
1321 	 * <li><code>ToolItem</code></li>
1322 	 * </ul>
1323 	 */
1324 	public static final int RADIO = 1 << 4;
1325 
1326 	/**
1327 	 * Style constant for check box behavior (value is 1&lt;&lt;5).
1328 	 * <p><b>Used By:</b></p>
1329 	 * <ul>
1330 	 * <li><code>Button</code></li>
1331 	 * <li><code>MenuItem</code></li>
1332 	 * <li><code>ToolItem</code></li>
1333 	 * <li><code>Table</code></li>
1334 	 * <li><code>Tree</code></li>
1335 	 * </ul>
1336 	 */
1337 	public static final int CHECK = 1 << 5;
1338 
1339 	/**
1340 	 * Style constant for cascade behavior (value is 1&lt;&lt;6).
1341 	 * <p><b>Used By:</b></p>
1342 	 * <ul>
1343 	 * <li><code>MenuItem</code></li>
1344 	 * </ul>
1345 	 */
1346 	public static final int CASCADE = 1 << 6;
1347 
1348 	/**
1349 	 * Style constant for multi-selection behavior in lists
1350 	 * and multiple line support on text fields (value is 1&lt;&lt;1).
1351 	 * <p><b>Used By:</b></p>
1352 	 * <ul>
1353 	 * <li><code>Text</code></li>
1354 	 * <li><code>List</code></li>
1355 	 * <li><code>Table</code></li>
1356 	 * <li><code>Tree</code></li>
1357 	 * <li><code>FileDialog</code></li>
1358 	 * </ul>
1359 	 */
1360 	public static final int MULTI = 1 << 1;
1361 
1362 	/**
1363 	 * Style constant for single selection behavior in lists
1364 	 * and single line support on text fields (value is 1&lt;&lt;2).
1365 	 * <p><b>Used By:</b></p>
1366 	 * <ul>
1367 	 * <li><code>Text</code></li>
1368 	 * <li><code>List</code></li>
1369 	 * <li><code>Table</code></li>
1370 	 * <li><code>Tree</code></li>
1371 	 * </ul>
1372 	 */
1373 	public static final int SINGLE = 1 << 2;
1374 
1375 	/**
1376 	 * Style constant for read-only behavior (value is 1&lt;&lt;3).
1377 	 * <p><b>Used By:</b></p>
1378 	 * <ul>
1379 	 * <li><code>Combo</code></li>
1380 	 * <li><code>Text</code></li>
1381 	 * </ul>
1382 	 */
1383 	public static final int READ_ONLY = 1 << 3;
1384 
1385 	/**
1386 	 * Style constant for automatic line wrap behavior (value is 1&lt;&lt;6).
1387 	 * <p><b>Used By:</b></p>
1388 	 * <ul>
1389 	 * <li><code>Button</code></li>
1390 	 * <li><code>Label</code></li>
1391 	 * <li><code>Text</code></li>
1392 	 * <li><code>ToolBar</code></li>
1393 	 * <li><code>Spinner</code></li>
1394 	 * </ul>
1395 	 */
1396 	public static final int WRAP = 1 << 6;
1397 
1398 	/**
1399 	 * Style constant for search behavior (value is 1&lt;&lt;7).
1400 	 * <p><b>Used By:</b></p>
1401 	 * <ul>
1402 	 * <li><code>Text</code></li>
1403 	 * </ul>
1404 	 *
1405 	 * @since 3.3
1406 	 */
1407 	public static final int SEARCH = 1 << 7;
1408 
1409 	/**
1410 	 * Style constant for simple (not drop down) behavior (value is 1&lt;&lt;6).
1411 	 * <br>Note that this is a <em>HINT</em>.
1412 	 * <p><b>Used By:</b></p>
1413 	 * <ul>
1414 	 * <li><code>Combo</code></li>
1415 	 * </ul>
1416 	 */
1417 	public static final int SIMPLE = 1 << 6;
1418 
1419 	/**
1420 	 * Style constant for password behavior (value is 1&lt;&lt;22).
1421 	 * <p><b>Used By:</b></p>
1422 	 * <ul>
1423 	 * <li><code>Text</code></li>
1424 	 * </ul>
1425 	 *
1426 	 * @since 3.0
1427 	 */
1428 	public static final int PASSWORD = 1 << 22;
1429 
1430 	/**
1431 	 * Style constant for shadow in behavior (value is 1&lt;&lt;2).
1432 	 * <br>Note that this is a <em>HINT</em>.
1433 	 * <p><b>Used By:</b></p>
1434 	 * <ul>
1435 	 * <li><code>Label</code></li>
1436 	 * <li><code>Group</code></li>
1437 	 * </ul>
1438 	 */
1439 	public static final int SHADOW_IN = 1 << 2;
1440 
1441 	/**
1442 	 * Style constant for shadow out behavior (value is 1&lt;&lt;3).
1443 	 * <br>Note that this is a <em>HINT</em>.
1444 	 * <p><b>Used By:</b></p>
1445 	 * <ul>
1446 	 * <li><code>Label</code></li>
1447 	 * <li><code>Group</code></li>
1448 	 * <li><code>ToolBar</code></li>
1449 	 * </ul>
1450 	 */
1451 	public static final int SHADOW_OUT = 1 << 3;
1452 
1453 	/**
1454 	 * Style constant for shadow etched in behavior (value is 1&lt;&lt;4).
1455 	 * <br>Note that this is a <em>HINT</em>. It is currently ignored on all platforms.
1456 	 * <p><b>Used By:</b></p>
1457 	 * <ul>
1458 	 * <li><code>Group</code></li>
1459 	 * </ul>
1460 	 */
1461 	public static final int SHADOW_ETCHED_IN = 1 << 4;
1462 
1463 	/**
1464 	 * Style constant for shadow etched out behavior (value is 1&lt;&lt;6).
1465 	 * <br>Note that this is a <em>HINT</em>. It is currently ignored on all platforms.
1466 	 * <p><b>Used By:</b></p>
1467 	 * <ul>
1468 	 * <li><code>Group</code></li>
1469 	 * </ul>
1470 	 */
1471 	public static final int SHADOW_ETCHED_OUT = 1 << 6;
1472 
1473 	/**
1474 	 * Style constant for no shadow behavior (value is 1&lt;&lt;5).
1475 	 * <br>Note that this is a <em>HINT</em>.
1476 	 * <p><b>Used By:</b></p>
1477 	 * <ul>
1478 	 * <li><code>Label</code></li>
1479 	 * <li><code>Group</code></li>
1480 	 * </ul>
1481 	 */
1482 	public static final int SHADOW_NONE = 1 << 5;
1483 
1484 	/**
1485 	 * Style constant for progress bar behavior (value is 1&lt;&lt;1).
1486 	 * <p><b>Used By:</b></p>
1487 	 * <ul>
1488 	 * <li><code>ProgressBar</code></li>
1489 	 * </ul>
1490 	 */
1491 	public static final int INDETERMINATE = 1 << 1;
1492 
1493 	/**
1494 	 * Style constant for tool window behavior (value is 1&lt;&lt;2).
1495 	 * <p>
1496 	 * A tool window is a window intended to be used as a floating toolbar.
1497 	 * It typically has a title bar that is shorter than a normal title bar,
1498 	 * and the window title is typically drawn using a smaller font.
1499 	 * <br>Note that this is a <em>HINT</em>.
1500 	 * </p><p><b>Used By:</b></p>
1501 	 * <ul>
1502 	 * <li><code>Decorations</code> and subclasses</li>
1503 	 * </ul>
1504 	 */
1505 	public static final int TOOL = 1 << 2;
1506 
1507 	/**
1508 	 * Style constant to ensure no trimmings are used (value is 1&lt;&lt;3).
1509 	 * <br>Note that this overrides all other trim styles.
1510 	 * <p><b>Used By:</b></p>
1511 	 * <ul>
1512 	 * <li><code>Decorations</code> and subclasses</li>
1513 	 * </ul>
1514 	 */
1515 	public static final int NO_TRIM = 1 << 3;
1516 
1517 	/**
1518 	 * Style constant for resize box trim (value is 1&lt;&lt;4).
1519 	 * <p><b>Used By:</b></p>
1520 	 * <ul>
1521 	 * <li><code>Decorations</code> and subclasses</li>
1522 	 * <li><code>Tracker</code></li>
1523 	 * </ul>
1524 	 */
1525 	public static final int RESIZE = 1 << 4;
1526 
1527 	/**
1528 	 * Style constant for title area trim (value is 1&lt;&lt;5).
1529 	 * <p><b>Used By:</b></p>
1530 	 * <ul>
1531 	 * <li><code>Decorations</code> and subclasses</li>
1532 	 * </ul>
1533 	 */
1534 	public static final int TITLE = 1 << 5;
1535 
1536 	/**
1537 	 * Style constant for close box trim (value is 1&lt;&lt;6,
1538 	 * since we do not distinguish between CLOSE style and MENU style).
1539 	 * <p><b>Used By:</b></p>
1540 	 * <ul>
1541 	 * <li><code>Decorations</code> and subclasses</li>
1542 	 * </ul>
1543 	 */
1544 	public static final int CLOSE = 1 << 6;
1545 
1546 	/**
1547 	 * Style constant for shell menu trim (value is 1&lt;&lt;6,
1548 	 * since we do not distinguish between CLOSE style and MENU style).
1549 	 * <p><b>Used By:</b></p>
1550 	 * <ul>
1551 	 * <li><code>Decorations</code> and subclasses</li>
1552 	 * </ul>
1553 	 */
1554 	public static final int MENU = CLOSE;
1555 
1556 	/**
1557 	 * Style constant for minimize box trim (value is 1&lt;&lt;7).
1558 	 * <p><b>Used By:</b></p>
1559 	 * <ul>
1560 	 * <li><code>Decorations</code> and subclasses</li>
1561 	 * </ul>
1562 	 */
1563 	public static final int MIN = 1 << 7;
1564 
1565 	/**
1566 	 * Style constant for maximize box trim (value is 1&lt;&lt;10).
1567 	 * <p><b>Used By:</b></p>
1568 	 * <ul>
1569 	 * <li><code>Decorations</code> and subclasses</li>
1570 	 * </ul>
1571 	 */
1572 	public static final int MAX = 1 << 10;
1573 
1574 	/**
1575 	 * Style constant for the no move behavior (value is 1&lt;&lt;23).
1576 	 * Creates the title trim when no other trim style is specified.
1577 	 * Doesn't create the title trim when NO_TRIM is specified.
1578 	 * <p>Note that this is a <em>HINT</em>.
1579 	 * <p><b>Used By:</b></p>
1580 	 * <ul>
1581 	 * <li><code>Shell</code></li>
1582 	 * </ul>
1583 	 * @since 3.105
1584 	 */
1585 	public static final int NO_MOVE = 1 << 23;
1586 
1587 	/**
1588 	 * Style constant for horizontal scrollbar behavior (value is 1&lt;&lt;8).
1589 	 * <p><b>Used By:</b></p>
1590 	 * <ul>
1591 	 * <li><code>Scrollable</code> and subclasses</li>
1592 	 * </ul>
1593 	 */
1594 	public static final int H_SCROLL = 1 << 8;
1595 
1596 	/**
1597 	 * Style constant for vertical scrollbar behavior (value is 1&lt;&lt;9).
1598 	 * <p><b>Used By:</b></p>
1599 	 * <ul>
1600 	 * <li><code>Scrollable</code> and subclasses</li>
1601 	 * </ul>
1602 	 */
1603 	public static final int V_SCROLL = 1 << 9;
1604 
1605 	/**
1606 	 * Style constant for no scrollbar behavior (value is 1&lt;&lt;4).
1607 	 * <p>
1608 	 * When neither H_SCROLL or V_SCROLL are specified, controls
1609 	 * are free to create the default scroll bars for the control.
1610 	 * Using NO_SCROLL overrides the default and forces the control
1611 	 * to have no scroll bars.
1612 	 *
1613 	 * <b>Used By:</b></p>
1614 	 * <ul>
1615 	 * <li><code>Tree</code></li>
1616 	 * <li><code>Table</code></li>
1617 	 * </ul>
1618 	 *
1619 	 * @since 3.4
1620 	 */
1621 	public static final int NO_SCROLL = 1 << 4;
1622 
1623 	/**
1624 	 * Style constant for bordered behavior (value is 1&lt;&lt;11).
1625 	 * <br>Note that this is a <em>HINT</em>.
1626 	 * <p><b>Used By:</b></p>
1627 	 * <ul>
1628 	 * <li><code>Control</code> and subclasses</li>
1629 	 * </ul>
1630 	 */
1631 	public static final int BORDER = 1 << 11;
1632 
1633 	/**
1634 	 * Style constant indicating that the window manager should clip
1635 	 * a widget's children with respect to its viewable area. (value is 1&lt;&lt;12).
1636 	 * <br>Note that this is a <em>HINT</em>.
1637 	 * <p><b>Used By:</b></p>
1638 	 * <ul>
1639 	 * <li><code>Control</code> and subclasses</li>
1640 	 * </ul>
1641 	 */
1642 	public static final int CLIP_CHILDREN = 1 << 12;
1643 
1644 	/**
1645 	 * Style constant indicating that the window manager should clip
1646 	 * a widget's siblings with respect to its viewable area. (value is 1&lt;&lt;13).
1647 	 * <br>Note that this is a <em>HINT</em>.
1648 	 * <p><b>Used By:</b></p>
1649 	 * <ul>
1650 	 * <li><code>Control</code> and subclasses</li>
1651 	 * </ul>
1652 	 */
1653 	public static final int CLIP_SIBLINGS = 1 << 13;
1654 
1655 	/**
1656 	 * Style constant for always on top behavior (value is 1&lt;&lt;14).
1657 	 * <br>Note that this is a <em>HINT</em>.
1658 	 * <p><b>Used By:</b></p>
1659 	 * <ul>
1660 	 * <li><code>Shell</code> and subclasses</li>
1661 	 * </ul>
1662 	 */
1663 	public static final int ON_TOP = 1 << 14;
1664 
1665 	/**
1666 	 * Style constant for sheet window behavior (value is 1&lt;&lt;28).
1667 	 * <p>
1668 	 * A sheet window is a window intended to be used as a temporary modal
1669 	 * dialog that is attached to a parent window. It is typically used to
1670 	 * prompt the user before proceeding. The window trim, positioning and
1671 	 * general look of a sheet window is platform specific. For example,
1672 	 * on the Macintosh, at the time this documentation was written, the
1673 	 * window title is not visible.
1674 	 * <br>Note that this is a <em>HINT</em>.
1675 	 * </p><p><b>Used By:</b></p>
1676 	 * <ul>
1677 	 * <li><code>Dialog</code> and subclasses</li>
1678 	 * <li><code>Shell</code> and subclasses</li>
1679 	 * </ul>
1680 	 *
1681 	 * @since 3.5
1682 	 */
1683 	public static final int SHEET = 1 << 28;
1684 
1685 	/**
1686 	 * Trim style convenience constant for the most common top level shell appearance
1687 	 * (value is CLOSE|TITLE|MIN|MAX|RESIZE).
1688 	 * <p><b>Used By:</b></p>
1689 	 * <ul>
1690 	 * <li><code>Shell</code></li>
1691 	 * </ul>
1692 	 */
1693 	public static final int SHELL_TRIM = CLOSE | TITLE | MIN | MAX | RESIZE;
1694 
1695 	/**
1696 	 * Trim style convenience constant for the most common dialog shell appearance
1697 	 * (value is CLOSE|TITLE|BORDER).
1698 	 * <p><b>Used By:</b></p>
1699 	 * <ul>
1700 	 * <li><code>Shell</code></li>
1701 	 * </ul>
1702 	 */
1703 	public static final int DIALOG_TRIM = TITLE | CLOSE | BORDER;
1704 
1705 	/**
1706 	 * Style constant for modeless behavior (value is 0).
1707 	 * <br>Note that this is a <em>HINT</em>.
1708 	 * <p><b>Used By:</b></p>
1709 	 * <ul>
1710 	 * <li><code>Dialog</code></li>
1711 	 * <li><code>Shell</code></li>
1712 	 * </ul>
1713 	 */
1714 	public static final int MODELESS = 0;
1715 
1716 	/**
1717 	 * Style constant for primary modal behavior (value is 1&lt;&lt;15).
1718 	 * <br>Note that this is a <em>HINT</em>.
1719 	 * <p><b>Used By:</b></p>
1720 	 * <ul>
1721 	 * <li><code>Dialog</code></li>
1722 	 * <li><code>Shell</code></li>
1723 	 * </ul>
1724 	 */
1725 	public static final int PRIMARY_MODAL = 1 << 15;
1726 
1727 	/**
1728 	 * Style constant for application modal behavior (value is 1&lt;&lt;16).
1729 	 * <br>Note that this is a <em>HINT</em>.
1730 	 * <p><b>Used By:</b></p>
1731 	 * <ul>
1732 	 * <li><code>Dialog</code></li>
1733 	 * <li><code>Shell</code></li>
1734 	 * </ul>
1735 	 */
1736 	public static final int APPLICATION_MODAL = 1 << 16;
1737 
1738 	/**
1739 	 * Style constant for system modal behavior (value is 1&lt;&lt;17).
1740 	 * <br>Note that this is a <em>HINT</em>.
1741 	 * <p><b>Used By:</b></p>
1742 	 * <ul>
1743 	 * <li><code>Dialog</code></li>
1744 	 * <li><code>Shell</code></li>
1745 	 * </ul>
1746 	 */
1747 	public static final int SYSTEM_MODAL = 1 << 17;
1748 
1749 	/**
1750 	 * Style constant for selection hiding behavior when the widget loses focus (value is 1&lt;&lt;15).
1751 	 * <br>Note that this is a <em>HINT</em>.
1752 	 * <p><b>Used By:</b></p>
1753 	 * <ul>
1754 	 * <li><code>Table</code></li>
1755 	 * </ul>
1756 	 */
1757 	public static final int HIDE_SELECTION = 1 << 15;
1758 
1759 	/**
1760 	 * Style constant for full row selection behavior and
1761 	 * selection constant indicating that a full line should be
1762 	 * drawn. (value is 1&lt;&lt;16).
1763 	 * <br>Note that for some widgets this is a <em>HINT</em>.
1764 	 * <p><b>Used By:</b></p>
1765 	 * <ul>
1766 	 * <li><code>Table</code></li>
1767 	 * <li><code>Tree</code></li>
1768 	 * <li><code>StyledText</code></li>
1769 	 * <li><code>TextLayout</code></li>
1770 	 * </ul>
1771 	 */
1772 	public static final int FULL_SELECTION = 1 << 16;
1773 
1774 	/**
1775 	 * Style constant for flat appearance. (value is 1&lt;&lt;23).
1776 	 * <br>Note that this is a <em>HINT</em>.
1777 	 * <p><b>Used By:</b></p>
1778 	 * <ul>
1779 	 * <li><code>Button</code></li>
1780 	 * <li><code>ToolBar</code></li>
1781 	 * </ul>
1782 	 */
1783 	public static final int FLAT = 1 << 23;
1784 
1785 	/**
1786 	 * Style constant for smooth appearance. (value is 1&lt;&lt;16).
1787 	 * <br>Note that this is a <em>HINT</em>.
1788 	 * <p><b>Used By:</b></p><ul>
1789 	 * <li><code>ProgressBar</code></li>
1790 	 * <li><code>Sash</code></li>
1791 	 * </ul>
1792 	 */
1793 	public static final int SMOOTH = 1 << 16;
1794 
1795 	/**
1796 	 * Style constant for no background behavior (value is 1&lt;&lt;18).
1797 	 * <p>
1798 	 * By default, before a widget paints, the client area is filled with the current background.
1799 	 * When this style is specified, the background is not filled, and the application is responsible
1800 	 * for filling every pixel of the client area.
1801 	 * This style might be used as an alternative to "double-buffering" in order to reduce flicker.
1802 	 * This style does not mean "transparent" - widgets that are obscured will not draw through.
1803 	 * </p><p><b>Used By:</b></p>
1804 	 * <ul>
1805 	 * <li><code>Composite</code></li>
1806 	 * </ul>
1807 	 */
1808 	public static final int NO_BACKGROUND = 1 << 18;
1809 
1810 	/**
1811 	 * Style constant for no focus from the mouse behavior (value is 1&lt;&lt;19).
1812 	 * <p>
1813 	 * Normally, when the user clicks on a control, focus is assigned to that
1814 	 * control, providing the control has no children.  Some controls, such as
1815 	 * tool bars and sashes, don't normally take focus when the mouse is clicked
1816 	 * or accept focus when assigned from within the program.  This style allows
1817 	 * Composites to implement "no focus" mouse behavior.
1818 	 *
1819 	 * <br>Note that this is a <em>HINT</em>.
1820 	 * </p>
1821 	 * <p><b>Used By:</b></p>
1822 	 * <ul>
1823 	 * <li><code>Composite</code></li>
1824 	 * </ul>
1825 	 */
1826 	public static final int NO_FOCUS = 1 << 19;
1827 
1828 	/**
1829 	 * Style constant for no redraw on resize behavior (value is 1&lt;&lt;20).
1830 	 * <p>
1831 	 * This style stops the entire client area from being invalidated when the size
1832 	 * of the Canvas changes. Specifically, when the size of the Canvas gets smaller,
1833 	 * the SWT.Paint event is not sent. When it gets bigger, an SWT.Paint event is
1834 	 * sent with a GC clipped to only the new areas to be painted. Without this
1835 	 * style, the entire client area will be repainted.
1836 	 *
1837 	 * <br>Note that this is a <em>HINT</em>.
1838 	 * </p><p><b>Used By:</b></p>
1839 	 * <ul>
1840 	 * <li><code>Composite</code></li>
1841 	 * </ul>
1842 	 */
1843 	public static final int NO_REDRAW_RESIZE = 1 << 20;
1844 
1845 	/**
1846 	 * Style constant for no paint event merging behavior (value is 1&lt;&lt;21).
1847 	 *
1848 	 * <br>Note that this is a <em>HINT</em>.
1849 	 * <p><b>Used By:</b></p>
1850 	 * <ul>
1851 	 * <li><code>Composite</code></li>
1852 	 * </ul>
1853 	 */
1854 	public static final int NO_MERGE_PAINTS = 1 << 21;
1855 
1856 	/**
1857 	 * Style constant for preventing child radio group behavior (value is 1&lt;&lt;22).
1858 	 * <p><b>Used By:</b></p>
1859 	 * <ul>
1860 	 * <li><code>Composite</code></li>
1861 	 * <li><code>Menu</code></li>
1862 	 * </ul>
1863 	 */
1864 	public static final int NO_RADIO_GROUP = 1 << 22;
1865 
1866 	/**
1867 	 * Style constant for left to right orientation (value is 1&lt;&lt;25).
1868 	 * <p>
1869 	 * When orientation is not explicitly specified, orientation is
1870 	 * inherited.  This means that children will be assigned the
1871 	 * orientation of their parent.  To override this behavior and
1872 	 * force an orientation for a child, explicitly set the orientation
1873 	 * of the child when that child is created.
1874 	 * <br>Note that this is a <em>HINT</em>.
1875 	 * </p>
1876 	 * <p><b>Used By:</b></p>
1877 	 * <ul>
1878 	 * <li><code>Control</code></li>
1879 	 * <li><code>Menu</code></li>
1880 	 * <li><code>GC</code></li>
1881 	 * </ul>
1882 	 *
1883 	 * @since 2.1.2
1884 	 */
1885 	public static final int LEFT_TO_RIGHT = 1 << 25;
1886 
1887 	/**
1888 	 * Style constant for right to left orientation (value is 1&lt;&lt;26).
1889 	 * <p>
1890 	 * When orientation is not explicitly specified, orientation is
1891 	 * inherited.  This means that children will be assigned the
1892 	 * orientation of their parent.  To override this behavior and
1893 	 * force an orientation for a child, explicitly set the orientation
1894 	 * of the child when that child is created.
1895 	 * <br>Note that this is a <em>HINT</em>.
1896 	 * </p>
1897 	 * <p><b>Used By:</b></p>
1898 	 * <ul>
1899 	 * <li><code>Control</code></li>
1900 	 * <li><code>Menu</code></li>
1901 	 * <li><code>GC</code></li>
1902 	 * </ul>
1903 	 *
1904 	 * @since 2.1.2
1905 	 */
1906 	public static final int RIGHT_TO_LEFT = 1 << 26;
1907 
1908 	/**
1909 	 * Style constant to indicate coordinate mirroring (value is 1&lt;&lt;27).
1910 	 * <p><b>Used By:</b></p>
1911 	 * <ul>
1912 	 * <li><code>Control</code></li>
1913 	 * <li><code>Menu</code></li>
1914 	 * </ul>
1915 	 *
1916 	 * @since 2.1.2
1917 	 */
1918 	public static final int MIRRORED = 1 << 27;
1919 
1920 	/**
1921 	 * Style constant to allow embedding (value is 1&lt;&lt;24).
1922 	 * <p><b>Used By:</b></p>
1923 	 * <ul>
1924 	 * <li><code>Composite</code></li>
1925 	 * </ul>
1926 	 *
1927 	 * @since 3.0
1928 	 */
1929 	public static final int EMBEDDED = 1 << 24;
1930 
1931 	/**
1932 	 * Style constant to allow virtual data (value is 1&lt;&lt;28).
1933 	 * <p><b>Used By:</b></p>
1934 	 * <ul>
1935 	 * <li><code>Table</code></li>
1936 	 * <li><code>Tree</code></li>
1937 	 * </ul>
1938 	 *
1939 	 * @since 3.0
1940 	 */
1941 	public static final int VIRTUAL = 1 << 28;
1942 
1943 	/**
1944 	 * Style constant to indicate double buffering (value is 1&lt;&lt;29).
1945 	 * <p><b>Used By:</b></p>
1946 	 * <ul>
1947 	 * <li><code>Control</code></li>
1948 	 * </ul>
1949 	 *
1950 	 * @since 3.1
1951 	 */
1952 	public static final int DOUBLE_BUFFERED = 1 << 29;
1953 
1954 	/**
1955 	 * Style constant for transparent behavior (value is 1&lt;&lt;30).
1956 	 * <p>
1957 	 * By default, before a widget paints, the client area is filled with the current background.
1958 	 * When this style is specified, the background is not filled and widgets that are obscured
1959 	 * will draw through.
1960 	 * </p><p><b>Used By:</b></p>
1961 	 * <ul>
1962 	 * <li><code>Composite</code></li>
1963 	 * </ul>
1964 	 *
1965 	 * @since 3.4
1966 	 *
1967 	 * WARNING: THIS API IS UNDER CONSTRUCTION AND SHOULD NOT BE USED
1968 	 */
1969 	public static final int TRANSPARENT = 1 << 30;
1970 
1971 	/**
1972 	 * Style constant to indicate base text direction (value is 1&lt;&lt;31).
1973 	 * <p>
1974 	 * When the bit is set, text direction mismatches the widget orientation.
1975 	 * <br>Note that this is a <em>HINT</em>.
1976 	 * </p>
1977 	 * <p><b>Used By:</b></p>
1978 	 * <ul>
1979 	 * <li><code>Control</code></li>
1980 	 * </ul>
1981 	 *
1982 	 * @see org.eclipse.swt.widgets.Control#setTextDirection(int)
1983 	 * @see org.eclipse.swt.widgets.Control#getTextDirection()
1984 	 *
1985 	 * @since 3.102
1986 	 */
1987 	public static final int FLIP_TEXT_DIRECTION = 1 << 31;
1988 
1989 	/**
1990 	 * A bit mask to indicate Bidi "auto" text direction.
1991 	 * <p>
1992 	 * When the bit is set, text direction is derived from the direction of the
1993 	 * first strong Bidi character.
1994 	 * </p>
1995 	 * <br>Note that this is a <em>HINT</em> and it works on Windows only.
1996 	 * <p><b>Used By:</b></p>
1997 	 * <ul>
1998 	 * <li><code>Control</code></li>
1999 	 * <li><code>TextLayout</code></li>
2000 	 * </ul>
2001 	 *
2002 	 * @see org.eclipse.swt.widgets.Control#setTextDirection(int)
2003 	 * @see org.eclipse.swt.graphics.TextLayout#setTextDirection(int)
2004 	 *
2005 	 * @since 3.105
2006 	*/
2007 	public static final int AUTO_TEXT_DIRECTION = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT;
2008 
2009 	/**
2010 	 * Style constant for align up behavior (value is 1&lt;&lt;7,
2011 	 * since align UP and align TOP are considered the same).
2012 	 * <p><b>Used By:</b></p>
2013 	 * <ul>
2014 	 * <li><code>Button</code> with <code>ARROW</code> style</li>
2015 	 * <li><code>Tracker</code></li>
2016 	 * <li><code>Table</code></li>
2017 	 * <li><code>Tree</code></li>
2018 	 * </ul>
2019 	 */
2020 	public static final int UP = 1 << 7;
2021 
2022 	/**
2023 	 * Style constant to indicate single underline (value is 0).
2024 	 * <p><b>Used By:</b></p>
2025 	 * <ul>
2026 	 * <li><code>TextStyle</code></li>
2027 	 * </ul>
2028 	 *
2029 	 * @since 3.4
2030 	 */
2031 	public static final int UNDERLINE_SINGLE = 0;
2032 
2033 	/**
2034 	 * Style constant to indicate double underline (value is 1).
2035 	 * <p><b>Used By:</b></p>
2036 	 * <ul>
2037 	 * <li><code>TextStyle</code></li>
2038 	 * </ul>
2039 	 *
2040 	 * @since 3.4
2041 	 */
2042 	public static final int UNDERLINE_DOUBLE = 1;
2043 
2044 	/**
2045 	 * Style constant to indicate error underline (value is 2).
2046 	 * <p><b>Used By:</b></p>
2047 	 * <ul>
2048 	 * <li><code>TextStyle</code></li>
2049 	 * </ul>
2050 	 *
2051 	 * @since 3.4
2052 	 */
2053 	public static final int UNDERLINE_ERROR = 2;
2054 
2055 	/**
2056 	 * Style constant to indicate squiggle underline (value is 3).
2057 	 * <p><b>Used By:</b></p>
2058 	 * <ul>
2059 	 * <li><code>TextStyle</code></li>
2060 	 * </ul>
2061 	 *
2062 	 * @since 3.4
2063 	 */
2064 	public static final int UNDERLINE_SQUIGGLE = 3;
2065 
2066 	/**
2067 	 * Style constant to indicate link underline (value is 0).
2068 	 * <p>
2069 	 * If the text color or the underline color are not set in the range
2070 	 * the usage of <code>UNDERLINE_LINK</code> will change these colors
2071 	 * to the preferred link color of the platform.<br>
2072 	 * Note that clients that use this style, such as <code>StyledText</code>,
2073 	 * will include code to track the mouse and change the cursor to the hand
2074 	 * cursor when mouse is over the link.
2075 	 * </p>
2076 	 * <p><b>Used By:</b></p>
2077 	 * <ul>
2078 	 * <li><code>TextStyle</code></li>
2079 	 * </ul>
2080 	 *
2081 	 * @since 3.5
2082 	 */
2083 	public static final int UNDERLINE_LINK = 4;
2084 
2085 	/**
2086 	 * Style constant to indicate solid border (value is 1).
2087 	 * <p><b>Used By:</b></p>
2088 	 * <ul>
2089 	 * <li><code>TextStyle</code></li>
2090 	 * </ul>
2091 	 *
2092 	 * @since 3.4
2093 	 */
2094 	public static final int BORDER_SOLID = 1;
2095 
2096 	/**
2097 	 * Style constant to indicate dashed border (value is 2).
2098 	 * <p><b>Used By:</b></p>
2099 	 * <ul>
2100 	 * <li><code>TextStyle</code></li>
2101 	 * </ul>
2102 	 *
2103 	 * @since 3.4
2104 	 */
2105 	public static final int BORDER_DASH = 2;
2106 
2107 	/**
2108 	 * Style constant to indicate dotted border (value is 4).
2109 	 * <p><b>Used By:</b></p>
2110 	 * <ul>
2111 	 * <li><code>TextStyle</code></li>
2112 	 * </ul>
2113 	 *
2114 	 * @since 3.4
2115 	 */
2116 	public static final int BORDER_DOT = 4;
2117 
2118 	/**
2119 	 * Style constant for align top behavior (value is 1&lt;&lt;7,
2120 	 * since align UP and align TOP are considered the same).
2121 	 * <p><b>Used By:</b></p>
2122 	 * <ul>
2123 	 * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
2124 	 * </ul>
2125 	 */
2126 	public static final int TOP = UP;
2127 
2128 	/**
2129 	 * Style constant for align down behavior (value is 1&lt;&lt;10,
2130 	 * since align DOWN and align BOTTOM are considered the same).
2131 	 * <p><b>Used By:</b></p>
2132 	 * <ul>
2133 	 * <li><code>Button</code> with <code>ARROW</code> style</li>
2134 	 * <li><code>Tracker</code></li>
2135 	 * <li><code>Table</code></li>
2136 	 * <li><code>Tree</code></li>
2137 	 * </ul>
2138 	 */
2139 	public static final int DOWN               = 1 << 10;
2140 
2141 	/**
2142 	 * Style constant for align bottom behavior (value is 1&lt;&lt;10,
2143 	 * since align DOWN and align BOTTOM are considered the same).
2144 	 * <p><b>Used By:</b></p>
2145 	 * <ul>
2146 	 * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
2147 	 * <li><code>TabFolder</code></li>
2148 	 * </ul>
2149 	 */
2150 	public static final int BOTTOM             = DOWN;
2151 
2152 	/**
2153 	 * Style constant for leading alignment (value is 1&lt;&lt;14).
2154 	 * <p><b>Used By:</b></p>
2155 	 * <ul>
2156 	 * <li><code>Button</code></li>
2157 	 * <li><code>Label</code></li>
2158 	 * <li><code>Text</code></li>
2159 	 * <li><code>TableColumn</code></li>
2160 	 * <li><code>TreeColumn</code></li>
2161 	 * <li><code>Tracker</code></li>
2162 	 * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
2163 	 * </ul>
2164 	 *
2165 	 * @since 2.1.2
2166 	 */
2167 	public static final int LEAD               = 1 << 14;
2168 
2169 	/**
2170 	 * Style constant for align left behavior (value is 1&lt;&lt;14).
2171 	 * This is a synonym for {@link #LEAD} (value is 1&lt;&lt;14).  Newer
2172 	 * applications should use {@link #LEAD} instead of {@link #LEFT} to make code more
2173 	 * understandable on right-to-left platforms.
2174 	 * <p>
2175 	 * This constant can also be used to representing the left keyboard
2176 	 * location during a key event.
2177 	 * </p>
2178 	 */
2179 	public static final int LEFT               = LEAD;
2180 
2181 	/**
2182 	 * Style constant for trailing alignment (value is 1&lt;&lt;17).
2183 	 * <p><b>Used By:</b></p>
2184 	 * <ul>
2185 	 * <li><code>Button</code></li>
2186 	 * <li><code>Label</code></li>
2187 	 * <li><code>Text</code></li>
2188 	 * <li><code>TableColumn</code></li>
2189 	 * <li><code>TreeColumn</code></li>
2190 	 * <li><code>Tracker</code></li>
2191 	 * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
2192 	 * </ul>
2193 	 *
2194 	 * @since 2.1.2
2195 	 */
2196 	public static final int TRAIL              = 1 << 17;
2197 
2198 	/**
2199 	 * Style constant for align right behavior (value is 1&lt;&lt;17).
2200 	 * This is a synonym for {@link #TRAIL} (value is 1&lt;&lt;17).  Newer
2201 	 * applications should use {@link #TRAIL} instead of {@link #RIGHT} to make code more
2202 	 * understandable on right-to-left platforms.
2203 	 * <p>
2204 	 * This constant can also be used to representing the right keyboard
2205 	 * location during a key event.
2206 	 * </p>
2207 	 */
2208 	public static final int RIGHT              = TRAIL;
2209 
2210 	/**
2211 	 * Style constant for align center behavior (value is 1&lt;&lt;24).
2212 	 * <p><b>Used By:</b></p>
2213 	 * <ul>
2214 	 * <li><code>Button</code></li>
2215 	 * <li><code>Label</code></li>
2216 	 * <li><code>TableColumn</code></li>
2217 	 * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
2218 	 * </ul>
2219 	 */
2220 	public static final int CENTER = 1 << 24;
2221 
2222 	/**
2223 	 * Style constant for horizontal alignment or orientation behavior (value is 1&lt;&lt;8).
2224 	 * <p><b>Used By:</b></p>
2225 	 * <ul>
2226 	 * <li><code>Label</code></li>
2227 	 * <li><code>ProgressBar</code></li>
2228 	 * <li><code>Sash</code></li>
2229 	 * <li><code>Scale</code></li>
2230 	 * <li><code>ScrollBar</code></li>
2231 	 * <li><code>Slider</code></li>
2232 	 * <li><code>ToolBar</code></li>
2233 	 * <li><code>FillLayout</code> type</li>
2234 	 * <li><code>RowLayout</code> type</li>
2235 	 * </ul>
2236 	 */
2237 	public static final int HORIZONTAL = 1 << 8;
2238 
2239 	/**
2240 	 * Style constant for vertical alignment or orientation behavior (value is 1&lt;&lt;9).
2241 	 * <p><b>Used By:</b></p>
2242 	 * <ul>
2243 	 * <li><code>Label</code></li>
2244 	 * <li><code>ProgressBar</code></li>
2245 	 * <li><code>Sash</code></li>
2246 	 * <li><code>Scale</code></li>
2247 	 * <li><code>ScrollBar</code></li>
2248 	 * <li><code>Slider</code></li>
2249 	 * <li><code>ToolBar</code></li>
2250 	 * <li><code>CoolBar</code></li>
2251 	 * <li><code>FillLayout</code> type</li>
2252 	 * <li><code>RowLayout</code> type</li>
2253 	 * </ul>
2254 	 */
2255 	public static final int VERTICAL = 1 << 9;
2256 
2257 	/**
2258 	 * Style constant for date display (value is 1&lt;&lt;5).
2259 	 * <p><b>Used By:</b></p>
2260 	 * <ul>
2261 	 * <li><code>DateTime</code></li>
2262 	 * </ul>
2263 	 *
2264 	 * @since 3.3
2265 	 */
2266 	public static final int DATE = 1 << 5;
2267 
2268 	/**
2269 	 * Style constant for time display (value is 1&lt;&lt;7).
2270 	 * <p><b>Used By:</b></p>
2271 	 * <ul>
2272 	 * <li><code>DateTime</code></li>
2273 	 * </ul>
2274 	 *
2275 	 * @since 3.3
2276 	 */
2277 	public static final int TIME = 1 << 7;
2278 
2279 	/**
2280 	 * Style constant for calendar display (value is 1&lt;&lt;10).
2281 	 * <p><b>Used By:</b></p>
2282 	 * <ul>
2283 	 * <li><code>DateTime</code></li>
2284 	 * </ul>
2285 	 *
2286 	 * @since 3.3
2287 	 */
2288 	public static final int CALENDAR = 1 << 10;
2289 
2290 	/**
2291 	 * Style constant for displaying week numbers in the calendar.
2292 	 * <br>Note that this is a <em>HINT</em> and is supported on Windows &amp; GTK platforms only.
2293 	 * <p><b>Used By:</b></p>
2294 	 * <ul>
2295 	 * <li><code>DateTime</code></li>
2296 	 * </ul>
2297 	 *
2298 	 * @since 3.108
2299 	 */
2300 	public static final int CALENDAR_WEEKNUMBERS = 1 << 14;
2301 
2302 	/**
2303 	 * Style constant for short date/time format (value is 1&lt;&lt;15).
2304 	 * <p>
2305 	 * A short date displays the month and year.
2306 	 * A short time displays hours and minutes.
2307 	 * <br>Note that this is a <em>HINT</em>.
2308 	 * </p>
2309 	 * <p><b>Used By:</b></p>
2310 	 * <ul>
2311 	 * <li><code>DateTime</code></li>
2312 	 * </ul>
2313 	 *
2314 	 * @since 3.3
2315 	 */
2316 	public static final int SHORT = 1 << 15;
2317 
2318 	/**
2319 	 * Style constant for medium date/time format (value is 1&lt;&lt;16).
2320 	 * <p>
2321 	 * A medium date displays the day, month and year.
2322 	 * A medium time displays hours, minutes, and seconds.
2323 	 * <br>Note that this is a <em>HINT</em>.
2324 	 * </p>
2325 	 * <p><b>Used By:</b></p>
2326 	 * <ul>
2327 	 * <li><code>DateTime</code></li>
2328 	 * </ul>
2329 	 *
2330 	 * @since 3.3
2331 	 */
2332 	public static final int MEDIUM = 1 << 16;
2333 
2334 	/**
2335 	 * Style constant for long date/time format (value is 1&lt;&lt;28).
2336 	 * <p>
2337 	 * A long date displays the day, month and year.
2338 	 * A long time displays hours, minutes, and seconds.
2339 	 * The day and month names may be displayed.
2340 	 * <br>Note that this is a <em>HINT</em>.
2341 	 * </p>
2342 	 * <p><b>Used By:</b></p>
2343 	 * <ul>
2344 	 * <li><code>DateTime</code></li>
2345 	 * </ul>
2346 	 *
2347 	 * @since 3.3
2348 	 */
2349 	public static final int LONG = 1 << 28;
2350 
2351 	/**
2352 	 * Style constant specifying that a Browser should use a Mozilla GRE
2353 	 * for rendering its content (value is 1&lt;&lt;15).
2354 	 * <p><b>Used By:</b></p>
2355 	 * <ul>
2356 	 * <li><code>Browser</code></li>
2357 	 * </ul>
2358 	 *
2359 	 * @since 3.3
2360 	 * @deprecated This style is deprecated and will be removed in the future.
2361 	 *             XULRunner as a browser renderer is no longer supported. Use
2362 	 *             <code>SWT.WEBKIT</code> or <code>SWT.NONE</code> instead.
2363 	 */
2364 	@Deprecated
2365 	public static final int MOZILLA = 1 << 15;
2366 
2367 	/**
2368 	 * Style constant specifying that a Browser should use WebKit
2369 	 * for rendering its content (value is 1&lt;&lt;16).
2370 	 * <p><b>Used By:</b></p>
2371 	 * <ul>
2372 	 * <li><code>Browser</code></li>
2373 	 * </ul>
2374 	 *
2375 	 * @since 3.7
2376 	 */
2377 	public static final int WEBKIT = 1 << 16;
2378 
2379 	/**
2380 	 * Style constant for balloon behavior (value is 1&lt;&lt;12).
2381 	 * <p><b>Used By:</b></p>
2382 	 * <ul>
2383 	 * <li><code>ToolTip</code></li>
2384 	 * </ul>
2385 	 *
2386 	 * @since 3.2
2387 	 */
2388 	public static final int BALLOON = 1 << 12;
2389 
2390 	/**
2391 	 * Style constant for alignment or orientation behavior (value is 1).
2392 	 * <p><b>Used By:</b></p>
2393 	 * <ul>
2394 	 * <li><code>GridLayout</code> type</li>
2395 	 * </ul>
2396 	 */
2397 	public static final int BEGINNING = 1;
2398 
2399 	/**
2400 	 * Style constant for alignment or orientation behavior (value is 4).
2401 	 * <p><b>Used By:</b></p>
2402 	 * <ul>
2403 	 * <li><code>GridLayout</code> type</li>
2404 	 * </ul>
2405 	 */
2406 	public static final int FILL = 4;
2407 
2408 	/**
2409 	 * Input Method Editor style constant for double byte
2410 	 * input behavior (value is 1&lt;&lt;1).
2411 	 */
2412 	public static final int DBCS = 1 << 1;
2413 
2414 	/**
2415 	 * Input Method Editor style constant for alpha
2416 	 * input behavior (value is 1&lt;&lt;2).
2417 	 */
2418 	public static final int ALPHA = 1 << 2;
2419 
2420 	/**
2421 	 * Input Method Editor style constant for native
2422 	 * input behavior (value is 1&lt;&lt;3).
2423 	 */
2424 	public static final int NATIVE = 1 << 3;
2425 
2426 	/**
2427 	 * Input Method Editor style constant for phonetic
2428 	 * input behavior (value is 1&lt;&lt;4).
2429 	 */
2430 	public static final int PHONETIC = 1 << 4;
2431 
2432 	/**
2433 	 * Input Method Editor style constant for romanicized
2434 	 * input behavior (value is 1&lt;&lt;5).
2435 	 */
2436 	public static final int ROMAN = 1 << 5;
2437 
2438 	/**
2439 	 * ASCII character convenience constant for the backspace character
2440 	 * (value is the <code>char</code> '\b').
2441 	 */
2442 	public static final char BS = '\b';
2443 
2444 	/**
2445 	 * ASCII character convenience constant for the carriage return character
2446 	 * (value is the <code>char</code> '\r').
2447 	 */
2448 	public static final char CR = '\r';
2449 
2450 	/**
2451 	 * ASCII character convenience constant for the delete character
2452 	 * (value is the <code>char</code> with value 127).
2453 	 */
2454 	public static final char DEL = 0x7F;
2455 
2456 	/**
2457 	 * ASCII character convenience constant for the escape character
2458 	 * (value is the <code>char</code> with value 27).
2459 	 */
2460 	public static final char ESC = 0x1B;
2461 
2462 	/**
2463 	 * ASCII character convenience constant for the line feed character
2464 	 * (value is the <code>char</code> '\n').
2465 	 */
2466 	public static final char LF = '\n';
2467 
2468 	/**
2469 	 * ASCII character convenience constant for the tab character
2470 	 * (value is the <code>char</code> '\t').
2471 	 *
2472 	 * @since 2.1
2473 	 */
2474 	public static final char TAB = '\t';
2475 
2476 	/**
2477 	 * ASCII character convenience constant for the space character
2478 	 * (value is the <code>char</code> ' ').
2479 	 *
2480 	 * @since 3.7
2481 	 */
2482 	public static final char SPACE = ' ';
2483 
2484 	/**
2485 	 * Keyboard and/or mouse event mask indicating that the ALT_GR key
2486 	 * was pushed on the keyboard when the event was generated
2487 	 * (value is 1 &lt;&lt; 15).
2488 	 *
2489 	 * @since 3.108
2490 	 */
2491 	public static final int ALT_GR = 1 << 15;
2492 
2493 	/**
2494 	 * keyboard and/or mouse event mask indicating that the ALT key
2495 	 * was pushed on the keyboard when the event was generated
2496 	 * (value is 1&lt;&lt;16).
2497 	 */
2498 	public static final int ALT = 1 << 16;
2499 
2500 	/**
2501 	 * Keyboard and/or mouse event mask indicating that the SHIFT key
2502 	 * was pushed on the keyboard when the event was generated
2503 	 * (value is 1&lt;&lt;17).
2504 	 */
2505 	public static final int SHIFT = 1 << 17;
2506 
2507 	/**
2508 	 * Keyboard and/or mouse event mask indicating that the CTRL key
2509 	 * was pushed on the keyboard when the event was generated
2510 	 * (value is 1&lt;&lt;18).
2511 	 */
2512 	public static final int CTRL = 1 << 18;
2513 
2514 	/**
2515 	 * Keyboard and/or mouse event mask indicating that the CTRL key
2516 	 * was pushed on the keyboard when the event was generated. This
2517 	 * is a synonym for CTRL (value is 1&lt;&lt;18).
2518 	 */
2519 	public static final int CONTROL = CTRL;
2520 
2521 	/**
2522 	 * Keyboard and/or mouse event mask indicating that the COMMAND key
2523 	 * was pushed on the keyboard when the event was generated
2524 	 * (value is 1&lt;&lt;22).
2525 	 *
2526 	 * @since 2.1
2527 	 */
2528 	public static final int COMMAND = 1 << 22;
2529 
2530 	/**
2531 	 * Keyboard and/or mouse event mask indicating all possible
2532 	 * keyboard modifiers.
2533 	 *
2534 	 * To allow for the future, this mask  is intended to be used in
2535 	 * place of code that references  each individual keyboard mask.
2536 	 *  For example, the following expression will determine whether
2537 	 * any modifier is pressed and will continue to work as new modifier
2538 	 * masks are added.
2539 	 *
2540 	 * <code>(stateMask &amp; SWT.MODIFIER_MASK) != 0</code>.
2541 	 *
2542 	 * @since 2.1
2543 	 */
2544 	public static final int MODIFIER_MASK;
2545 
2546 	/**
2547 	 * Keyboard and/or mouse event mask indicating that mouse button one (usually 'left')
2548 	 * was pushed when the event was generated. (value is 1&lt;&lt;19).
2549 	 */
2550 	public static final int BUTTON1 = 1 << 19;
2551 
2552 	/**
2553 	 * Keyboard and/or mouse event mask indicating that mouse button two (usually 'middle')
2554 	 * was pushed when the event was generated. (value is 1&lt;&lt;20).
2555 	 */
2556 	public static final int BUTTON2 = 1 << 20;
2557 
2558 	/**
2559 	 * Keyboard and/or mouse event mask indicating that mouse button three (usually 'right')
2560 	 * was pushed when the event was generated. (value is 1&lt;&lt;21).
2561 	 */
2562 	public static final int BUTTON3 = 1 << 21;
2563 
2564 	/**
2565 	 * Keyboard and/or mouse event mask indicating that mouse button four
2566 	 * was pushed when the event was generated. (value is 1&lt;&lt;23).
2567 	 *
2568 	 * @since 3.1
2569 	 */
2570 	public static final int BUTTON4 = 1 << 23;
2571 
2572 	/**
2573 	 * Keyboard and/or mouse event mask indicating that mouse button five
2574 	 * was pushed when the event was generated. (value is 1&lt;&lt;25).
2575 	 *
2576 	 * @since 3.1
2577 	 */
2578 	public static final int BUTTON5 = 1 << 25;
2579 
2580 	/**
2581 	 * Keyboard and/or mouse event mask indicating all possible
2582 	 * mouse buttons.
2583 	 *
2584 	 * To allow for the future, this mask  is intended to be used
2585 	 * in place of code that references each individual button mask.
2586 	 * For example, the following expression will determine whether
2587 	 * any button is pressed and will continue to work as new button
2588 	 * masks are added.
2589 	 *
2590 	 * <code>(stateMask &amp; SWT.BUTTON_MASK) != 0</code>.
2591 	 *
2592 	 * @since 2.1
2593 	 */
2594 	public static final int BUTTON_MASK;
2595 
2596 	/**
2597 	 * Keyboard and/or mouse event mask indicating that the MOD1 key
2598 	 * was pushed on the keyboard when the event was generated.
2599 	 *
2600 	 * This is the primary keyboard modifier for the platform.
2601 	 * <p>
2602 	 * {@link #CTRL} on most platforms ({@link #COMMAND} on the Mac).
2603 	 * </p>
2604 	 *
2605 	 * @since 2.1
2606 	 */
2607 	public static final int MOD1;
2608 
2609 	/**
2610 	 * Keyboard and/or mouse event mask indicating that the MOD2 key
2611 	 * was pushed on the keyboard when the event was generated.
2612 	 *
2613 	 * This is the secondary keyboard modifier for the platform.
2614 	 * <p>
2615 	 * {@link #SHIFT} on most platforms.
2616 	 * </p>
2617 	 *
2618 	 * @since 2.1
2619 	 */
2620 	public static final int MOD2;
2621 
2622 	/**
2623 	 * Keyboard and/or mouse event mask indicating that the MOD3 key
2624 	 * was pushed on the keyboard when the event was generated.
2625 	 * <p>
2626 	 * {@link #ALT} on most platforms.
2627 	 * </p>
2628 	 *
2629 	 * @since 2.1
2630 	 */
2631 	public static final int MOD3;
2632 
2633 	/**
2634 	 * Keyboard and/or mouse event mask indicating that the MOD4 key
2635 	 * was pushed on the keyboard when the event was generated.
2636 	 * <p>
2637 	 * Undefined on most platforms ({@link #CTRL} on the Mac).
2638 	 * </p>
2639 	 *
2640 	 * @since 2.1
2641 	 */
2642 	public static final int MOD4;
2643 
2644 	/**
2645 	 * Constants to indicate line scrolling (value is 1).
2646 	 * <p><b>Used By:</b></p>
2647 	 * <ul>
2648 	 * <li><code>Control</code></li>
2649 	 * </ul>
2650 	 *
2651 	 * @since 3.1
2652 	 */
2653 	public static final int SCROLL_LINE = 1;
2654 
2655 	/**
2656 	 * Constants to indicate page scrolling (value is 2).
2657 	 * <p><b>Used By:</b></p>
2658 	 * <ul>
2659 	 * <li><code>Control</code></li>
2660 	 * </ul>
2661 	 *
2662 	 * @since 3.1
2663 	 */
2664 	public static final int SCROLL_PAGE = 2;
2665 
2666 	/**
2667 	 * Accelerator constant used to differentiate a key code from a
2668 	 * unicode character.
2669 	 *
2670 	 * If this bit is set, then the key stroke
2671 	 * portion of an accelerator represents a key code.  If this bit
2672 	 * is not set, then the key stroke portion of an accelerator is
2673 	 * a unicode character.
2674 	 *
2675 	 * The following expression is false:
2676 	 *
2677 	 * <code>((SWT.MOD1 | SWT.MOD2 | 'T') &amp; SWT.KEYCODE_BIT) != 0</code>.
2678 	 *
2679 	 * The following expression is true:
2680 	 *
2681 	 * <code>((SWT.MOD3 | SWT.F2) &amp; SWT.KEYCODE_BIT) != 0</code>.
2682 	 *
2683 	 * (value is (1&lt;&lt;24))
2684 	 *
2685 	 * @since 2.1
2686 	 */
2687 	public static final int KEYCODE_BIT = (1 << 24);
2688 
2689 	/**
2690 	 * Accelerator constant used to extract the key stroke portion of
2691 	 * an accelerator.
2692 	 *
2693 	 * The key stroke may be a key code or a unicode
2694 	 * value.  If the key stroke is a key code <code>KEYCODE_BIT</code>
2695 	 * will be set.
2696 	 *
2697 	 * @since 2.1
2698 	 */
2699 	public static final int KEY_MASK = KEYCODE_BIT + 0xFFFF;
2700 
2701 	/**
2702 	 * Keyboard event constant representing the UP ARROW key
2703 	 * (value is (1&lt;&lt;24)+1).
2704 	 */
2705 	public static final int ARROW_UP = KEYCODE_BIT + 1;
2706 
2707 	/**
2708 	 * Keyboard event constant representing the DOWN ARROW key
2709 	 * (value is (1&lt;&lt;24)+2).
2710 	 */
2711 	public static final int ARROW_DOWN = KEYCODE_BIT + 2;
2712 
2713 	/**
2714 	 * Keyboard event constant representing the LEFT ARROW key
2715 	 * (value is (1&lt;&lt;24)+3).
2716 	 */
2717 	public static final int ARROW_LEFT = KEYCODE_BIT + 3;
2718 
2719 	/**
2720 	 * Keyboard event constant representing the RIGHT ARROW key
2721 	 * (value is (1&lt;&lt;24)+4).
2722 	 */
2723 	public static final int ARROW_RIGHT = KEYCODE_BIT + 4;
2724 
2725 	/**
2726 	 * Keyboard event constant representing the PAGE UP key
2727 	 * (value is (1&lt;&lt;24)+5).
2728 	 */
2729 	public static final int PAGE_UP = KEYCODE_BIT + 5;
2730 
2731 	/**
2732 	 * Keyboard event constant representing the PAGE DOWN key
2733 	 * (value is (1&lt;&lt;24)+6).
2734 	 */
2735 	public static final int PAGE_DOWN = KEYCODE_BIT + 6;
2736 
2737 	/**
2738 	 * Keyboard event constant representing the HOME key
2739 	 * (value is (1&lt;&lt;24)+7).
2740 	 */
2741 	public static final int HOME = KEYCODE_BIT + 7;
2742 
2743 	/**
2744 	 * Keyboard event constant representing the END key
2745 	 * (value is (1&lt;&lt;24)+8).
2746 	 * <p>
2747 	 * Additional this constant is used by GridLayout for alignments.
2748 	 * </p>
2749 	 */
2750 	public static final int END = KEYCODE_BIT + 8;
2751 
2752 	/**
2753 	 * Keyboard event constant representing the INSERT key
2754 	 * (value is (1&lt;&lt;24)+9).
2755 	 */
2756 	public static final int INSERT = KEYCODE_BIT + 9;
2757 
2758 	/**
2759 	 * Keyboard event constant representing the F1 key
2760 	 * (value is (1&lt;&lt;24)+10).
2761 	 */
2762 	public static final int F1 = KEYCODE_BIT + 10;
2763 
2764 	/**
2765 	 * Keyboard event constant representing the F2 key
2766 	 * (value is (1&lt;&lt;24)+11).
2767 	 */
2768 	public static final int F2 = KEYCODE_BIT + 11;
2769 
2770 	/**
2771 	 * Keyboard event constant representing the F3 key
2772 	 * (value is (1&lt;&lt;24)+12).
2773 	 */
2774 	public static final int F3 = KEYCODE_BIT + 12;
2775 
2776 	/**
2777 	 * Keyboard event constant representing the F4 key
2778 	 * (value is (1&lt;&lt;24)+13).
2779 	 */
2780 	public static final int F4 = KEYCODE_BIT + 13;
2781 
2782 	/**
2783 	 * Keyboard event constant representing the F5 key
2784 	 * (value is (1&lt;&lt;24)+14).
2785 	 */
2786 	public static final int F5 = KEYCODE_BIT + 14;
2787 
2788 	/**
2789 	 * Keyboard event constant representing the F6 key
2790 	 * (value is (1&lt;&lt;24)+15).
2791 	 */
2792 	public static final int F6 = KEYCODE_BIT + 15;
2793 
2794 	/**
2795 	 * Keyboard event constant representing the F7 key
2796 	 * (value is (1&lt;&lt;24)+16).
2797 	 */
2798 	public static final int F7 = KEYCODE_BIT + 16;
2799 
2800 	/**
2801 	 * Keyboard event constant representing the F8 key
2802 	 * (value is (1&lt;&lt;24)+17).
2803 	 */
2804 	public static final int F8 = KEYCODE_BIT + 17;
2805 
2806 	/**
2807 	 * Keyboard event constant representing the F9 key
2808 	 * (value is (1&lt;&lt;24)+18).
2809 	 */
2810 	public static final int F9 = KEYCODE_BIT + 18;
2811 
2812 	/**
2813 	 * Keyboard event constant representing the F10 key
2814 	 * (value is (1&lt;&lt;24)+19).
2815 	 */
2816 	public static final int F10 = KEYCODE_BIT + 19;
2817 
2818 	/**
2819 	 * Keyboard event constant representing the F11 key
2820 	 * (value is (1&lt;&lt;24)+20).
2821 	 */
2822 	public static final int F11 = KEYCODE_BIT + 20;
2823 
2824 	/**
2825 	 * Keyboard event constant representing the F12 key
2826 	 * (value is (1&lt;&lt;24)+21).
2827 	 */
2828 	public static final int F12 = KEYCODE_BIT + 21;
2829 
2830 	/**
2831 	 * Keyboard event constant representing the F13 key
2832 	 * (value is (1&lt;&lt;24)+22).
2833 	 *
2834 	 * @since 3.0
2835 	 */
2836 	public static final int F13 = KEYCODE_BIT + 22;
2837 
2838 	/**
2839 	 * Keyboard event constant representing the F14 key
2840 	 * (value is (1&lt;&lt;24)+23).
2841 	 *
2842 	 * @since 3.0
2843 	 */
2844 	public static final int F14 = KEYCODE_BIT + 23;
2845 
2846 	/**
2847 	 * Keyboard event constant representing the F15 key
2848 	 * (value is (1&lt;&lt;24)+24).
2849 	 *
2850 	 * @since 3.0
2851 	 */
2852 	public static final int F15 = KEYCODE_BIT + 24;
2853 
2854 	/**
2855 	 * Keyboard event constant representing the F16 key
2856 	 * (value is (1&lt;&lt;25)+25).
2857 	 *
2858 	 * @since 3.6
2859 	 */
2860 	public static final int F16 = KEYCODE_BIT + 25;
2861 
2862 
2863 	/**
2864 	 * Keyboard event constant representing the F17 key
2865 	 * (value is (1&lt;&lt;26)+26).
2866 	 *
2867 	 * @since 3.6
2868 	 */
2869 	public static final int F17 = KEYCODE_BIT + 26;
2870 
2871 
2872 	/**
2873 	 * Keyboard event constant representing the F18 key
2874 	 * (value is (1&lt;&lt;27)+27).
2875 	 *
2876 	 * @since 3.6
2877 	 */
2878 	public static final int F18 = KEYCODE_BIT + 27;
2879 
2880 
2881 	/**
2882 	 * Keyboard event constant representing the F19 key
2883 	 * (value is (1&lt;&lt;28)+28).
2884 	 *
2885 	 * @since 3.6
2886 	 */
2887 	public static final int F19 = KEYCODE_BIT + 28;
2888 
2889 	/**
2890 	 * Keyboard event constant representing the F20 key
2891 	 * (value is (1&lt;&lt;29)+29).
2892 	 *
2893 	 * @since 3.6
2894 	 */
2895 	public static final int F20 = KEYCODE_BIT + 29;
2896 
2897 	/**
2898 	 * Keyboard event constant representing the keypad location.
2899 	 * (value is 1&lt;&lt;1).
2900 	 *
2901 	 * @since 3.6
2902 	 */
2903 	public static final int KEYPAD = 1 << 1;
2904 
2905 	/**
2906 	 * Keyboard event constant representing the numeric key
2907 	 * pad multiply key (value is (1&lt;&lt;24)+42).
2908 	 *
2909 	 * @since 3.0
2910 	 */
2911 	public static final int KEYPAD_MULTIPLY = KEYCODE_BIT + 42;
2912 
2913 	/**
2914 	 * Keyboard event constant representing the numeric key
2915 	 * pad add key (value is (1&lt;&lt;24)+43).
2916 	 *
2917 	 * @since 3.0
2918 	 */
2919 	public static final int KEYPAD_ADD = KEYCODE_BIT + 43;
2920 
2921 	/**
2922 	 * Keyboard event constant representing the numeric key
2923 	 * pad subtract key (value is (1&lt;&lt;24)+45).
2924 	 *
2925 	 * @since 3.0
2926 	 */
2927 	public static final int KEYPAD_SUBTRACT = KEYCODE_BIT + 45;
2928 
2929 	/**
2930 	 * Keyboard event constant representing the numeric key
2931 	 * pad decimal key (value is (1&lt;&lt;24)+46).
2932 	 *
2933 	 * @since 3.0
2934 	 */
2935 	public static final int KEYPAD_DECIMAL = KEYCODE_BIT + 46;
2936 
2937 	/**
2938 	 * Keyboard event constant representing the numeric key
2939 	 * pad divide key (value is (1&lt;&lt;24)+47).
2940 	 *
2941 	 * @since 3.0
2942 	 */
2943 	public static final int KEYPAD_DIVIDE = KEYCODE_BIT + 47;
2944 
2945 	/**
2946 	 * Keyboard event constant representing the numeric key
2947 	 * pad zero key (value is (1&lt;&lt;24)+48).
2948 	 *
2949 	 * @since 3.0
2950 	 */
2951 	public static final int KEYPAD_0 = KEYCODE_BIT + 48;
2952 
2953 	/**
2954 	 * Keyboard event constant representing the numeric key
2955 	 * pad one key (value is (1&lt;&lt;24)+49).
2956 	 *
2957 	 * @since 3.0
2958 	 */
2959 	public static final int KEYPAD_1 = KEYCODE_BIT + 49;
2960 
2961 	/**
2962 	 * Keyboard event constant representing the numeric key
2963 	 * pad two key (value is (1&lt;&lt;24)+50).
2964 	 *
2965 	 * @since 3.0
2966 	 */
2967 	public static final int KEYPAD_2 = KEYCODE_BIT + 50;
2968 
2969 	/**
2970 	 * Keyboard event constant representing the numeric key
2971 	 * pad three key (value is (1&lt;&lt;24)+51).
2972 	 *
2973 	 * @since 3.0
2974 	 */
2975 	public static final int KEYPAD_3 = KEYCODE_BIT + 51;
2976 
2977 	/**
2978 	 * Keyboard event constant representing the numeric key
2979 	 * pad four key (value is (1&lt;&lt;24)+52).
2980 	 *
2981 	 * @since 3.0
2982 	 */
2983 	public static final int KEYPAD_4 = KEYCODE_BIT + 52;
2984 
2985 	/**
2986 	 * Keyboard event constant representing the numeric key
2987 	 * pad five key (value is (1&lt;&lt;24)+53).
2988 	 *
2989 	 * @since 3.0
2990 	 */
2991 	public static final int KEYPAD_5 = KEYCODE_BIT + 53;
2992 
2993 	/**
2994 	 * Keyboard event constant representing the numeric key
2995 	 * pad six key (value is (1&lt;&lt;24)+54).
2996 	 *
2997 	 * @since 3.0
2998 	 */
2999 	public static final int KEYPAD_6 = KEYCODE_BIT + 54;
3000 
3001 	/**
3002 	 * Keyboard event constant representing the numeric key
3003 	 * pad seven key (value is (1&lt;&lt;24)+55).
3004 	 *
3005 	 * @since 3.0
3006 	 */
3007 	public static final int KEYPAD_7 = KEYCODE_BIT + 55;
3008 
3009 	/**
3010 	 * Keyboard event constant representing the numeric key
3011 	 * pad eight key (value is (1&lt;&lt;24)+56).
3012 	 *
3013 	 * @since 3.0
3014 	 */
3015 	public static final int KEYPAD_8 = KEYCODE_BIT + 56;
3016 
3017 	/**
3018 	 * Keyboard event constant representing the numeric key
3019 	 * pad nine key (value is (1&lt;&lt;24)+57).
3020 	 *
3021 	 * @since 3.0
3022 	 */
3023 	public static final int KEYPAD_9 = KEYCODE_BIT + 57;
3024 
3025 	/**
3026 	 * Keyboard event constant representing the numeric key
3027 	 * pad equal key (value is (1&lt;&lt;24)+61).
3028 	 *
3029 	 * @since 3.0
3030 	 */
3031 	public static final int KEYPAD_EQUAL = KEYCODE_BIT + 61;
3032 
3033 	/**
3034 	 * Keyboard event constant representing the numeric key
3035 	 * pad enter key (value is (1&lt;&lt;24)+80).
3036 	 *
3037 	 * @since 3.0
3038 	 */
3039 	public static final int KEYPAD_CR = KEYCODE_BIT + 80;
3040 
3041 	/**
3042 	 * Keyboard event constant representing the help
3043 	 * key (value is (1&lt;&lt;24)+81).
3044 	 *
3045 	 * NOTE: The HELP key maps to the key labeled "help",
3046 	 * not "F1". If your keyboard does not have a HELP key,
3047 	 * you will never see this key press.  To listen for
3048 	 * help on a control, use SWT.Help.
3049 	 *
3050 	 * @since 3.0
3051 	 *
3052 	 * @see SWT#Help
3053 	 */
3054 	public static final int HELP = KEYCODE_BIT + 81;
3055 
3056 	/**
3057 	 * Keyboard event constant representing the caps
3058 	 * lock key (value is (1&lt;&lt;24)+82).
3059 	 *
3060 	 * @since 3.0
3061 	 */
3062 	public static final int CAPS_LOCK = KEYCODE_BIT + 82;
3063 
3064 	/**
3065 	 * Keyboard event constant representing the num
3066 	 * lock key (value is (1&lt;&lt;24)+83).
3067 	 *
3068 	 * @since 3.0
3069 	 */
3070 	public static final int NUM_LOCK = KEYCODE_BIT + 83;
3071 
3072 	/**
3073 	 * Keyboard event constant representing the scroll
3074 	 * lock key (value is (1&lt;&lt;24)+84).
3075 	 *
3076 	 * @since 3.0
3077 	 */
3078 	public static final int SCROLL_LOCK = KEYCODE_BIT + 84;
3079 
3080 	/**
3081 	 * Keyboard event constant representing the pause
3082 	 * key (value is (1&lt;&lt;24)+85).
3083 	 *
3084 	 * @since 3.0
3085 	 */
3086 	public static final int PAUSE = KEYCODE_BIT + 85;
3087 
3088 	/**
3089 	 * Keyboard event constant representing the break
3090 	 * key (value is (1&lt;&lt;24)+86).
3091 	 *
3092 	 * @since 3.0
3093 	 */
3094 	public static final int BREAK = KEYCODE_BIT + 86;
3095 
3096 	/**
3097 	 * Keyboard event constant representing the print screen
3098 	 * key (value is (1&lt;&lt;24)+87).
3099 	 *
3100 	 * @since 3.0
3101 	 */
3102 	public static final int PRINT_SCREEN = KEYCODE_BIT + 87;
3103 
3104 	/**
3105 	 * The <code>MessageBox</code> style constant for error icon
3106 	 * behavior (value is 1).
3107 	 */
3108 	public static final int ICON_ERROR = 1;
3109 
3110 	/**
3111 	 * The <code>MessageBox</code> style constant for information icon
3112 	 * behavior (value is 1&lt;&lt;1).
3113 	 */
3114 	public static final int ICON_INFORMATION = 1 << 1;
3115 
3116 	/**
3117 	 * The <code>MessageBox</code> style constant for question icon
3118 	 * behavior (value is 1&lt;&lt;2).
3119 	 */
3120 	public static final int ICON_QUESTION = 1 << 2;
3121 
3122 	/**
3123 	 * The <code>MessageBox</code> style constant for warning icon
3124 	 * behavior (value is 1&lt;&lt;3).
3125 	 */
3126 	public static final int ICON_WARNING = 1 << 3;
3127 
3128 	/**
3129 	 * The <code>MessageBox</code> style constant for "working" icon
3130 	 * behavior (value is 1&lt;&lt;4).
3131 	 */
3132 	public static final int ICON_WORKING = 1 << 4;
3133 
3134 	/**
3135 	 * The style constant for "search" icon. This style constant is
3136 	 * used with <code>Text</code> in combination with <code>SWT.SEARCH
3137 	 * </code> (value is 1&lt;&lt;9).
3138 	 *
3139 	 * <p><b>Used By:</b></p>
3140 	 * <ul>
3141 	 * <li><code>Text</code></li>
3142 	 * </ul>
3143 	 *
3144 	 * @see #SEARCH
3145 	 * @see #ICON_CANCEL
3146 	 *
3147 	 * @since 3.5
3148 	 */
3149 	public static final int ICON_SEARCH = 1 << 9;
3150 
3151 	/**
3152 	 * The style constant for "cancel" icon. This style constant is
3153 	 * used with <code>Text</code> in combination with <code>SWT.SEARCH
3154 	 * </code> (value is 1&lt;&lt;8).
3155 	 *
3156 	 * <p><b>Used By:</b></p>
3157 	 * <ul>
3158 	 * <li><code>Text</code></li>
3159 	 * </ul>
3160 	 *
3161 	 * @see #SEARCH
3162 	 * @see #ICON_SEARCH
3163 	 *
3164 	 * @since 3.5
3165 	 */
3166 	public static final int ICON_CANCEL = 1 << 8;
3167 
3168 
3169 	/**
3170 	 * The <code>MessageBox</code> style constant for an OK button;
3171 	 * valid combinations are OK, OK|CANCEL
3172 	 * (value is 1&lt;&lt;5).
3173 	 */
3174 	public static final int OK = 1 << 5;
3175 
3176 	/**
3177 	 * The <code>MessageBox</code> style constant for YES button;
3178 	 * valid combinations are YES|NO, YES|NO|CANCEL
3179 	 * (value is 1&lt;&lt;6).
3180 	 */
3181 	public static final int YES = 1 << 6;
3182 
3183 	/**
3184 	 * The <code>MessageBox</code> style constant for NO button;
3185 	 * valid combinations are YES|NO, YES|NO|CANCEL
3186 	 * (value is 1&lt;&lt;7).
3187 	 */
3188 	public static final int NO = 1 << 7;
3189 
3190 	/**
3191 	 * The <code>MessageBox</code> style constant for a CANCEL button;
3192 	 * valid combinations are OK|CANCEL, YES|NO|CANCEL, RETRY|CANCEL
3193 	 * (value is 1&lt;&lt;8).
3194 	 *
3195 	 * <p><b>Used By:</b></p>
3196 	 * <ul>
3197 	 * <li><code>MessageBox</code></li>
3198 	 * </ul>
3199 	 */
3200 	public static final int CANCEL = 1 << 8;
3201 
3202 	/**
3203 	 * The <code>MessageBox</code> style constant for an ABORT button;
3204 	 * the only valid combination is ABORT|RETRY|IGNORE
3205 	 * (value is 1&lt;&lt;9).
3206 	 */
3207 	public static final int ABORT = 1 << 9;
3208 
3209 	/**
3210 	 * The <code>MessageBox</code> style constant for a RETRY button;
3211 	 *  valid combinations are ABORT|RETRY|IGNORE, RETRY|CANCEL
3212 	 * (value is 1&lt;&lt;10).
3213 	 */
3214 	public static final int RETRY = 1 << 10;
3215 
3216 	/**
3217 	 * The <code>MessageBox</code> style constant for an IGNORE button;
3218 	 * the only valid combination is ABORT|RETRY|IGNORE
3219 	 * (value is 1&lt;&lt;11).
3220 	 */
3221 	public static final int	IGNORE = 1 << 11;
3222 
3223 	/**
3224 	 * The <code>FileDialog</code> style constant for open file dialog behavior
3225 	 * (value is 1&lt;&lt;12).
3226 	 */
3227 	public static final int OPEN = 1 << 12;
3228 
3229 	/**
3230 	 * The <code>FileDialog</code> style constant for save file dialog behavior
3231 	 * (value is 1&lt;&lt;13).
3232 	 */
3233 	public static final int SAVE = 1 << 13;
3234 
3235 	/**
3236 	 * The <code>Composite</code> constant to indicate that
3237 	 * an attribute (such as background) is not inherited
3238 	 * by the children (value is 0).
3239 	 *
3240 	 * @since 3.2
3241 	 */
3242 	public static final int INHERIT_NONE = 0;
3243 
3244 	/**
3245 	 * The <code>Composite</code> constant to indicate that
3246 	 * an attribute (such as background) is inherited by
3247 	 * children who choose this value as their "default"
3248 	 * (value is 1).  For example, a label child will
3249 	 * typically choose to inherit the background color
3250 	 * of a composite while a list or table will not.
3251 	 *
3252 	 * @since 3.2
3253 	 */
3254 	public static final int INHERIT_DEFAULT = 1;
3255 
3256 	/**
3257 	 * The <code>Composite</code> constant to indicate that
3258 	 * an attribute (such as background) is inherited by
3259 	 * all children.
3260 	 *
3261 	 * @since 3.2
3262 	 */
3263 	public static final int INHERIT_FORCE = 2;
3264 
3265 	/**
3266 	 * Default color white (value is 1).
3267 	 */
3268 	public static final int COLOR_WHITE = 1;
3269 
3270 	/**
3271 	 * Default color black (value is 2).
3272 	 */
3273 	public static final int COLOR_BLACK = 2;
3274 
3275 	/**
3276 	 * Default color red (value is 3).
3277 	 */
3278 	public static final int COLOR_RED = 3;
3279 
3280 	/**
3281 	 * Default color dark red (value is 4).
3282 	 */
3283 	public static final int COLOR_DARK_RED = 4;
3284 
3285 	/**
3286 	 * Default color green (value is 5).
3287 	 */
3288 	public static final int COLOR_GREEN = 5;
3289 
3290 	/**
3291 	 * Default color dark green (value is 6).
3292 	 */
3293 	public static final int COLOR_DARK_GREEN = 6;
3294 
3295 	/**
3296 	 * Default color yellow (value is 7).
3297 	 */
3298 	public static final int COLOR_YELLOW = 7;
3299 
3300 	/**
3301 	 * Default color dark yellow (value is 8).
3302 	 */
3303 	public static final int COLOR_DARK_YELLOW = 8;
3304 
3305 	/**
3306 	 * Default color blue (value is 9).
3307 	 */
3308 	public static final int COLOR_BLUE = 9;
3309 
3310 	/**
3311 	 * Default color dark blue (value is 10).
3312 	 */
3313 	public static final int COLOR_DARK_BLUE = 10;
3314 
3315 	/**
3316 	 * Default color magenta (value is 11).
3317 	 */
3318 	public static final int COLOR_MAGENTA = 11;
3319 
3320 	/**
3321 	 * Default color dark magenta (value is 12).
3322 	 */
3323 	public static final int COLOR_DARK_MAGENTA = 12;
3324 
3325 	/**
3326 	 * Default color cyan (value is 13).
3327 	 */
3328 	public static final int COLOR_CYAN = 13;
3329 
3330 	/**
3331 	 * Default color dark cyan (value is 14).
3332 	 */
3333 	public static final int COLOR_DARK_CYAN = 14;
3334 
3335 	/**
3336 	 * Default color gray (value is 15).
3337 	 */
3338 	public static final int COLOR_GRAY = 15;
3339 
3340 	/**
3341 	 * Default color dark gray (value is 16).
3342 	 */
3343 	public static final int COLOR_DARK_GRAY = 16;
3344 
3345 	/*
3346 	 * System Colors
3347 	 *
3348 	 * Dealing with system colors is an area where there are
3349 	 * many platform differences.  On some platforms, system
3350 	 * colors can change dynamically while the program is
3351 	 * running.  On other platforms, system colors can be
3352 	 * changed for all instances of a particular widget.
3353 	 * Therefore, the only truly portable method to obtain
3354 	 * a widget color query is to query the color from an
3355 	 * instance of the widget.
3356 	 *
3357 	 *	It is expected that the list of supported colors
3358 	 * will grow over time.
3359 	 */
3360 
3361 	/**
3362 	 * System color used to paint dark shadow areas (value is 17).
3363 	 */
3364 	public static final int COLOR_WIDGET_DARK_SHADOW = 17;
3365 
3366 	/**
3367 	 * System color used to paint normal shadow areas (value is 18).
3368 	 */
3369 	public static final int COLOR_WIDGET_NORMAL_SHADOW = 18;
3370 
3371 	/**
3372 	 * System color used to paint light shadow areas (value is 19).
3373 	 */
3374 	public static final int COLOR_WIDGET_LIGHT_SHADOW = 19;
3375 
3376 	/**
3377 	 * System color used to paint highlight shadow areas (value is 20).
3378 	 */
3379 	public static final int COLOR_WIDGET_HIGHLIGHT_SHADOW = 20;
3380 
3381 	/**
3382 	 * System color used to paint foreground areas (value is 21).
3383 	 */
3384 	public static final int COLOR_WIDGET_FOREGROUND = 21;
3385 
3386 	/**
3387 	 * System color used to paint background areas (value is 22).
3388 	 */
3389 	public static final int COLOR_WIDGET_BACKGROUND = 22;
3390 
3391 	/**
3392 	 * System color used to paint border areas (value is 23).
3393 	 */
3394 	public static final int COLOR_WIDGET_BORDER = 23;
3395 
3396 	/**
3397 	 * System color used to paint list foreground areas (value is 24).
3398 	 */
3399 	public static final int COLOR_LIST_FOREGROUND = 24;
3400 
3401 	/**
3402 	 * System color used to paint list background areas (value is 25).
3403 	 */
3404 	public static final int COLOR_LIST_BACKGROUND = 25;
3405 
3406 	/**
3407 	 * System color used to paint list selection background areas (value is 26).
3408 	 */
3409 	public static final int COLOR_LIST_SELECTION = 26;
3410 
3411 	/**
3412 	 * System color used to paint list selected text (value is 27).
3413 	 */
3414 	public static final int COLOR_LIST_SELECTION_TEXT = 27;
3415 
3416 	/**
3417 	 * System color used to paint tooltip text (value is 28).
3418 	 */
3419 	public static final int COLOR_INFO_FOREGROUND = 28;
3420 
3421 	/**
3422 	 * System color used to paint tooltip background areas (value is 29).
3423 	 */
3424 	public static final int COLOR_INFO_BACKGROUND = 29;
3425 
3426 	/**
3427 	 * System color used to paint title text (value is 30).
3428 	 */
3429 	public static final int COLOR_TITLE_FOREGROUND = 30;
3430 
3431 	/**
3432 	 * System color used to paint title background areas (value is 31).
3433 	 */
3434 	public static final int COLOR_TITLE_BACKGROUND = 31;
3435 
3436 	/**
3437 	 * System color used to paint title background gradient (value is 32).
3438 	 */
3439 	public static final int COLOR_TITLE_BACKGROUND_GRADIENT = 32;
3440 
3441 	/**
3442 	 * System color used to paint inactive title text (value is 33).
3443 	 */
3444 	public static final int COLOR_TITLE_INACTIVE_FOREGROUND = 33;
3445 
3446 	/**
3447 	 * System color used to paint inactive title background areas (value is 34).
3448 	 */
3449 	public static final int COLOR_TITLE_INACTIVE_BACKGROUND = 34;
3450 
3451 	/**
3452 	 * System color used to paint inactive title background gradient (value is 35).
3453 	 */
3454 	public static final int COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT = 35;
3455 
3456 	/**
3457 	 * System color used to paint link text (value is 36).
3458 	 *
3459 	 * @since 3.102
3460 	 */
3461 	public static final int COLOR_LINK_FOREGROUND = 36;
3462 
3463 	/**
3464 	 * System color used to paint with alpha 0 (value is 37).
3465 	 * <p>
3466 	 * This pseudo-color can be used to set a transparent background on SWT
3467 	 * controls. <br>
3468 	 * Note that this is a <em>HINT</em> and may be overridden by the platform.
3469 	 * For example:
3470 	 * <ul>
3471 	 * <li>{@link org.eclipse.swt.widgets.Combo Combo},
3472 	 * {@link org.eclipse.swt.widgets.List List} and
3473 	 * {@link org.eclipse.swt.widgets.Tree Tree} support transparent background
3474 	 * on GTK3 and Windows only.</li>
3475 	 * <li>{@link org.eclipse.swt.widgets.Text Text} supports transparent
3476 	 * background on Windows only whereas {@link org.eclipse.swt.widgets.Table
3477 	 * Table} supports transparent background on GTK3 only.</li>
3478 	 * </ul>
3479 	 *
3480 	 * @since 3.104
3481 	 */
3482 	public static final int COLOR_TRANSPARENT = 37;
3483 
3484 	/**
3485 	 * System color used to paint disabled text background areas (value is 38).
3486 	 *
3487 	 * @since 3.112
3488 	 */
3489 	public static final int COLOR_TEXT_DISABLED_BACKGROUND = 38;
3490 
3491 	/**
3492 	 * System color used to paint disabled foreground areas (value is 39).
3493 	 *
3494 	 * @since 3.112
3495 	 */
3496 	public static final int COLOR_WIDGET_DISABLED_FOREGROUND = 39;
3497 
3498 	/**
3499 	 * Draw constant indicating whether the drawing operation
3500 	 * should fill the background (value is 1&lt;&lt;0).
3501 	 */
3502 	public static final int DRAW_TRANSPARENT = 1 << 0;
3503 
3504 	/**
3505 	 * Draw constant indicating whether the string drawing operation
3506 	 * should handle line-delimiters (value is 1&lt;&lt;1).
3507 	 */
3508 	public static final int DRAW_DELIMITER = 1 << 1;
3509 
3510 	/**
3511 	 * Draw constant indicating whether the string drawing operation
3512 	 * should expand TAB characters (value is 1&lt;&lt;2).
3513 	 */
3514 	public static final int DRAW_TAB = 1 << 2;
3515 
3516 	/**
3517 	 * Draw constant indicating whether the string drawing operation
3518 	 * should handle mnemonics (value is 1&lt;&lt;3).
3519 	 */
3520 	public static final int DRAW_MNEMONIC = 1 << 3;
3521 
3522 
3523 	/**
3524 	 * Selection constant indicating that a line delimiter should be
3525 	 * drawn (value is 1&lt;&lt;17).
3526 	 *
3527 	 * <p><b>Used By:</b></p>
3528 	 * <ul>
3529 	 * <li><code>TextLayout</code></li>
3530 	 * </ul>
3531 	 *
3532 	 * @see #FULL_SELECTION
3533 	 * @see #LAST_LINE_SELECTION
3534 	 *
3535 	 * @since 3.3
3536 	 */
3537 	public static final int DELIMITER_SELECTION = 1 << 17;
3538 
3539 	/**
3540 	 * Selection constant indicating that the last line is selected
3541 	 * to the end and should be drawn using either a line delimiter
3542 	 * or full line selection (value is 1&lt;&lt;20).
3543 	 *
3544 	 * <p><b>Used By:</b></p>
3545 	 * <ul>
3546 	 * <li><code>TextLayout</code></li>
3547 	 * </ul>
3548 	 *
3549 	 * @see #DELIMITER_SELECTION
3550 	 * @see #FULL_SELECTION
3551 	 *
3552 	 * @since 3.3
3553 	 */
3554 	public static final int LAST_LINE_SELECTION = 1 << 20;
3555 
3556 	/**
3557 	 * SWT error constant indicating that no error number was specified
3558 	 * (value is 1).
3559 	 */
3560 	public static final int ERROR_UNSPECIFIED = 1;
3561 
3562 	/**
3563 	 * SWT error constant indicating that no more handles for an
3564 	 * operating system resource are available
3565 	 * (value is 2).
3566 	 */
3567 	public static final int ERROR_NO_HANDLES = 2;
3568 
3569 	/**
3570 	 * SWT error constant indicating that no more callback resources are available
3571 	 * (value is 3).
3572 	 */
3573 	public static final int ERROR_NO_MORE_CALLBACKS = 3;
3574 
3575 	/**
3576 	 * SWT error constant indicating that a null argument was passed in
3577 	 * (value is 4).
3578 	 */
3579 	public static final int ERROR_NULL_ARGUMENT = 4;
3580 
3581 	/**
3582 	 * SWT error constant indicating that an invalid argument was passed in
3583 	 * (value is 5).
3584 	 */
3585 	public static final int ERROR_INVALID_ARGUMENT = 5;
3586 
3587 	/**
3588 	 * SWT error constant indicating that a value was found to be
3589 	 * outside the allowable range
3590 	 * (value is 6).
3591 	 */
3592 	public static final int ERROR_INVALID_RANGE = 6;
3593 
3594 	/**
3595 	 * SWT error constant indicating that a value which can not be
3596 	 * zero was found to be
3597 	 * (value is 7).
3598 	 */
3599 	public static final int ERROR_CANNOT_BE_ZERO = 7;
3600 
3601 	/**
3602 	 * SWT error constant indicating that the underlying operating
3603 	 * system was unable to provide the value of an item
3604 	 * (value is 8).
3605 	 */
3606 	public static final int ERROR_CANNOT_GET_ITEM = 8;
3607 
3608 	/**
3609 	 * SWT error constant indicating that the underlying operating
3610 	 * system was unable to provide the selection
3611 	 * (value is 9).
3612 	 */
3613 	public static final int ERROR_CANNOT_GET_SELECTION = 9;
3614 
3615 	/**
3616 	 * SWT error constant indicating that the matrix is not invertible
3617 	 * (value is 10).
3618 	 *
3619 	 * @since 3.1
3620 	 */
3621 	public static final int ERROR_CANNOT_INVERT_MATRIX = 10;
3622 
3623 	/**
3624 	 * SWT error constant indicating that the underlying operating
3625 	 * system was unable to provide the height of an item
3626 	 * (value is 11).
3627 	 */
3628 	public static final int ERROR_CANNOT_GET_ITEM_HEIGHT = 11;
3629 
3630 	/**
3631 	 * SWT error constant indicating that the underlying operating
3632 	 * system was unable to provide the text of a widget
3633 	 * (value is 12).
3634 	 */
3635 	public static final int ERROR_CANNOT_GET_TEXT = 12;
3636 
3637 	/**
3638 	 * SWT error constant indicating that the underlying operating
3639 	 * system was unable to set the text of a widget
3640 	 * (value is 13).
3641 	 */
3642 	public static final int ERROR_CANNOT_SET_TEXT = 13;
3643 
3644 	/**
3645 	 * SWT error constant indicating that the underlying operating
3646 	 * system was unable to add an item
3647 	 * (value is 14).
3648 	 */
3649 	public static final int ERROR_ITEM_NOT_ADDED = 14;
3650 
3651 	/**
3652 	 * SWT error constant indicating that the underlying operating
3653 	 * system was unable to remove an item
3654 	 * (value is 15).
3655 	 */
3656 	public static final int ERROR_ITEM_NOT_REMOVED = 15;
3657 
3658 	/**
3659 	 * SWT error constant indicating that the graphics library
3660 	 * is not available
3661 	 * (value is 16).
3662 	 */
3663 	public static final int ERROR_NO_GRAPHICS_LIBRARY = 16;
3664 
3665 	/**
3666 	 * SWT error constant indicating that a particular feature has
3667 	 * not been implemented on this platform
3668 	 * (value is 20).
3669 	 */
3670 	public static final int ERROR_NOT_IMPLEMENTED = 20;
3671 
3672 	/**
3673 	 * SWT error constant indicating that a menu which needed
3674 	 * to have the drop down style had some other style instead
3675 	 * (value is 21).
3676 	 */
3677 	public static final int ERROR_MENU_NOT_DROP_DOWN = 21;
3678 
3679 	/**
3680 	 * SWT error constant indicating that an attempt was made to
3681 	 * invoke an SWT operation which can only be executed by the
3682 	 * user-interface thread from some other thread
3683 	 * (value is 22).
3684 	 */
3685 	public static final int ERROR_THREAD_INVALID_ACCESS = 22;
3686 
3687 	/**
3688 	 * SWT error constant indicating that an attempt was made to
3689 	 * invoke an SWT operation using a widget which had already
3690 	 * been disposed
3691 	 * (value is 24).
3692 	 */
3693 	public static final int ERROR_WIDGET_DISPOSED = 24;
3694 
3695 	/**
3696 	 * SWT error constant indicating that a menu item which needed
3697 	 * to have the cascade style had some other style instead
3698 	 * (value is 27).
3699 	 */
3700 	public static final int ERROR_MENUITEM_NOT_CASCADE = 27;
3701 
3702 	/**
3703 	 * SWT error constant indicating that the underlying operating
3704 	 * system was unable to set the selection of a widget
3705 	 * (value is 28).
3706 	 */
3707 	public static final int ERROR_CANNOT_SET_SELECTION = 28;
3708 
3709 	/**
3710 	 * SWT error constant indicating that the underlying operating
3711 	 * system was unable to set the menu
3712 	 * (value is 29).
3713 	 */
3714 	public static final int ERROR_CANNOT_SET_MENU = 29;
3715 
3716 	/**
3717 	 * SWT error constant indicating that the underlying operating
3718 	 * system was unable to set the enabled state
3719 	 * (value is 30).
3720 	 */
3721 	public static final int ERROR_CANNOT_SET_ENABLED = 30;
3722 
3723 	/**
3724 	 * SWT error constant indicating that the underlying operating
3725 	 * system was unable to provide enabled/disabled state information
3726 	 * (value is 31).
3727 	 */
3728 	public static final int ERROR_CANNOT_GET_ENABLED = 31;
3729 
3730 	/**
3731 	 * SWT error constant indicating that a provided widget can
3732 	 * not be used as a parent in the current operation
3733 	 * (value is 32).
3734 	 */
3735 	public static final int ERROR_INVALID_PARENT = 32;
3736 
3737 	/**
3738 	 * SWT error constant indicating that a menu which needed
3739 	 * to have the menu bar style had some other style instead
3740 	 * (value is 33).
3741 	 */
3742 	public static final int ERROR_MENU_NOT_BAR = 33;
3743 
3744 	/**
3745 	 * SWT error constant indicating that the underlying operating
3746 	 * system was unable to provide count information
3747 	 * (value is 36).
3748 	 */
3749 	public static final int ERROR_CANNOT_GET_COUNT = 36;
3750 
3751 	/**
3752 	 * SWT error constant indicating that a menu which needed
3753 	 * to have the pop up menu style had some other style instead
3754 	 * (value is 37).
3755 	 */
3756 	public static final int ERROR_MENU_NOT_POP_UP = 37;
3757 
3758 	/**
3759 	 * SWT error constant indicating that a graphics operation
3760 	 * was attempted with an image of an unsupported depth
3761 	 * (value is 38).
3762 	 */
3763 	public static final int ERROR_UNSUPPORTED_DEPTH = 38;
3764 
3765 	/**
3766 	 * SWT error constant indicating that an input/output operation
3767 	 * failed during the execution of an SWT operation
3768 	 * (value is 39).
3769 	 */
3770 	public static final int ERROR_IO = 39;
3771 
3772 	/**
3773 	 * SWT error constant indicating that a graphics operation
3774 	 * was attempted with an image having an invalid format
3775 	 * (value is 40).
3776 	 */
3777 	public static final int ERROR_INVALID_IMAGE = 40;
3778 
3779 	/**
3780 	 * SWT error constant indicating that a graphics operation
3781 	 * was attempted with an image having a valid but unsupported
3782 	 * format
3783 	 * (value is 42).
3784 	 */
3785 	public static final int ERROR_UNSUPPORTED_FORMAT = 42;
3786 
3787 	/**
3788 	 * SWT error constant indicating that an attempt was made
3789 	 * to subclass an SWT widget class without implementing the
3790 	 * <code>checkSubclass()</code> method
3791 	 * (value is 43).
3792 	 *
3793 	 * For additional information see the comment in
3794 	 * <code>Widget.checkSubclass()</code>.
3795 	 *
3796 	 * @see org.eclipse.swt.widgets.Widget#checkSubclass
3797 	 */
3798 	public static final int ERROR_INVALID_SUBCLASS = 43;
3799 
3800 	/**
3801 	 * SWT error constant indicating that an attempt was made to
3802 	 * invoke an SWT operation using a graphics object which had
3803 	 * already been disposed
3804 	 * (value is 44).
3805 	 */
3806 	public static final int ERROR_GRAPHIC_DISPOSED = 44;
3807 
3808 	/**
3809 	 * SWT error constant indicating that an attempt was made to
3810 	 * invoke an SWT operation using a device which had already
3811 	 * been disposed
3812 	 * (value is 45).
3813 	 */
3814 	public static final int ERROR_DEVICE_DISPOSED = 45;
3815 
3816 	/**
3817 	 * SWT error constant indicating that an exception happened
3818 	 * when executing a runnable
3819 	 * (value is 46).
3820 	 */
3821 	public static final int ERROR_FAILED_EXEC = 46;
3822 
3823 	/**
3824 	 * SWT error constant indicating that an unsatisfied link
3825 	 * error occurred while attempting to load a library
3826 	 * (value is 47).
3827 	 *
3828 	 * @since 3.1
3829 	 */
3830 	public static final int ERROR_FAILED_LOAD_LIBRARY = 47;
3831 
3832 	/**
3833 	 * SWT error constant indicating that a font is not valid
3834 	 * (value is 48).
3835 	 *
3836 	 * @since 3.1
3837 	 */
3838 	public static final int ERROR_INVALID_FONT = 48;
3839 
3840 	/**
3841 	 * SWT error constant indicating that an attempt was made to
3842 	 * use an BrowserFunction object which had already been disposed
3843 	 * (value is 49).
3844 	 *
3845 	 * @since 3.5
3846 	 */
3847 	public static final int ERROR_FUNCTION_DISPOSED = 49;
3848 
3849 	/**
3850 	 * SWT error constant indicating that an exception happened
3851 	 * when evaluating a javascript expression
3852 	 * (value is 50).
3853 	 *
3854 	 * @since 3.5
3855 	 */
3856 	public static final int ERROR_FAILED_EVALUATE = 50;
3857 
3858 	/**
3859 	 * SWT error constant indicating that an invalid value was returned
3860 	 * (value is 51).
3861 	 *
3862 	 * @since 3.5
3863 	 */
3864 	public static final int ERROR_INVALID_RETURN_VALUE = 51;
3865 
3866 	/**
3867 	 * Constant indicating that an image or operation is of type bitmap  (value is 0).
3868 	 */
3869 	public static final int BITMAP = 0;
3870 
3871 	/**
3872 	 * Constant indicating that an image or operation is of type icon  (value is 1).
3873 	 */
3874 	public static final int ICON = 1;
3875 
3876 	/**
3877 	 * The <code>Image</code> constructor argument indicating that
3878 	 * the new image should be a copy of the image provided as
3879 	 * an argument  (value is 0).
3880 	 */
3881 	public static final int IMAGE_COPY = 0;
3882 
3883 	/**
3884 	 * The <code>Image</code> constructor argument indicating that
3885 	 * the new image should have the appearance of a "disabled"
3886 	 * (using the platform's rules for how this should look)
3887 	 * copy of the image provided as an argument  (value is 1).
3888 	 */
3889 	public static final int IMAGE_DISABLE = 1;
3890 
3891 	/**
3892 	 * The <code>Image</code> constructor argument indicating that
3893 	 * the new image should have the appearance of a "gray scaled"
3894 	 * copy of the image provided as an argument  (value is 2).
3895 	 */
3896 	public static final int IMAGE_GRAY = 2;
3897 
3898 	/**
3899 	 * Constant to indicate an error state (value is 1).
3900 	 * <p><b>Used By:</b></p>
3901 	 * <ul>
3902 	 * <li><code>ProgressBar</code></li>
3903 	 * </ul>
3904 	 *
3905 	 * @since 3.4
3906 	 */
3907 	public static final int ERROR = 1;
3908 
3909 	/**
3910 	 * Constant to a indicate a paused state (value is 4).
3911 	 * <p><b>Used By:</b></p>
3912 	 * <ul>
3913 	 * <li><code>ProgressBar</code></li>
3914 	 * </ul>
3915 	 *
3916 	 * @since 3.4
3917 	 */
3918 	public static final int PAUSED = 1 << 2;
3919 
3920 	/**
3921 	 * The font style constant indicating a normal weight, non-italic font
3922 	 * (value is 0). This constant is also used with <code>ProgressBar</code>
3923 	 * to indicate a normal state.
3924 	 * <p><b>Used By:</b></p>
3925 	 * <ul>
3926 	 * <li><code>ProgressBar</code></li>
3927 	 * </ul>
3928 	 */
3929 	public static final int NORMAL = 0;
3930 
3931 	/**
3932 	 * The font style constant indicating a bold weight font
3933 	 * (value is 1&lt;&lt;0).
3934 	 */
3935 	public static final int BOLD = 1 << 0;
3936 
3937 	/**
3938 	 * The font style constant indicating an italic font
3939 	 * (value is 1&lt;&lt;1).
3940 	 */
3941 	public static final int ITALIC = 1 << 1;
3942 
3943 	/**
3944 	 * System arrow cursor  (value is 0).
3945 	 */
3946 	public static final int CURSOR_ARROW = 0;
3947 
3948 	/**
3949 	 * System wait cursor  (value is 1).
3950 	 */
3951 	public static final int CURSOR_WAIT = 1;
3952 
3953 	/**
3954 	 * System cross hair cursor  (value is 2).
3955 	 */
3956 	public static final int CURSOR_CROSS = 2;
3957 
3958 	/**
3959 	 * System app startup cursor  (value is 3).
3960 	 */
3961 	public static final int CURSOR_APPSTARTING = 3;
3962 
3963 	/**
3964 	 * System help cursor  (value is 4).
3965 	 */
3966 	public static final int CURSOR_HELP = 4;
3967 
3968 	/**
3969 	 * System resize all directions cursor (value is 5).
3970 	 */
3971 	public static final int CURSOR_SIZEALL = 5;
3972 
3973 	/**
3974 	 * System resize north-east-south-west cursor  (value is 6).
3975 	 */
3976 	public static final int CURSOR_SIZENESW = 6;
3977 
3978 	/**
3979 	 * System resize north-south cursor  (value is 7).
3980 	 */
3981 	public static final int CURSOR_SIZENS = 7;
3982 
3983 	/**
3984 	 * System resize north-west-south-east cursor  (value is 8).
3985 	 */
3986 	public static final int CURSOR_SIZENWSE = 8;
3987 
3988 	/**
3989 	 * System resize west-east cursor  (value is 9).
3990 	 */
3991 	public static final int CURSOR_SIZEWE = 9;
3992 
3993 	/**
3994 	 * System resize north cursor  (value is 10).
3995 	 */
3996 	public static final int CURSOR_SIZEN = 10;
3997 
3998 	/**
3999 	 * System resize south cursor  (value is 11).
4000 	 */
4001 	public static final int CURSOR_SIZES = 11;
4002 
4003 	/**
4004 	 * System resize east cursor  (value is 12).
4005 	 */
4006 	public static final int CURSOR_SIZEE = 12;
4007 
4008 	/**
4009 	 * System resize west cursor  (value is 13).
4010 	 */
4011 	public static final int CURSOR_SIZEW = 13;
4012 
4013 	/**
4014 	 * System resize north-east cursor (value is 14).
4015 	 */
4016 	public static final int CURSOR_SIZENE = 14;
4017 
4018 	/**
4019 	 * System resize south-east cursor (value is 15).
4020 	 */
4021 	public static final int CURSOR_SIZESE = 15;
4022 
4023 	/**
4024 	 * System resize south-west cursor (value is 16).
4025 	 */
4026 	public static final int CURSOR_SIZESW = 16;
4027 
4028 	/**
4029 	 * System resize north-west cursor (value is 17).
4030 	 */
4031 	public static final int CURSOR_SIZENW = 17;
4032 
4033 	/**
4034 	 * System up arrow cursor  (value is 18).
4035 	 */
4036 	public static final int CURSOR_UPARROW = 18;
4037 
4038 	/**
4039 	 * System i-beam cursor (value is 19).
4040 	 */
4041 	public static final int CURSOR_IBEAM = 19;
4042 
4043 	/**
4044 	 * System "not allowed" cursor (value is 20).
4045 	 */
4046 	public static final int CURSOR_NO = 20;
4047 
4048 	/**
4049 	 * System hand cursor (value is 21).
4050 	 */
4051 	public static final int CURSOR_HAND = 21;
4052 
4053 	/**
4054 	 * Line drawing style for flat end caps (value is 1).
4055 	 *
4056 	 * @see org.eclipse.swt.graphics.GC#setLineCap(int)
4057 	 * @see org.eclipse.swt.graphics.GC#getLineCap()
4058 	 *
4059 	 * @since 3.1
4060 	 */
4061 	public static final int CAP_FLAT = 1;
4062 
4063 	/**
4064 	 * Line drawing style for rounded end caps (value is 2).
4065 	 *
4066 	 * @see org.eclipse.swt.graphics.GC#setLineCap(int)
4067 	 * @see org.eclipse.swt.graphics.GC#getLineCap()
4068 	 *
4069 	 * @since 3.1
4070 	 */
4071 	public static final int CAP_ROUND = 2;
4072 
4073 	/**
4074 	 * Line drawing style for square end caps (value is 3).
4075 	 *
4076 	 * @see org.eclipse.swt.graphics.GC#setLineCap(int)
4077 	 * @see org.eclipse.swt.graphics.GC#getLineCap()
4078 	 *
4079 	 * @since 3.1
4080 	 */
4081 	public static final int CAP_SQUARE = 3;
4082 
4083 	/**
4084 	 * Line drawing style for miter joins (value is 1).
4085 	 *
4086 	 * @see org.eclipse.swt.graphics.GC#setLineJoin(int)
4087 	 * @see org.eclipse.swt.graphics.GC#getLineJoin()
4088 	 *
4089 	 * @since 3.1
4090 	 */
4091 	public static final int JOIN_MITER = 1;
4092 
4093 	/**
4094 	 * Line drawing  style for rounded joins (value is 2).
4095 	 *
4096 	 * @see org.eclipse.swt.graphics.GC#setLineJoin(int)
4097 	 * @see org.eclipse.swt.graphics.GC#getLineJoin()
4098 	 *
4099 	 * @since 3.1
4100 	 */
4101 	public static final int JOIN_ROUND = 2;
4102 
4103 	/**
4104 	 * Line drawing style for bevel joins (value is 3).
4105 	 *
4106 	 * @see org.eclipse.swt.graphics.GC#setLineJoin(int)
4107 	 * @see org.eclipse.swt.graphics.GC#getLineJoin()
4108 	 *
4109 	 * @since 3.1
4110 	 */
4111 	public static final int JOIN_BEVEL = 3;
4112 
4113 	/**
4114 	 * Line drawing style for solid lines  (value is 1).
4115 	 */
4116 	public static final int LINE_SOLID = 1;
4117 
4118 	/**
4119 	 * Line drawing style for dashed lines (value is 2).
4120 	 */
4121 	public static final int LINE_DASH = 2;
4122 
4123 	/**
4124 	 * Line drawing style for dotted lines (value is 3).
4125 	 */
4126 	public static final int LINE_DOT = 3;
4127 
4128 	/**
4129 	 * Line drawing style for alternating dash-dot lines (value is 4).
4130 	 */
4131 	public static final int LINE_DASHDOT = 4;
4132 
4133 	/**
4134 	 * Line drawing style for dash-dot-dot lines (value is 5).
4135 	 */
4136 	public static final int LINE_DASHDOTDOT = 5;
4137 
4138 	/**
4139 	 * Line drawing style for custom dashed lines (value is 6).
4140 	 *
4141 	 * @see org.eclipse.swt.graphics.GC#setLineDash(int[])
4142 	 * @see org.eclipse.swt.graphics.GC#getLineDash()
4143 	 *
4144 	 * @since 3.1
4145 	 */
4146 	public static final int LINE_CUSTOM = 6;
4147 
4148 	/**
4149 	 * Path constant that represents a "move to" operation (value is 1).
4150 	 *
4151 	 * @since 3.1
4152 	 */
4153 	public static final int PATH_MOVE_TO = 1;
4154 
4155 	/**
4156 	 * Path constant that represents a "line to" operation (value is 2).
4157 	 *
4158 	 * @since 3.1
4159 	 */
4160 	public static final int PATH_LINE_TO = 2;
4161 
4162 	/**
4163 	 * Path constant that represents a "quadratic curve to" operation (value is 3).
4164 	 *
4165 	 * @since 3.1
4166 	 */
4167 	public static final int PATH_QUAD_TO = 3;
4168 
4169 	/**
4170 	 * Path constant that represents a "cubic curve to" operation (value is 4).
4171 	 *
4172 	 * @since 3.1
4173 	 */
4174 	public static final int PATH_CUBIC_TO = 4;
4175 
4176 	/**
4177 	 * Path constant that represents a "close" operation (value is 5).
4178 	 *
4179 	 * @since 3.1
4180 	 */
4181 	public static final int PATH_CLOSE = 5;
4182 
4183 	/**
4184 	 * Even odd rule for filling operations (value is 1).
4185 	 *
4186 	 * @since 3.1
4187 	 */
4188 	public static final int FILL_EVEN_ODD = 1;
4189 
4190 	/**
4191 	 * Winding rule for filling operations (value is 2).
4192 	 *
4193 	 * @since 3.1
4194 	 */
4195 	public static final int FILL_WINDING = 2;
4196 
4197 	/**
4198 	 * Image format constant indicating an unknown image type (value is -1).
4199 	 */
4200 	public static final int IMAGE_UNDEFINED = -1;
4201 
4202 	/**
4203 	 * Image format constant indicating a Windows BMP format image (value is 0).
4204 	 */
4205 	public static final int IMAGE_BMP = 0;
4206 
4207 	/**
4208 	 * Image format constant indicating a run-length encoded
4209 	 * Windows BMP format image (value is 1).
4210 	 */
4211 	public static final int IMAGE_BMP_RLE = 1;
4212 
4213 	/**
4214 	 * Image format constant indicating a GIF format image (value is 2).
4215 	 */
4216 	public static final int IMAGE_GIF = 2;
4217 
4218 	/**
4219 	 * Image format constant indicating a ICO format image (value is 3).
4220 	 */
4221 	public static final int IMAGE_ICO = 3;
4222 
4223 	/**
4224 	 * Image format constant indicating a JPEG format image (value is 4).
4225 	 */
4226 	public static final int IMAGE_JPEG = 4;
4227 
4228 	/**
4229 	 * Image format constant indicating a PNG format image (value is 5).
4230 	 */
4231 	public static final int IMAGE_PNG = 5;
4232 
4233 	/**
4234 	 * Image format constant indicating a TIFF format image (value is 6).
4235 	 */
4236 	public static final int IMAGE_TIFF = 6;
4237 
4238 	/**
4239 	 * Image format constant indicating an OS/2 BMP format image (value is 7).
4240 	 */
4241 	public static final int IMAGE_OS2_BMP = 7;
4242 
4243 	/**
4244 	 * Image format constant indicating a SVG format image (value is 8).
4245 	 * <br>Note that this is a <em>HINT</em> and is currently only supported on GTK.
4246 	 *
4247 	 * @since 3.113
4248 	 */
4249 	public static final int IMAGE_SVG = 8;
4250 
4251 	/**
4252 	 * GIF image disposal method constants indicating that the
4253 	 * disposal method is unspecified (value is 0).
4254 	 */
4255 	public static final int DM_UNSPECIFIED = 0x0;
4256 
4257 	/**
4258 	 * GIF image disposal method constants indicating that the
4259 	 * disposal method is to do nothing; that is, to leave the
4260 	 * previous image in place (value is 1).
4261 	 */
4262 	public static final int DM_FILL_NONE = 0x1;
4263 
4264 	/**
4265 	 * GIF image disposal method constants indicating that the
4266 	 * the previous images should be covered with the background
4267 	 * color before displaying the next image (value is 2).
4268 	 */
4269 	public static final int DM_FILL_BACKGROUND = 0x2;
4270 
4271 	/**
4272 	 * GIF image disposal method constants indicating that the
4273 	 * disposal method is to restore the previous picture
4274 	 * (value is 3).
4275 	 */
4276 	public static final int DM_FILL_PREVIOUS = 0x3;
4277 
4278 	/**
4279 	 * Image transparency constant indicating that the image
4280 	 * contains no transparency information (value is 0).
4281 	 */
4282 	public static final int TRANSPARENCY_NONE = 0x0;
4283 
4284 	/**
4285 	 * Image transparency constant indicating that the image
4286 	 * contains alpha transparency information (value is 1&lt;&lt;0).
4287 	 */
4288 	public static final int TRANSPARENCY_ALPHA = 1 << 0;
4289 
4290 	/**
4291 	 * Image transparency constant indicating that the image
4292 	 * contains a transparency mask (value is 1&lt;&lt;1).
4293 	 */
4294 	public static final int TRANSPARENCY_MASK = 1 << 1;
4295 
4296 	/**
4297 	 * Image transparency constant indicating that the image
4298 	 * contains a transparent pixel (value is 1&lt;&lt;2).
4299 	 */
4300 	public static final int TRANSPARENCY_PIXEL = 1 << 2;
4301 
4302 	/**
4303 	 * The character movement type (value is 1&lt;&lt;0).
4304 	 * This constant is used to move a text offset over a character.
4305 	 *
4306 	 * @see org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
4307 	 * @see org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
4308 	 *
4309 	 * @since 3.0
4310 	 */
4311 	public static final int MOVEMENT_CHAR = 1 << 0;
4312 
4313 	/**
4314 	 * The cluster movement type (value is 1&lt;&lt;1).
4315 	 * This constant is used to move a text offset over a cluster.
4316 	 * A cluster groups one or more characters. A cluster is
4317 	 * undivisible, this means that a caret offset can not be placed in the
4318 	 * middle of a cluster.
4319 	 *
4320 	 * @see org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
4321 	 * @see org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
4322 	 *
4323 	 * @since 3.0
4324 	 */
4325 	public static final int MOVEMENT_CLUSTER = 1 << 1;
4326 
4327 	/**
4328 	 * The word movement type (value is 1&lt;&lt;2).
4329 	 * This constant is used to move a text offset over a word.
4330 	 * The behavior of this constant depends on the platform and on the
4331 	 * direction of the movement. For example, on Windows the stop is
4332 	 * always at the start of the word. On GTK and Mac the stop is at the end
4333 	 * of the word if the direction is next and at the start of the word if the
4334 	 * direction is previous.
4335 	 *
4336 	 * @see org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
4337 	 * @see org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
4338 	 *
4339 	 * @since 3.0
4340 	 */
4341 	public static final int MOVEMENT_WORD = 1 << 2;
4342 
4343 	/**
4344 	 * The word end movement type (value is 1&lt;&lt;3).
4345 	 * This constant is used to move a text offset to the next or previous
4346 	 * word end. The behavior of this constant does not depend on the platform.
4347 	 *
4348 	 *
4349 	 * @see org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
4350 	 * @see org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
4351 	 *
4352 	 * @since 3.3
4353 	 */
4354 	public static final int MOVEMENT_WORD_END = 1 << 3;
4355 
4356 	/**
4357 	 * The word start movement type (value is 1&lt;&lt;4).
4358 	 * This constant is used to move a text offset to the next or previous
4359 	 * word start. The behavior of this constant does not depend on the platform.
4360 	 *
4361 	 * @see org.eclipse.swt.graphics.TextLayout#getNextOffset(int, int)
4362 	 * @see org.eclipse.swt.graphics.TextLayout#getPreviousOffset(int, int)
4363 	 *
4364 	 * @since 3.3
4365 	 */
4366 	public static final int MOVEMENT_WORD_START = 1 << 4;
4367 
4368 	/**
4369 	 * A constant indicating that a given operation should be performed on
4370 	 * all widgets (value is 1&lt;&lt;0).
4371 	 *
4372 	 * <p><b>Used By:</b></p>
4373 	 * <ul>
4374 	 * <li><code>Composite</code> layout</li>
4375 	 * </ul>
4376 	 *
4377 	 * @see org.eclipse.swt.widgets.Composite#layout(org.eclipse.swt.widgets.Control[], int)
4378 	 *
4379 	 * @since 3.6
4380 	 */
4381 	public static final int ALL = 1 << 0;
4382 
4383 	/**
4384 	 * ID for the About menu item (value is -1).
4385 	 *
4386 	 * @see org.eclipse.swt.widgets.MenuItem#setID(int)
4387 	 * @see org.eclipse.swt.widgets.MenuItem#getID()
4388 	 *
4389 	 * @since 3.7
4390 	 */
4391 	public static final int ID_ABOUT = -1;
4392 
4393 	/**
4394 	 * ID for the Preferences menu item (value is -2).
4395 	 *
4396 	 * @see org.eclipse.swt.widgets.MenuItem#setID(int)
4397 	 * @see org.eclipse.swt.widgets.MenuItem#getID()
4398 	 *
4399 	 * @since 3.7
4400 	 */
4401 	public static final int ID_PREFERENCES = -2;
4402 
4403 	/**
4404 	 * ID for the Hide menu item (value is -3).
4405 	 *
4406 	 * @see org.eclipse.swt.widgets.MenuItem#setID(int)
4407 	 * @see org.eclipse.swt.widgets.MenuItem#getID()
4408 	 *
4409 	 * @since 3.7
4410 	 */
4411 	public static final int ID_HIDE = -3;
4412 
4413 	/**
4414 	 * ID for the Hide Others menu item (value is -4).
4415 	 *
4416 	 * @see org.eclipse.swt.widgets.MenuItem#setID(int)
4417 	 * @see org.eclipse.swt.widgets.MenuItem#getID()
4418 	 *
4419 	 * @since 3.7
4420 	 */
4421 	public static final int ID_HIDE_OTHERS = -4;
4422 
4423 	/**
4424 	 * ID for the Show All menu item (value is -5).
4425 	 *
4426 	 * @see org.eclipse.swt.widgets.MenuItem#setID(int)
4427 	 * @see org.eclipse.swt.widgets.MenuItem#getID()
4428 	 *
4429 	 * @since 3.7
4430 	 */
4431 	public static final int ID_SHOW_ALL = -5;
4432 
4433 	/**
4434 	 * ID for the Quit menu item (value is -6).
4435 	 *
4436 	 * @see org.eclipse.swt.widgets.MenuItem#setID(int)
4437 	 * @see org.eclipse.swt.widgets.MenuItem#getID()
4438 	 *
4439 	 * @since 3.7
4440 	 */
4441 	public static final int ID_QUIT = -6;
4442 
4443 	/**
4444 	 * Key name for setting and getting the skin class of a widget.
4445 	 * <p>
4446 	 * Note: SWT currently doesn't read or process this property. The only
4447 	 * effect of setting this property is to trigger a call to
4448 	 * {@link Widget#reskin(int) Widget#reskin(SWT.ALL)}.
4449 	 * </p>
4450 	 *
4451 	 * @see org.eclipse.swt.widgets.Widget#getData(String)
4452 	 * @see org.eclipse.swt.widgets.Widget#setData(String, Object)
4453 	 *
4454 	 * @since 3.6
4455 	 */
4456 	public static final String SKIN_CLASS = "org.eclipse.swt.skin.class"; //$NON-NLS-1$
4457 
4458 	/**
4459 	 * Key name for setting and getting the skin id of a widget.
4460 	 * <p>
4461 	 * Note: SWT currently doesn't read or process this property. The only
4462 	 * effect of setting this property is to trigger a call to
4463 	 * {@link Widget#reskin(int) Widget#reskin(SWT.ALL)}.
4464 	 * </p>
4465 	 *
4466 	 * @see org.eclipse.swt.widgets.Widget#getData(String)
4467 	 * @see org.eclipse.swt.widgets.Widget#setData(String, Object)
4468 	 *
4469 	 * @since 3.6
4470 	 */
4471 	public static final String SKIN_ID = "org.eclipse.swt.skin.id"; //$NON-NLS-1$
4472 
4473 	/**
4474 	 * The <code>Scrollable</code> constant to indicate that
4475 	 * the receiver is using overlay scrollbars. (value is 1)
4476 	 *
4477 	 * @since 3.8
4478 	 */
4479 	public static final int SCROLLBAR_OVERLAY = 1 << 1;
4480 
4481 
4482 /**
4483  * Returns a boolean indicating whether this SWT implementation can
4484  * be loaded.  Examples of criteria that may be used to determine this
4485  * include the OS and architecture of the JRE that is being used.
4486  *
4487  * @return <code>true</code> if this SWT implementation can be loaded
4488  * and <code>false</code> otherwise
4489  *
4490  * @since 3.8
4491  */
isLoadable()4492 public static boolean isLoadable () {
4493 	return Platform.isLoadable ();
4494 }
4495 
4496 /**
4497  * Answers a concise, human readable description of the error code.
4498  *
4499  * @param code the SWT error code.
4500  * @return a description of the error code.
4501  *
4502  * @see SWT
4503  */
findErrorText(int code)4504 static String findErrorText (int code) {
4505 	switch (code) {
4506 		case ERROR_UNSPECIFIED:            return "Unspecified error"; //$NON-NLS-1$
4507 		case ERROR_NO_HANDLES:			   return "No more handles"; //$NON-NLS-1$
4508 		case ERROR_NO_MORE_CALLBACKS:      return "No more callbacks"; //$NON-NLS-1$
4509 		case ERROR_NULL_ARGUMENT:          return "Argument cannot be null"; //$NON-NLS-1$
4510 		case ERROR_INVALID_ARGUMENT:       return "Argument not valid"; //$NON-NLS-1$
4511 		case ERROR_INVALID_RETURN_VALUE:   return "Return value not valid"; //$NON-NLS-1$
4512 		case ERROR_INVALID_RANGE:          return "Index out of bounds"; //$NON-NLS-1$
4513 		case ERROR_CANNOT_BE_ZERO:         return "Argument cannot be zero"; //$NON-NLS-1$
4514 		case ERROR_CANNOT_GET_ITEM:        return "Cannot get item"; //$NON-NLS-1$
4515 		case ERROR_CANNOT_GET_SELECTION:   return "Cannot get selection"; //$NON-NLS-1$
4516 		case ERROR_CANNOT_GET_ITEM_HEIGHT: return "Cannot get item height"; //$NON-NLS-1$
4517 		case ERROR_CANNOT_GET_TEXT:        return "Cannot get text"; //$NON-NLS-1$
4518 		case ERROR_CANNOT_SET_TEXT:        return "Cannot set text"; //$NON-NLS-1$
4519 		case ERROR_ITEM_NOT_ADDED:         return "Item not added"; //$NON-NLS-1$
4520 		case ERROR_ITEM_NOT_REMOVED:       return "Item not removed"; //$NON-NLS-1$
4521 		case ERROR_NOT_IMPLEMENTED:        return "Not implemented"; //$NON-NLS-1$
4522 		case ERROR_MENU_NOT_DROP_DOWN:     return "Menu must be a drop down"; //$NON-NLS-1$
4523 		case ERROR_THREAD_INVALID_ACCESS:  return "Invalid thread access"; //$NON-NLS-1$
4524 		case ERROR_WIDGET_DISPOSED:        return "Widget is disposed"; //$NON-NLS-1$
4525 		case ERROR_MENUITEM_NOT_CASCADE:   return "Menu item is not a CASCADE"; //$NON-NLS-1$
4526 		case ERROR_CANNOT_SET_SELECTION:   return "Cannot set selection";  //$NON-NLS-1$
4527 		case ERROR_CANNOT_SET_MENU:        return "Cannot set menu";  //$NON-NLS-1$
4528 		case ERROR_CANNOT_SET_ENABLED:     return "Cannot set the enabled state";  //$NON-NLS-1$
4529 		case ERROR_CANNOT_GET_ENABLED:     return "Cannot get the enabled state";  //$NON-NLS-1$
4530 		case ERROR_INVALID_PARENT:         return "Widget has the wrong parent";  //$NON-NLS-1$
4531 		case ERROR_MENU_NOT_BAR:           return "Menu is not a BAR";  //$NON-NLS-1$
4532 		case ERROR_CANNOT_GET_COUNT:       return "Cannot get count"; //$NON-NLS-1$
4533 		case ERROR_MENU_NOT_POP_UP:        return "Menu is not a POP_UP"; //$NON-NLS-1$
4534 		case ERROR_UNSUPPORTED_DEPTH:      return "Unsupported color depth"; //$NON-NLS-1$
4535 		case ERROR_IO:                     return "i/o error"; //$NON-NLS-1$
4536 		case ERROR_INVALID_IMAGE:          return "Invalid image"; //$NON-NLS-1$
4537 		case ERROR_UNSUPPORTED_FORMAT:     return "Unsupported or unrecognized format"; //$NON-NLS-1$
4538 		case ERROR_INVALID_SUBCLASS:       return "Subclassing not allowed"; //$NON-NLS-1$
4539 		case ERROR_GRAPHIC_DISPOSED:       return "Graphic is disposed"; //$NON-NLS-1$
4540 		case ERROR_DEVICE_DISPOSED:        return "Device is disposed"; //$NON-NLS-1$
4541 		case ERROR_FUNCTION_DISPOSED:      return "BrowserFunction is disposed"; //$NON-NLS-1$
4542 		case ERROR_FAILED_EXEC:            return "Failed to execute runnable"; //$NON-NLS-1$
4543 		case ERROR_FAILED_EVALUATE:        return "Failed to evaluate javascript expression"; //$NON-NLS-1$
4544 		case ERROR_FAILED_LOAD_LIBRARY:    return "Unable to load library"; //$NON-NLS-1$
4545 		case ERROR_CANNOT_INVERT_MATRIX:    return "Cannot invert matrix"; //$NON-NLS-1$
4546 		case ERROR_NO_GRAPHICS_LIBRARY:    return "Unable to load graphics library"; //$NON-NLS-1$
4547 		case ERROR_INVALID_FONT:    		return "Font not valid"; //$NON-NLS-1$
4548 	}
4549 	return "Unknown error"; //$NON-NLS-1$
4550 }
4551 
4552 /**
4553  * Returns the NLS'ed message for the given argument.
4554  *
4555  * @param key the key to look up
4556  * @return the message for the given key
4557  *
4558  * @exception IllegalArgumentException <ul>
4559  *    <li>ERROR_NULL_ARGUMENT - if the key is null</li>
4560  * </ul>
4561  */
getMessage(String key)4562 public static String getMessage(String key) {
4563 	return Compatibility.getMessage(key);
4564 }
4565 
4566 /**
4567  * Returns the NLS'ed message for the given arguments.
4568  *
4569  * @param key the key to look up
4570  * @param args the parameters to insert into the message
4571  * @return the message for the given parameterized key
4572  *
4573  * @exception IllegalArgumentException <ul>
4574  *    <li>ERROR_NULL_ARGUMENT - if the key or args are null</li>
4575  * </ul>
4576  *
4577  * @since 3.8
4578  */
getMessage(String key, Object[] args)4579 public static String getMessage(String key, Object[] args) {
4580 	return Compatibility.getMessage(key, args);
4581 }
4582 
4583 /**
4584  * Returns the SWT platform name.
4585  * Examples: "win32", "gtk", "cocoa"
4586  *
4587  * @return the SWT platform name
4588  */
getPlatform()4589 public static String getPlatform () {
4590 	return Platform.PLATFORM;
4591 }
4592 
4593 /**
4594  * Returns the SWT version number as an integer.
4595  * Example: "SWT051" == 51
4596  *
4597  * @return the SWT version number
4598  */
getVersion()4599 public static int getVersion () {
4600 	return Library.SWT_VERSION;
4601 }
4602 
4603 /**
4604  * Throws an appropriate exception based on the passed in error code.
4605  *
4606  * @param code the SWT error code
4607  */
error(int code)4608 public static void error (int code) {
4609 	error (code, null);
4610 }
4611 
4612 /**
4613  * Throws an appropriate exception based on the passed in error code.
4614  * The <code>throwable</code> argument should be either null, or the
4615  * throwable which caused SWT to throw an exception.
4616  * <p>
4617  * In SWT, errors are reported by throwing one of three exceptions:
4618  * </p>
4619  * <dl>
4620  * <dd>java.lang.IllegalArgumentException</dd>
4621  * <dt>thrown whenever one of the API methods is invoked with an illegal argument</dt>
4622  * <dd>org.eclipse.swt.SWTException (extends java.lang.RuntimeException)</dd>
4623  * <dt>thrown whenever a recoverable error happens internally in SWT</dt>
4624  * <dd>org.eclipse.swt.SWTError (extends java.lang.Error)</dd>
4625  * <dt>thrown whenever a <b>non-recoverable</b> error happens internally in SWT</dt>
4626  * </dl>
4627  * This method provides the logic which maps between error codes
4628  * and one of the above exceptions.
4629  *
4630  * @param code the SWT error code.
4631  * @param throwable the exception which caused the error to occur.
4632  *
4633  * @see SWTError
4634  * @see SWTException
4635  * @see IllegalArgumentException
4636  */
error(int code, Throwable throwable)4637 public static void error (int code, Throwable throwable) {
4638 	error (code, throwable, null);
4639 }
4640 
4641 /**
4642  * Throws an appropriate exception based on the passed in error code.
4643  * The <code>throwable</code> argument should be either null, or the
4644  * throwable which caused SWT to throw an exception.
4645  * <p>
4646  * In SWT, errors are reported by throwing one of three exceptions:
4647  * </p>
4648  * <dl>
4649  * <dd>java.lang.IllegalArgumentException</dd>
4650  * <dt>thrown whenever one of the API methods is invoked with an illegal argument</dt>
4651  * <dd>org.eclipse.swt.SWTException (extends java.lang.RuntimeException)</dd>
4652  * <dt>thrown whenever a recoverable error happens internally in SWT</dt>
4653  * <dd>org.eclipse.swt.SWTError (extends java.lang.Error)</dd>
4654  * <dt>thrown whenever a <b>non-recoverable</b> error happens internally in SWT</dt>
4655  * </dl>
4656  * This method provides the logic which maps between error codes
4657  * and one of the above exceptions.
4658  *
4659  * @param code the SWT error code.
4660  * @param throwable the exception which caused the error to occur.
4661  * @param detail more information about error.
4662  *
4663  * @see SWTError
4664  * @see SWTException
4665  * @see IllegalArgumentException
4666  *
4667  * @since 3.0
4668  */
error(int code, Throwable throwable, String detail)4669 public static void error (int code, Throwable throwable, String detail) {
4670 
4671 	/*
4672 	* This code prevents the creation of "chains" of SWTErrors and
4673 	* SWTExceptions which in turn contain other SWTErrors and
4674 	* SWTExceptions as their throwable. This can occur when low level
4675 	* code throws an exception past a point where a higher layer is
4676 	* being "safe" and catching all exceptions. (Note that, this is
4677 	* _a_bad_thing_ which we always try to avoid.)
4678 	*
4679 	* On the theory that the low level code is closest to the
4680 	* original problem, we simply re-throw the original exception here.
4681 	*
4682 	* NOTE: Exceptions thrown in syncExec and asyncExec must be
4683 	* wrapped.
4684 	*/
4685 	if (code != SWT.ERROR_FAILED_EXEC) {
4686 		if (throwable instanceof SWTError) throw (SWTError) throwable;
4687 		if (throwable instanceof SWTException) throw (SWTException) throwable;
4688 	}
4689 
4690 	String message = findErrorText (code);
4691 	if (detail != null) message += detail;
4692 	switch (code) {
4693 
4694 		/* Illegal Arguments (non-fatal) */
4695 		case ERROR_NULL_ARGUMENT:
4696 		case ERROR_CANNOT_BE_ZERO:
4697 		case ERROR_INVALID_ARGUMENT:
4698 		case ERROR_MENU_NOT_BAR:
4699 		case ERROR_MENU_NOT_DROP_DOWN:
4700 		case ERROR_MENU_NOT_POP_UP:
4701 		case ERROR_MENUITEM_NOT_CASCADE:
4702 		case ERROR_INVALID_PARENT:
4703 		case ERROR_INVALID_RANGE: {
4704 			throw new IllegalArgumentException (message);
4705 		}
4706 
4707 		/* SWT Exceptions (non-fatal) */
4708 		case ERROR_INVALID_SUBCLASS:
4709 		case ERROR_THREAD_INVALID_ACCESS:
4710 		case ERROR_WIDGET_DISPOSED:
4711 		case ERROR_GRAPHIC_DISPOSED:
4712 		case ERROR_DEVICE_DISPOSED:
4713 		case ERROR_FUNCTION_DISPOSED:
4714 		case ERROR_INVALID_IMAGE:
4715 		case ERROR_UNSUPPORTED_DEPTH:
4716 		case ERROR_UNSUPPORTED_FORMAT:
4717 		case ERROR_FAILED_EXEC:
4718 		case ERROR_FAILED_EVALUATE:
4719 		case ERROR_CANNOT_INVERT_MATRIX:
4720 		case ERROR_NO_GRAPHICS_LIBRARY:
4721 		case ERROR_INVALID_RETURN_VALUE:
4722 		case ERROR_IO: {
4723 			SWTException exception = new SWTException (code, message);
4724 			exception.throwable = throwable;
4725 			throw exception;
4726 		}
4727 
4728 		/* Operation System Errors (fatal, may occur only on some platforms) */
4729 		case ERROR_CANNOT_GET_COUNT:
4730 		case ERROR_CANNOT_GET_ENABLED:
4731 		case ERROR_CANNOT_GET_ITEM:
4732 		case ERROR_CANNOT_GET_ITEM_HEIGHT:
4733 		case ERROR_CANNOT_GET_SELECTION:
4734 		case ERROR_CANNOT_GET_TEXT:
4735 		case ERROR_CANNOT_SET_ENABLED:
4736 		case ERROR_CANNOT_SET_MENU:
4737 		case ERROR_CANNOT_SET_SELECTION:
4738 		case ERROR_CANNOT_SET_TEXT:
4739 		case ERROR_ITEM_NOT_ADDED:
4740 		case ERROR_ITEM_NOT_REMOVED:
4741 		case ERROR_NO_HANDLES:
4742 		//FALL THROUGH
4743 
4744 		/* SWT Errors (fatal, may occur only on some platforms) */
4745 		case ERROR_FAILED_LOAD_LIBRARY:
4746 		case ERROR_NO_MORE_CALLBACKS:
4747 		case ERROR_NOT_IMPLEMENTED:
4748 		case ERROR_UNSPECIFIED: {
4749 			SWTError error = new SWTError (code, message);
4750 			error.throwable = throwable;
4751 			throw error;
4752 		}
4753 	}
4754 
4755 	/* Unknown/Undefined Error */
4756 	SWTError error = new SWTError (code, message);
4757 	error.throwable = throwable;
4758 	throw error;
4759 }
4760 
4761 static {
4762 	/*
4763 	* These values represent bit masks that may need to
4764 	* expand in the future.  Therefore they are not initialized
4765 	* in the declaration to stop the compiler from inlining.
4766 	*/
4767 	BUTTON_MASK = BUTTON1 | BUTTON2 | BUTTON3 | BUTTON4 | BUTTON5;
4768 	MODIFIER_MASK = ALT | SHIFT | CTRL | COMMAND | ALT_GR;
4769 
4770 	/*
4771 	* These values can be different on different platforms.
4772 	* Therefore they are not initialized in the declaration
4773 	* to stop the compiler from inlining.
4774 	*/
4775 	String platform = getPlatform ();
4776 	if ("cocoa".equals (platform)) { //$NON-NLS-1$
4777 		MOD1 = COMMAND;
4778 		MOD2 = SHIFT;
4779 		MOD3 = ALT;
4780 		MOD4 = CONTROL;
4781 	} else {
4782 		MOD1 = CONTROL;
4783 		MOD2 = SHIFT;
4784 		MOD3 = ALT;
4785 		MOD4 = 0;
4786 	}
4787 }
4788 }
4789