Imported GNU Classpath 0.90
[official-gcc.git] / libjava / classpath / javax / accessibility / AccessibleRole.java
bloba5396f147f51450e238fea010e31b9328fbe7653
1 /* AccessibleRole.java -- the primary role of an accessible object
2 Copyright (C) 2002, 2005 Free Software Foundation
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 02110-1301 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
38 package javax.accessibility;
40 import java.util.Locale;
42 /**
43 * The role of an accessible object. For example, this could be "button" or
44 * "table". This strongly typed "enumeration" supports localized strings. If
45 * the constants of this class are not adequate, new ones may be added in a
46 * similar matter, while avoiding a public constructor.
48 * @author Eric Blake (ebb9@email.byu.edu)
49 * @since 1.2
50 * @status updated to 1.4
52 public class AccessibleRole extends AccessibleBundle
54 /** The object alerts the user about something. */
55 public static final AccessibleRole ALERT
56 = new AccessibleRole("alert");
58 /** The header for a column of data. */
59 public static final AccessibleRole COLUMN_HEADER
60 = new AccessibleRole("column header");
62 /**
63 * The object can be drawn into, and traps events.
65 * @see #FRAME
66 * @see #GLASS_PANE
67 * @see #LAYERED_PANE
69 public static final AccessibleRole CANVAS
70 = new AccessibleRole("canvas");
72 /**
73 * A list of choices, which may optionally allow the user to create a new
74 * choice.
76 public static final AccessibleRole COMBO_BOX
77 = new AccessibleRole("combo box");
79 /**
80 * An iconified frame in a desktop.
82 * @see #DESKTOP_PANE
83 * @see #INTERNAL_FRAME
85 public static final AccessibleRole DESKTOP_ICON
86 = new AccessibleRole("desktop icon");
88 /**
89 * A frame-like object clipped by a desktop pane.
91 * @see #DESKTOP_ICON
92 * @see #DESKTOP_PANE
93 * @see #FRAME
95 public static final AccessibleRole INTERNAL_FRAME
96 = new AccessibleRole("internal frame");
98 /**
99 * A pane which supports internal frames and their icons.
101 * @see #DESKTOP_ICON
102 * @see #INTERNAL_FRAME
104 public static final AccessibleRole DESKTOP_PANE
105 = new AccessibleRole("desktop pane");
108 * A specialized pane for use in a dialog.
110 * @see #DIALOG
112 public static final AccessibleRole OPTION_PANE
113 = new AccessibleRole("option pane");
116 * A top level window with no title or border.
118 * @see #FRAME
119 * @see #DIALOG
121 public static final AccessibleRole WINDOW
122 = new AccessibleRole("window");
125 * A top level window with title, menu bar, border, and so forth. It is
126 * often the primary window of an application.
128 * @see #DIALOG
129 * @see #CANVAS
130 * @see #WINDOW
132 public static final AccessibleRole FRAME
133 = new AccessibleRole("frame");
136 * A top level window title bar and border. It is limited compared to a
137 * frame, and is often a secondary window.
139 * @see #FRAME
140 * @see #WINDOW
142 public static final AccessibleRole DIALOG
143 = new AccessibleRole("dialog");
145 /** A specialized dialog for choosing a color. */
146 public static final AccessibleRole COLOR_CHOOSER
147 = new AccessibleRole("color chooser");
150 * A pane for navigating through directories.
152 * @see #FILE_CHOOSER
154 public static final AccessibleRole DIRECTORY_PANE
155 = new AccessibleRole("directory pane");
158 * A specialized dialog that allows a user to select a file.
160 * @see #DIRECTORY_PANE
162 public static final AccessibleRole FILE_CHOOSER
163 = new AccessibleRole("file chooser");
165 /** An object to fill space between other components. */
166 public static final AccessibleRole FILLER
167 = new AccessibleRole("filler");
169 /** A hypertext anchor. */
170 public static final AccessibleRole HYPERLINK
171 = new AccessibleRole("hyperlink");
173 /** A small picture to decorate components. */
174 public static final AccessibleRole ICON
175 = new AccessibleRole("icon");
177 /** An object to label something in a graphic interface. */
178 public static final AccessibleRole LABEL
179 = new AccessibleRole("label");
182 * A specialized pane with a glass pane and layered pane as children.
184 * @see #GLASS_PANE
185 * @see #LAYERED_PANE
187 public static final AccessibleRole ROOT_PANE
188 = new AccessibleRole("root pane");
191 * A pane guaranteed to be painted on top of panes beneath it.
193 * @see #ROOT_PANE
194 * @see #LAYERED_PANE
196 public static final AccessibleRole GLASS_PANE
197 = new AccessibleRole("glass pane");
200 * A specialized pane that allows drawing children in layers. This is often
201 * used in menus and other visual components.
203 * @see #ROOT_PANE
204 * @see #GLASS_PANE
206 public static final AccessibleRole LAYERED_PANE
207 = new AccessibleRole("layered pane");
210 * An object which presents a list of items for selection. Often contained
211 * in a scroll pane.
213 * @see #SCROLL_PANE
214 * @see #LIST_ITEM
216 public static final AccessibleRole LIST
217 = new AccessibleRole("list");
220 * An object which represents an item in a list. Often contained in a scroll
221 * pane.
223 * @see #SCROLL_PANE
224 * @see #LIST
226 public static final AccessibleRole LIST_ITEM
227 = new AccessibleRole("list item");
230 * An object usually at the top of a frame to list available menus.
232 * @see #MENU
233 * @see #POPUP_MENU
234 * @see #LAYERED_PANE
236 public static final AccessibleRole MENU_BAR
237 = new AccessibleRole("menu bar");
240 * A temporary window with a menu of options, which hides on selection.
242 * @see #MENU
243 * @see #MENU_ITEM
245 public static final AccessibleRole POPUP_MENU
246 = new AccessibleRole("popup menu");
249 * An object usually in a menu bar which contains a list of actions to
250 * perform. Such actions are usually associated with menu items or submenus.
252 * @see #MENU_BAR
253 * @see #MENU_ITEM
254 * @see #SEPARATOR
255 * @see #RADIO_BUTTON
256 * @see #CHECK_BOX
257 * @see #POPUP_MENU
259 public static final AccessibleRole MENU
260 = new AccessibleRole("menu");
263 * An object usually in a menu with an action available for the user.
265 * @see #MENU_BAR
266 * @see #SEPARATOR
267 * @see #POPUP_MENU
269 public static final AccessibleRole MENU_ITEM
270 = new AccessibleRole("menu item");
273 * An object usually in a menu which separates logical sections of items.
275 * @see #MENU
276 * @see #MENU_ITEM
278 public static final AccessibleRole SEPARATOR
279 = new AccessibleRole("separator");
282 * An object which presents a series of panels, usually via tabs along the
283 * top. Children are all page tabs.
285 * @see #PAGE_TAB
287 public static final AccessibleRole PAGE_TAB_LIST
288 = new AccessibleRole("page tab list");
291 * An object in a page tab list, which contains the panel to display when
292 * selected from the list.
294 * @see #PAGE_TAB_LIST
296 public static final AccessibleRole PAGE_TAB
297 = new AccessibleRole("page tab");
299 /** A generic container to group objects. */
300 public static final AccessibleRole PANEL
301 = new AccessibleRole("panel");
303 /** An object used to track amount of a task that has completed. */
304 public static final AccessibleRole PROGRESS_BAR
305 = new AccessibleRole("progress bar");
307 /** An object for passwords which should not be shown to the user. */
308 public static final AccessibleRole PASSWORD_TEXT
309 = new AccessibleRole("password text");
312 * An object that can be manipulated to do something.
314 * @see #CHECK_BOX
315 * @see #TOGGLE_BUTTON
316 * @see #RADIO_BUTTON
318 public static final AccessibleRole PUSH_BUTTON
319 = new AccessibleRole("push button");
322 * A specialized button which can be on or off, with no separate indicator.
324 * @see #PUSH_BUTTON
325 * @see #CHECK_BOX
326 * @see #RADIO_BUTTON
328 public static final AccessibleRole TOGGLE_BUTTON
329 = new AccessibleRole("toggle button");
332 * A choice which can be on or off, and has a separate indicator.
334 * @see #PUSH_BUTTON
335 * @see #TOGGLE_BUTTON
336 * @see #RADIO_BUTTON
338 public static final AccessibleRole CHECK_BOX
339 = new AccessibleRole("check box");
342 * A specialized choice which toggles radio buttons in the group when it
343 * is selected.
345 * @see #PUSH_BUTTON
346 * @see #TOGGLE_BUTTON
347 * @see #CHECK_BOX
349 public static final AccessibleRole RADIO_BUTTON
350 = new AccessibleRole("radio button");
352 /** The header for a row of data. */
353 public static final AccessibleRole ROW_HEADER
354 = new AccessibleRole("row header");
357 * An object which allows an incremental view of a larger pane.
359 * @see #SCROLL_BAR
360 * @see #VIEWPORT
362 public static final AccessibleRole SCROLL_PANE
363 = new AccessibleRole("scroll pane");
366 * An object which allows selection of the view in a scroll pane.
368 * @see #SCROLL_PANE
370 public static final AccessibleRole SCROLL_BAR
371 = new AccessibleRole("scroll bar");
374 * An object which represents the visual section in a scroll pane.
376 * @see #SCROLL_PANE
378 public static final AccessibleRole VIEWPORT
379 = new AccessibleRole("viewport");
381 /** An object which allows selection in a bounded range. */
382 public static final AccessibleRole SLIDER
383 = new AccessibleRole("slider");
386 * A specialized pane which presents two other panels, and can often adjust
387 * the divider between them.
389 public static final AccessibleRole SPLIT_PANE
390 = new AccessibleRole("split pane");
392 /** An object for presenting data in rows and columns. */
393 public static final AccessibleRole TABLE
394 = new AccessibleRole("table");
397 * An object which represents text, usually editable by the user.
399 * @see #LABEL
401 public static final AccessibleRole TEXT
402 = new AccessibleRole("text");
405 * An object which represents a hierachical view of data. Subnodes can
406 * often be expanded or collapsed.
408 public static final AccessibleRole TREE
409 = new AccessibleRole("tree");
411 /** A bar or pallete with buttons for common actions in an application. */
412 public static final AccessibleRole TOOL_BAR
413 = new AccessibleRole("tool bar");
416 * An object which provides information about another object. This is often
417 * displayed as a "help bubble" when a mouse hovers over the other object.
419 public static final AccessibleRole TOOL_TIP
420 = new AccessibleRole("tool tip");
423 * An AWT component with nothing else known about it.
425 * @see #SWING_COMPONENT
426 * @see #UNKNOWN
428 public static final AccessibleRole AWT_COMPONENT
429 = new AccessibleRole("AWT component");
432 * A swing component with nothing else known about it.
434 * @see #AWT_COMPONENT
435 * @see #UNKNOWN
437 public static final AccessibleRole SWING_COMPONENT
438 = new AccessibleRole("SWING component");
441 * An accessible object whose role is unknown.
443 * @see #AWT_COMPONENT
444 * @see #SWING_COMPONENT
446 public static final AccessibleRole UNKNOWN
447 = new AccessibleRole("unknown");
449 /** A component with multiple labels of status information. */
450 public static final AccessibleRole STATUS_BAR
451 = new AccessibleRole("statusbar");
453 /** A component which allows editing of Date and Time objects. */
454 public static final AccessibleRole DATE_EDITOR
455 = new AccessibleRole("dateeditor");
457 /** A component with spinner arrows for simple numbers. */
458 public static final AccessibleRole SPIN_BOX
459 = new AccessibleRole("spinbox");
461 /** A component for choosing fonts and their attributes. */
462 public static final AccessibleRole FONT_CHOOSER
463 = new AccessibleRole("fontchooser");
465 /** A component with a border to group other components. */
466 public static final AccessibleRole GROUP_BOX
467 = new AccessibleRole("groupbox");
470 * A formula for creating a value.
472 * @since 1.5
474 public static final AccessibleRole EDITBAR
475 = new AccessibleRole("editbar");
478 * A text-based footer.
480 * @since 1.5
482 public static final AccessibleRole FOOTER
483 = new AccessibleRole("footer");
486 * A text-based header.
488 * @since 1.5
490 public static final AccessibleRole HEADER
491 = new AccessibleRole("header");
495 * A text-based paragraph.
497 * @since 1.5
499 public static final AccessibleRole PARAGRAPH
500 = new AccessibleRole("paragraph");
503 * Represents the current level of progress on a particular task.
505 * @since 1.5
507 public static final AccessibleRole PROGRESS_MONITOR
508 = new AccessibleRole("progress monitor");
511 * A ruler is a method of measuring the distance between two
512 * points.
514 * @since 1.5
516 public static final AccessibleRole RULER
517 = new AccessibleRole("ruler");
520 * Create a new constant with a locale independent key. Follow the example,
521 * keep the constructor private and make public constants instead.
523 * @param key the name of the role
524 * @see #toDisplayString(String, Locale)
526 protected AccessibleRole(String key)
528 this.key = key;
530 } // class AccessibleRole