001: /*******************************************************************************
002: * Copyright (c) 2000, 2007 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: * Darrell Meyer <darrell@mygwt.net> - derived implementation
011: *******************************************************************************/package net.mygwt.ui.client;
012:
013: /**
014: * Defines MyGWT public constants.
015: */
016: public class Style {
017:
018: /**
019: * A constant known to be zero (0), used in operations which take bit flags to
020: * indicate that "no bits are set".
021: */
022: public static final int NONE = 0;
023:
024: /**
025: * Indicates that a default value should be used (value is -1).
026: */
027: public static final int DEFAULT = -1;
028:
029: /**
030: * Style constant for check box behavior (value is 1<<8).
031: * <p>
032: * <b>Used By:</b>
033: * <ul>
034: * <li><code>MenuItem</code></li>
035: * <li><code>ToolBar</code></li>
036: * <li><code>Tree</code></li>
037: * </ul>
038: * </p>
039: */
040: public static final int CHECK = 1 << 8;
041:
042: /**
043: * Style constant for center behavior (value is 1<<24).
044: * <p>
045: * <b>Used By:</b>
046: * <ul>
047: * <li><code>ButtonBar</code></li>
048: * <li><code>BorderLayout</code></li>
049: * <li><code>BorderLayoutData</code></li>
050: * </ul>
051: * </p>
052: */
053: public static final int CENTER = 1 << 24;
054:
055: /**
056: * Style constant left alignment (value is 1<<25).
057: * <p>
058: * <b>Used By:</b>
059: * <ul>
060: * <li><code>ButtonBar</code></li>
061: * <li><code>El</code></li>
062: * </ul>
063: * </p>
064: */
065: public static final int LEFT = 1 << 25;
066:
067: /**
068: * Style constant right alignment (value is 1<<26).
069: * <p>
070: * <b>Used By:</b>
071: * <ul>
072: * <li><code>ButtonBar</code></li>
073: * <li><code>El</code></li>
074: * </ul>
075: * </p>
076: */
077: public static final int RIGHT = 1 << 26;
078:
079: /**
080: * Style constant for horizontal alignment or orientation behavior (value is
081: * 1<<15).
082: * <p>
083: * <b>Used By:</b>
084: * <ul>
085: * <li><code>Effect</code></li>
086: * <li><code>FillLayout</code></li>
087: * </ul>
088: * </p>
089: */
090: public static final int HORIZONTAL = 1 << 15;
091:
092: /**
093: * Style constant for vertical alignment or orientation behavior (value is
094: * 1<<9).
095: * <p>
096: * <b>Used By:</b>
097: * <ul>
098: * <li><code>Effect</code></li>
099: * <li><code>FillLayout</code></li>
100: * </ul>
101: * </p>
102: */
103: public static final int VERTICAL = 1 << 9;
104:
105: /**
106: * Style constant for close behavior (value is 1<<1).
107: * <p>
108: * <b>Used By:</b>
109: * <ul>
110: * <li><code>Shell</code></li>
111: * <li><code>TabItem</code></li>
112: * </ul>
113: * </p>
114: */
115: public static final int CLOSE = 1 << 1;
116:
117: /**
118: * Style constant for top behavior (value is 1<<11).
119: * <p>
120: * <b>Used By:</b>
121: * <ul>
122: * <li><code>TabFolder</code></li>
123: * </ul>
124: * </p>
125: */
126: public static final int TOP = 1 << 11;
127:
128: /**
129: * Style constant for bottom behavior (value is 1<<12).
130: * <p>
131: * <b>Used By:</b>
132: * <ul>
133: * <li><code>TabFolder</code></li>
134: * </ul>
135: * </p>
136: */
137: public static final int BOTTOM = 1 << 12;
138:
139: /**
140: * Style constant for east direction / region (value is 1<<1).
141: * <p>
142: * <b>Used By:</b>
143: * <ul>
144: * <li><code>BorderPanel</code></li>
145: * <li><code>BorderLayout</code></li>
146: * <li><code>SplitBar</code></li>
147: * </ul>
148: * </p>
149: */
150: public static final int EAST = 1 << 1;
151:
152: /**
153: * Style constant for west direction / region (value is 1<<2).
154: * <p>
155: * <b>Used By:</b>
156: * <ul>
157: * <li><code>BorderPanel</code></li>
158: * <li><code>BorderLayout</code></li>
159: * <li><code>SplitBar</code></li>
160: * </ul>
161: * </p>
162: */
163: public static final int WEST = 1 << 2;
164:
165: /**
166: * Style constant for south direction / region (value is 1<<3).
167: * <p>
168: * <b>Used By:</b>
169: * <ul>
170: * <li><code>BorderPanel</code></li>
171: * <li><code>BorderLayout</code></li>
172: * <li><code>SplitBar</code></li>
173: * </ul>
174: * </p>
175: */
176: public static final int SOUTH = 1 << 3;
177:
178: /**
179: * Style constant for north direction / region (value is 1<<4).
180: * <p>
181: * <b>Used By:</b>
182: * <ul>
183: * <li><code>BorderPanel</code></li>
184: * <li><code>BorderLayout</code></li>
185: * <li><code>SplitBar</code></li>
186: * </ul>
187: * </p>
188: */
189: public static final int NORTH = 1 << 4;
190:
191: /**
192: * Style constant for north west direction / region (value is 1<<10).
193: * <p>
194: * <b>Used By:</b>
195: * <ul>
196: * <li><code>Resizable</code></li>
197: * </ul>
198: * </p>
199: */
200: public static final int NW = 1 << 10;
201:
202: /**
203: * Style constant for south west direction / region (value is 1<<11).
204: * <p>
205: * <b>Used By:</b>
206: * <ul>
207: * <li><code>Resizable</code></li>
208: * </ul>
209: * </p>
210: */
211: public static final int SW = 1 << 11;
212:
213: /**
214: * Style constant for south east direction / region (value is 1<<12).
215: * <p>
216: * <b>Used By:</b>
217: * <ul>
218: * <li><code>Resizable</code></li>
219: * </ul>
220: * </p>
221: */
222: public static final int SE = 1 << 12;
223:
224: /**
225: * Style constant for north east direction / region (value is 1<<14).
226: * <p>
227: * <b>Used By:</b>
228: * <ul>
229: * <li><code>Resizable</code></li>
230: * </ul>
231: * </p>
232: */
233: public static final int NE = 1 << 14;
234:
235: /**
236: * Style constant for collapse behavior (value is 1<<6).
237: * <p>
238: * <b>Used By:</b>
239: * <ul>
240: * <li><code>ContentPanel</code></li>
241: * </ul>
242: * </p>
243: */
244: public static final int COLLAPSE = 1 << 6;
245:
246: /**
247: * Style constant for header behavior (value is 1<<7).
248: * <p>
249: * <b>Used By:</b>
250: * <ul>
251: * <li><code>ContentPanel</code></li>
252: * </ul>
253: * </p>
254: */
255: public static final int HEADER = 1 << 7;
256:
257: /**
258: * Style constant for framing behavior (value is 1<<3).
259: * <p>
260: * <b>Used By:</b>
261: * <ul>
262: * <li><code>Shadow</code></li>
263: * </ul>
264: * </p>
265: */
266: public static final int DROP = 1 << 3;
267:
268: /**
269: * Style constant for side behavior (value is 1<<2).
270: * <p>
271: * <b>Used By:</b>
272: * <ul>
273: * <li><code>Shadow</code></li>
274: * </ul>
275: * </p>
276: */
277: public static final int SIDES = 1 << 2;
278:
279: /**
280: * Style constant for single select behavior (value is 1<<10).
281: * <p>
282: * <b>Used By:</b>
283: * <ul>
284: * <li><code>List</code></li>
285: * <li><code>Table</code></li>
286: * </ul>
287: * </p>
288: */
289: public static final int SINGLE = 1 << 10;
290:
291: /**
292: * Style constant for multi select behavior (value is 1<<11).
293: * <p>
294: * <b>Used By:</b>
295: * <ul>
296: * <li><code>List</code></li>
297: * <li><code>Table</code></li>
298: * </ul>
299: * </p>
300: */
301: public static final int MULTI = 1 << 11;
302:
303: /**
304: * Style constant for flat behavior (value is 1<<19).
305: * <p>
306: * <b>Used By:</b>
307: * <ul>
308: * <li><code>List</code></li>
309: * </ul>
310: * </p>
311: */
312: public static final int FLAT = 1 << 19;
313:
314: /**
315: * Style constant for ascending behavior (value is 1).
316: * <p>
317: * <b>Used By:</b>
318: * <ul>
319: * <li><code>TableColumn</code></li>
320: * </ul>
321: * </p>
322: */
323: public static final int ASC = 1;
324:
325: /**
326: * Style constant for descending behavior (value is 2).
327: * <p>
328: * <b>Used By:</b>
329: * <ul>
330: * <li><code>TableColumn</code></li>
331: * </ul>
332: * </p>
333: */
334: public static final int DESC = 2;
335:
336: /**
337: * Style constant for resize behavior (value is 1<<3).
338: * <p>
339: * <b>Used By:</b>
340: * <ul>
341: * <li><code>Shell</code></li>
342: * </ul>
343: * </p>
344: */
345: public static final int RESIZE = 1 << 3;
346:
347: /**
348: * Style constant for modal behavior (value is 1<<20).
349: * <p>
350: * <b>Used By:</b>
351: * <ul>
352: * <li><code>Shell</code></li>
353: * </ul>
354: * </p>
355: */
356: public static final int MODAL = 1 << 20;
357:
358: /**
359: * The <code>MessageBox</code> style constant for error icon behavior (value
360: * is 1<<80).
361: */
362: public static final int ICON_ERROR = 1 << 80;
363:
364: /**
365: * The <code>MessageBox</code> style constant for information icon behavior
366: * (value is 1<<82).
367: */
368: public static final int ICON_INFO = 1 << 82;
369:
370: /**
371: * The <code>MessageBox</code> style constant for question icon behavior
372: * (value is 1<<84).
373: */
374: public static final int ICON_QUESTION = 1 << 84;
375:
376: /**
377: * The <code>MessageBox</code> style constant for warning icon behavior
378: * (value is 1<<86).
379: */
380: public static final int ICON_WARNING = 1 << 86;
381:
382: /**
383: * The <code>MessageBox</code> style for Ok button (value is 1<<88).
384: */
385: public static final int OK = 1 << 88;
386:
387: /**
388: * The <code>MessageBox</code> style for Ok and Cancel buttons (value is
389: * 1<<90).
390: */
391: public static final int OK_CANCEL = 1 << 90;
392:
393: /**
394: * The <code>MessageBox</code> style for Yes and No buttons (value is
395: * 1<<92).
396: */
397: public static final int YES_NO = 1 << 92;
398:
399: /**
400: * The <code>MessageBox</code> style for Yes, No, and Cancel buttons (value
401: * is 1<<94).
402: */
403: public static final int YES_NO_CANCEL = 1 << 94;
404:
405: /**
406: * Style constant for toggle button behavior (value is 1<<9).
407: * <p>
408: * <b>Used By:</b>
409: * <ul>
410: * <li><code>ToolItem</code></li>
411: * </ul>
412: * </p>
413: */
414: public static final int TOGGLE = 1 << 9;
415:
416: /**
417: * Style constant for push button behavior (value is 1<<3).
418: * <p>
419: * <b>Used By:</b>
420: * <ul>
421: * <li><code>MenuItem</code></li>
422: * <li><code>ToolItem</code></li>
423: * </ul>
424: * </p>
425: */
426: public static final int PUSH = 1 << 3;
427:
428: /**
429: * Style constant for drop menu behavior (value is 1<<30).
430: * <p>
431: * <b>Used By:</b>
432: * <ul>
433: * <li><code>MenuItem</code></li>
434: * <li><code>ToolItem</code></li>
435: * </ul>
436: * </p>
437: */
438: public static final int MENU = 1 << 30;
439:
440: /**
441: * Style constant for split menu behavior (value is 1<<32).
442: * <p>
443: * <b>Used By:</b>
444: * <ul>
445: * <li><code>ToolItem</code></li>
446: * </ul>
447: * </p>
448: */
449: public static final int SPLIT_MENU = 1 << 32;
450:
451: /**
452: * Style constant for line separator behavior (value is 1<<1).
453: * <p>
454: * <b>Used By:</b>
455: * <ul>
456: * <li><code>MenuItem</code></li>
457: * <li><code>ToolItem</code></li>
458: * </ul>
459: * </p>
460: */
461: public static final int SEPARATOR = 1 << 1;
462:
463: /**
464: * Style constant for radio behavior (value is 1<<12).
465: * <p>
466: * <b>Used By:</b>
467: * <ul>
468: * <li><code>MenuItem</code></li>
469: * </ul>
470: * </p>
471: */
472: public static final int RADIO = 1 << 12;
473:
474: /**
475: * Style constant for radio behavior (value is 1<<29).
476: * <p>
477: * <b>Used By:</b>
478: * <ul>
479: * <li><code>ContentPanel</code></li>
480: * <li><code>Shadow</code></li>
481: * </ul>
482: * </p>
483: */
484: public static final int FRAME = 1 << 29;
485:
486: /**
487: * Style constant for auto hide behavior (value is 1<<25).
488: * <p>
489: * <b>Used By:</b>
490: * <ul>
491: * <li><code>Shell</code></li>
492: * </ul>
493: * </p>
494: */
495: public static final int AUTO_HIDE = 1 << 25;
496:
497: /**
498: * Style constant for focus behavior (value is 1<<16).
499: */
500: public static final int FOCUSABLE = 1 << 16;
501:
502: /**
503: * Style constant for parent behavior (value is 1<<48).
504: */
505: public static final int PARENT = 1 << 48;
506:
507: /**
508: * Style constant for children behavior (value is 1<<49).
509: */
510: public static final int CHILDREN = 1 << 49;
511:
512: /**
513: * Style constant for leaf behavior (value is 1<<51).
514: */
515: public static final int LEAF = 1 << 51;
516:
517: }
|