1 /* AccessibleState.java -- a state 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)
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
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
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
;
41 * A state portion of an accessible object. A combination of states represent
42 * the entire object state, in an AccessibleStateSet. For example, this could
43 * be "active" or "selected". This strongly typed "enumeration" supports
44 * localized strings. If the constants of this class are not adequate, new
45 * ones may be added in a similar matter, while avoiding a public constructor.
47 * @author Eric Blake <ebb9@email.byu.edu>
49 * @status updated to 1.4
51 public class AccessibleState
extends AccessibleBundle
54 * Indicates an active window, as well as an active child in a list or other
57 * @see AccessibleRole#WINDOW
58 * @see AccessibleRole#FRAME
59 * @see AccessibleRole#DIALOG
61 public static final AccessibleState ACTIVE
62 = new AccessibleState("active");
65 * Indicates a pushed button, usually when the mouse has been pressed but
68 * @see AccessibleRole#PUSH_BUTTON
70 public static final AccessibleState PRESSED
71 = new AccessibleState("pressed");
74 * Indicates an armed object, usually a button which has been pushed and
75 * the mouse has not left the button area.
77 * @see AccessibleRole#PUSH_BUTTON
79 public static final AccessibleState ARMED
80 = new AccessibleState("armed");
83 * Indicates an object is busy, such as a slider, scroll bar, or progress
86 * @see AccessibleRole#PROGRESS_BAR
87 * @see AccessibleRole#SCROLL_BAR
88 * @see AccessibleRole#SLIDER
90 public static final AccessibleState BUSY
91 = new AccessibleState("busy");
94 * Indicates an object is checked.
96 * @see AccessibleRole#TOGGLE_BUTTON
97 * @see AccessibleRole#RADIO_BUTTON
98 * @see AccessibleRole#CHECK_BOX
100 public static final AccessibleState CHECKED
101 = new AccessibleState("checked");
104 * Indicates the user can edit the component contents. This is usually for
105 * text, as other objects like scroll bars are automatically editable.
109 public static final AccessibleState EDITABLE
110 = new AccessibleState("editable");
113 * Indicates the object allows progressive disclosure of its children,
114 * usually in a collapsible tree or other hierachical object.
118 * @see AccessibleRole#TREE
120 public static final AccessibleState EXPANDABLE
121 = new AccessibleState("expandable");
124 * Indicates that the object is collapsed, usually in a tree.
128 * @see AccessibleRole#TREE
130 public static final AccessibleState COLLAPSED
131 = new AccessibleState("collapsed");
134 * Indicates that the object is expanded, usually in a tree.
138 * @see AccessibleRole#TREE
140 public static final AccessibleState EXPANDED
141 = new AccessibleState("expanded");
144 * Indicates that an object is enabled. In the absence of this state,
145 * graphics are often grayed out, and cannot be manipulated.
147 public static final AccessibleState ENABLED
148 = new AccessibleState("enabled");
151 * Indicates that an object can accept focus, which means it will process
152 * keyboard events when focused.
156 public static final AccessibleState FOCUSABLE
157 = new AccessibleState("focusable");
160 * Indicates that an object has keyboard focus.
164 public static final AccessibleState FOCUSED
165 = new AccessibleState("focused");
168 * Indicates that an object is minimized to an icon.
170 * @see AccessibleRole#FRAME
171 * @see AccessibleRole#INTERNAL_FRAME
173 public static final AccessibleState ICONIFIED
174 = new AccessibleState("iconified");
177 * Indicates that something must be done in the current object before
178 * interaction is allowed on other windows, usually for dialogs.
180 * @see AccessibleRole#DIALOG
182 public static final AccessibleState MODAL
183 = new AccessibleState("modal");
186 * Indicates that all pixels in the object are painted. If this state is not
187 * present, then the object has some degree of transparency, letting lower
188 * panes show through.
190 * @see Accessible#getAccessibleContext()
191 * @see AccessibleContext#getAccessibleComponent()
192 * @see AccessibleComponent#getBounds()
194 public static final AccessibleState OPAQUE
195 = new AccessibleState("opaque");
198 * Indicates the size of this object is not fixed.
200 * @see Accessible#getAccessibleContext()
201 * @see AccessibleContext#getAccessibleComponent()
202 * @see AccessibleComponent#getSize()
203 * @see AccessibleComponent#setSize(Dimension)
205 public static final AccessibleState RESIZABLE
206 = new AccessibleState("resizable");
209 * Indicates that multiple children can be selected at once.
211 * @see Accessible#getAccessibleContext()
212 * @see AccessibleContext#getAccessibleSelection()
213 * @see AccessibleSelection
215 public static final AccessibleState MULTISELECTABLE
216 = new AccessibleState("multiselectable");
219 * Indicates that this child is one which can be selected from its parent.
222 * @see Accessible#getAccessibleContext()
223 * @see AccessibleContext#getAccessibleSelection()
224 * @see AccessibleSelection
226 public static final AccessibleState SELECTABLE
227 = new AccessibleState("selectable");
230 * Indicates that this child has been selected from its parent.
233 * @see Accessible#getAccessibleContext()
234 * @see AccessibleContext#getAccessibleSelection()
235 * @see AccessibleSelection
237 public static final AccessibleState SELECTED
238 = new AccessibleState("selected");
241 * Indicates that this object and all its parents are visible, so that it
242 * is on the screen. However, something opaque may be on top of it.
246 public static final AccessibleState SHOWING
247 = new AccessibleState("showing");
250 * Indicates that this object intends to be visible. However, if its
251 * parent is invisible, this object is as well.
255 public static final AccessibleState VISIBLE
256 = new AccessibleState("visible");
259 * Indicates that an object has vertical orientation.
262 * @see AccessibleRole#SCROLL_BAR
263 * @see AccessibleRole#SLIDER
264 * @see AccessibleRole#PROGRESS_BAR
266 public static final AccessibleState VERTICAL
267 = new AccessibleState("vertical");
270 * Indicates that an object has horizontal orientation.
273 * @see AccessibleRole#SCROLL_BAR
274 * @see AccessibleRole#SLIDER
275 * @see AccessibleRole#PROGRESS_BAR
277 public static final AccessibleState HORIZONTAL
278 = new AccessibleState("horizontal");
281 * Indicates that this text object can only hold a single line.
285 public static final AccessibleState SINGLE_LINE
286 = new AccessibleState("single line");
289 * Indicates that this text object can hold multiple lines.
293 public static final AccessibleState MULTI_LINE
294 = new AccessibleState("multiple line");
297 * Indicates that this object is transient. This means the object is
298 * generated for method queries, but will never generate events, because
299 * its container (such as a tree, list, or table) does all the work.
301 public static final AccessibleState TRANSIENT
302 = new AccessibleState("transient");
305 * Create a new constant with a locale independent key. Follow the example,
306 * keep the constructor private and make public constants instead.
308 * @param key the name of the state
309 * @see #toDisplayString(String, Locale)
311 protected AccessibleState(String key
)
315 } // class AccessibleState