Merge from the pain train
[official-gcc.git] / libjava / javax / accessibility / AccessibleRole.java
blob34f75602b146c2ade3af2760a0b66093eacc18fd
1 /* AccessibleRole.java -- the primary role of an accessible object
2 Copyright (C) 2002 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., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 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 /**
41 * The role of an accessible object. For example, this could be "button" or
42 * "table". This strongly typed "enumeration" supports localized strings. If
43 * the constants of this class are not adequate, new ones may be added in a
44 * similar matter, while avoiding a public constructor.
46 * @author Eric Blake (ebb9@email.byu.edu)
47 * @since 1.2
48 * @status updated to 1.4
50 public class AccessibleRole extends AccessibleBundle
52 /** The object alerts the user about something. */
53 public static final AccessibleRole ALERT
54 = new AccessibleRole("alert");
56 /** The header for a column of data. */
57 public static final AccessibleRole COLUMN_HEADER
58 = new AccessibleRole("column header");
60 /**
61 * The object can be drawn into, and traps events.
63 * @see #FRAME
64 * @see #GLASS_PANE
65 * @see #LAYERED_PANE
67 public static final AccessibleRole CANVAS
68 = new AccessibleRole("canvas");
70 /**
71 * A list of choices, which may optionally allow the user to create a new
72 * choice.
74 public static final AccessibleRole COMBO_BOX
75 = new AccessibleRole("combo box");
77 /**
78 * An iconified frame in a desktop.
80 * @see #DESKTOP_PANE
81 * @see #INTERNAL_FRAME
83 public static final AccessibleRole DESKTOP_ICON
84 = new AccessibleRole("desktop icon");
86 /**
87 * A frame-like object clipped by a desktop pane.
89 * @see #DESKTOP_ICON
90 * @see #DESKTOP_PANE
91 * @see #FRAME
93 public static final AccessibleRole INTERNAL_FRAME
94 = new AccessibleRole("internal frame");
96 /**
97 * A pane which supports internal frames and their icons.
99 * @see #DESKTOP_ICON
100 * @see #INTERNAL_FRAME
102 public static final AccessibleRole DESKTOP_PANE
103 = new AccessibleRole("desktop pane");
106 * A specialized pane for use in a dialog.
108 * @see #DIALOG
110 public static final AccessibleRole OPTION_PANE
111 = new AccessibleRole("option pane");
114 * A top level window with no title or border.
116 * @see #FRAME
117 * @see #DIALOG
119 public static final AccessibleRole WINDOW
120 = new AccessibleRole("window");
123 * A top level window with title, menu bar, border, and so forth. It is
124 * often the primary window of an application.
126 * @see #DIALOG
127 * @see #CANVAS
128 * @see #WINDOW
130 public static final AccessibleRole FRAME
131 = new AccessibleRole("frame");
134 * A top level window title bar and border. It is limited compared to a
135 * frame, and is often a secondary window.
137 * @see #FRAME
138 * @see #WINDOW
140 public static final AccessibleRole DIALOG
141 = new AccessibleRole("dialog");
143 /** A specialized dialog for choosing a color. */
144 public static final AccessibleRole COLOR_CHOOSER
145 = new AccessibleRole("color chooser");
148 * A pane for navigating through directories.
150 * @see #FILE_CHOOSER
152 public static final AccessibleRole DIRECTORY_PANE
153 = new AccessibleRole("directory pane");
156 * A specialized dialog that allows a user to select a file.
158 * @see #DIRECTORY_PANE
160 public static final AccessibleRole FILE_CHOOSER
161 = new AccessibleRole("file chooser");
163 /** An object to fill space between other components. */
164 public static final AccessibleRole FILLER
165 = new AccessibleRole("filler");
167 /** A hypertext anchor. */
168 public static final AccessibleRole HYPERLINK
169 = new AccessibleRole("hyperlink");
171 /** A small picture to decorate components. */
172 public static final AccessibleRole ICON
173 = new AccessibleRole("icon");
175 /** An object to label something in a graphic interface. */
176 public static final AccessibleRole LABEL
177 = new AccessibleRole("label");
180 * A specialized pane with a glass pane and layered pane as children.
182 * @see #GLASS_PANE
183 * @see #LAYERED_PANE
185 public static final AccessibleRole ROOT_PANE
186 = new AccessibleRole("root pane");
189 * A pane guaranteed to be painted on top of panes beneath it.
191 * @see #ROOT_PANE
192 * @see #LAYERED_PANE
194 public static final AccessibleRole GLASS_PANE
195 = new AccessibleRole("glass pane");
198 * A specialized pane that allows drawing children in layers. This is often
199 * used in menus and other visual components.
201 * @see #ROOT_PANE
202 * @see #GLASS_PANE
204 public static final AccessibleRole LAYERED_PANE
205 = new AccessibleRole("layered pane");
208 * An object which presents a list of items for selection. Often contained
209 * in a scroll pane.
211 * @see #SCROLL_PANE
212 * @see #LIST_ITEM
214 public static final AccessibleRole LIST
215 = new AccessibleRole("list");
218 * An object which represents an item in a list. Often contained in a scroll
219 * pane.
221 * @see #SCROLL_PANE
222 * @see #LIST
224 public static final AccessibleRole LIST_ITEM
225 = new AccessibleRole("list item");
228 * An object usually at the top of a frame to list available menus.
230 * @see #MENU
231 * @see #POPUP_MENU
232 * @see #LAYERED_PANE
234 public static final AccessibleRole MENU_BAR
235 = new AccessibleRole("menu bar");
238 * A temporary window with a menu of options, which hides on selection.
240 * @see #MENU
241 * @see #MENU_ITEM
243 public static final AccessibleRole POPUP_MENU
244 = new AccessibleRole("popup menu");
247 * An object usually in a menu bar which contains a list of actions to
248 * perform. Such actions are usually associated with menu items or submenus.
250 * @see #MENU_BAR
251 * @see #MENU_ITEM
252 * @see #SEPARATOR
253 * @see #RADIO_BUTTON
254 * @see #CHECK_BOX
255 * @see #POPUP_MENU
257 public static final AccessibleRole MENU
258 = new AccessibleRole("menu");
261 * An object usually in a menu with an action available for the user.
263 * @see #MENU_BAR
264 * @see #SEPARATOR
265 * @see #POPUP_MENU
267 public static final AccessibleRole MENU_ITEM
268 = new AccessibleRole("menu item");
271 * An object usually in a menu which separates logical sections of items.
273 * @see #MENU
274 * @see #MENU_ITEM
276 public static final AccessibleRole SEPARATOR
277 = new AccessibleRole("separator");
280 * An object which presents a series of panels, usually via tabs along the
281 * top. Children are all page tabs.
283 * @see #PAGE_TAB
285 public static final AccessibleRole PAGE_TAB_LIST
286 = new AccessibleRole("page tab list");
289 * An object in a page tab list, which contains the panel to display when
290 * selected from the list.
292 * @see #PAGE_TAB_LIST
294 public static final AccessibleRole PAGE_TAB
295 = new AccessibleRole("page tab");
297 /** A generic container to group objects. */
298 public static final AccessibleRole PANEL
299 = new AccessibleRole("panel");
301 /** An object used to track amount of a task that has completed. */
302 public static final AccessibleRole PROGRESS_BAR
303 = new AccessibleRole("progress bar");
305 /** An object for passwords which should not be shown to the user. */
306 public static final AccessibleRole PASSWORD_TEXT
307 = new AccessibleRole("password text");
310 * An object that can be manipulated to do something.
312 * @see #CHECK_BOX
313 * @see #TOGGLE_BUTTON
314 * @see #RADIO_BUTTON
316 public static final AccessibleRole PUSH_BUTTON
317 = new AccessibleRole("push button");
320 * A specialized button which can be on or off, with no separate indicator.
322 * @see #PUSH_BUTTON
323 * @see #CHECK_BOX
324 * @see #RADIO_BUTTON
326 public static final AccessibleRole TOGGLE_BUTTON
327 = new AccessibleRole("toggle button");
330 * A choice which can be on or off, and has a separate indicator.
332 * @see #PUSH_BUTTON
333 * @see #TOGGLE_BUTTON
334 * @see #RADIO_BUTTON
336 public static final AccessibleRole CHECK_BOX
337 = new AccessibleRole("check box");
340 * A specialized choice which toggles radio buttons in the group when it
341 * is selected.
343 * @see #PUSH_BUTTON
344 * @see #TOGGLE_BUTTON
345 * @see #CHECK_BOX
347 public static final AccessibleRole RADIO_BUTTON
348 = new AccessibleRole("radio button");
350 /** The header for a row of data. */
351 public static final AccessibleRole ROW_HEADER
352 = new AccessibleRole("row header");
355 * An object which allows an incremental view of a larger pane.
357 * @see #SCROLL_BAR
358 * @see #VIEWPORT
360 public static final AccessibleRole SCROLL_PANE
361 = new AccessibleRole("scroll pane");
364 * An object which allows selection of the view in a scroll pane.
366 * @see #SCROLL_PANE
368 public static final AccessibleRole SCROLL_BAR
369 = new AccessibleRole("scroll bar");
372 * An object which represents the visual section in a scroll pane.
374 * @see #SCROLL_PANE
376 public static final AccessibleRole VIEWPORT
377 = new AccessibleRole("viewport");
379 /** An object which allows selection in a bounded range. */
380 public static final AccessibleRole SLIDER
381 = new AccessibleRole("slider");
384 * A specialized pane which presents two other panels, and can often adjust
385 * the divider between them.
387 public static final AccessibleRole SPLIT_PANE
388 = new AccessibleRole("split pane");
390 /** An object for presenting data in rows and columns. */
391 public static final AccessibleRole TABLE
392 = new AccessibleRole("table");
395 * An object which represents text, usually editable by the user.
397 * @see #LABEL
399 public static final AccessibleRole TEXT
400 = new AccessibleRole("text");
403 * An object which represents a hierachical view of data. Subnodes can
404 * often be expanded or collapsed.
406 public static final AccessibleRole TREE
407 = new AccessibleRole("tree");
409 /** A bar or pallete with buttons for common actions in an application. */
410 public static final AccessibleRole TOOL_BAR
411 = new AccessibleRole("tool bar");
414 * An object which provides information about another object. This is often
415 * displayed as a "help bubble" when a mouse hovers over the other object.
417 public static final AccessibleRole TOOL_TIP
418 = new AccessibleRole("tool tip");
421 * An AWT component with nothing else known about it.
423 * @see #SWING_COMPONENT
424 * @see #UNKNOWN
426 public static final AccessibleRole AWT_COMPONENT
427 = new AccessibleRole("AWT component");
430 * A swing component with nothing else known about it.
432 * @see #AWT_COMPONENT
433 * @see #UNKNOWN
435 public static final AccessibleRole SWING_COMPONENT
436 = new AccessibleRole("SWING component");
439 * An accessible object whose role is unknown.
441 * @see #AWT_COMPONENT
442 * @see #SWING_COMPONENT
444 public static final AccessibleRole UNKNOWN
445 = new AccessibleRole("unknown");
447 /** A component with multiple labels of status information. */
448 public static final AccessibleRole STATUS_BAR
449 = new AccessibleRole("statusbar");
451 /** A component which allows editing of Date and Time objects. */
452 public static final AccessibleRole DATE_EDITOR
453 = new AccessibleRole("dateeditor");
455 /** A component with spinner arrows for simple numbers. */
456 public static final AccessibleRole SPIN_BOX
457 = new AccessibleRole("spinbox");
459 /** A component for choosing fonts and their attributes. */
460 public static final AccessibleRole FONT_CHOOSER
461 = new AccessibleRole("fontchooser");
463 /** A component with a border to group other components. */
464 public static final AccessibleRole GROUP_BOX
465 = new AccessibleRole("groupbox");
468 * Create a new constant with a locale independent key. Follow the example,
469 * keep the constructor private and make public constants instead.
471 * @param key the name of the role
472 * @see #toDisplayString(String, Locale)
474 protected AccessibleRole(String key)
476 this.key = key;
478 } // class AccessibleRole