Dead
[official-gcc.git] / gomp-20050608-branch / libjava / classpath / javax / accessibility / AccessibleState.java
bloba630354b0a612b9b4cfe4117bd5d94ebc15355f3
1 /* AccessibleState.java -- a state 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.awt.Dimension;
41 import java.util.Locale;
43 /**
44 * A state portion of an accessible object. A combination of states represent
45 * the entire object state, in an AccessibleStateSet. For example, this could
46 * be "active" or "selected". This strongly typed "enumeration" supports
47 * localized strings. If the constants of this class are not adequate, new
48 * ones may be added in a similar matter, while avoiding a public constructor.
50 * @author Eric Blake (ebb9@email.byu.edu)
51 * @since 1.2
52 * @status updated to 1.4
54 public class AccessibleState extends AccessibleBundle
56 /**
57 * Indicates an active window, as well as an active child in a list or other
58 * collection.
60 * @see AccessibleRole#WINDOW
61 * @see AccessibleRole#FRAME
62 * @see AccessibleRole#DIALOG
64 public static final AccessibleState ACTIVE
65 = new AccessibleState("active");
67 /**
68 * Indicates a pushed button, usually when the mouse has been pressed but
69 * not released.
71 * @see AccessibleRole#PUSH_BUTTON
73 public static final AccessibleState PRESSED
74 = new AccessibleState("pressed");
76 /**
77 * Indicates an armed object, usually a button which has been pushed and
78 * the mouse has not left the button area.
80 * @see AccessibleRole#PUSH_BUTTON
82 public static final AccessibleState ARMED
83 = new AccessibleState("armed");
85 /**
86 * Indicates an object is busy, such as a slider, scroll bar, or progress
87 * bar in transition.
89 * @see AccessibleRole#PROGRESS_BAR
90 * @see AccessibleRole#SCROLL_BAR
91 * @see AccessibleRole#SLIDER
93 public static final AccessibleState BUSY
94 = new AccessibleState("busy");
96 /**
97 * Indicates an object is checked.
99 * @see AccessibleRole#TOGGLE_BUTTON
100 * @see AccessibleRole#RADIO_BUTTON
101 * @see AccessibleRole#CHECK_BOX
103 public static final AccessibleState CHECKED
104 = new AccessibleState("checked");
107 * Indicates the user can edit the component contents. This is usually for
108 * text, as other objects like scroll bars are automatically editable.
110 * @see #ENABLED
112 public static final AccessibleState EDITABLE
113 = new AccessibleState("editable");
116 * Indicates the object allows progressive disclosure of its children,
117 * usually in a collapsible tree or other hierachical object.
119 * @see #EXPANDED
120 * @see #COLLAPSED
121 * @see AccessibleRole#TREE
123 public static final AccessibleState EXPANDABLE
124 = new AccessibleState("expandable");
127 * Indicates that the object is collapsed, usually in a tree.
129 * @see #EXPANDABLE
130 * @see #EXPANDED
131 * @see AccessibleRole#TREE
133 public static final AccessibleState COLLAPSED
134 = new AccessibleState("collapsed");
137 * Indicates that the object is expanded, usually in a tree.
139 * @see #EXPANDABLE
140 * @see #COLLAPSED
141 * @see AccessibleRole#TREE
143 public static final AccessibleState EXPANDED
144 = new AccessibleState("expanded");
147 * Indicates that an object is enabled. In the absence of this state,
148 * graphics are often grayed out, and cannot be manipulated.
150 public static final AccessibleState ENABLED
151 = new AccessibleState("enabled");
154 * Indicates that an object can accept focus, which means it will process
155 * keyboard events when focused.
157 * @see #FOCUSED
159 public static final AccessibleState FOCUSABLE
160 = new AccessibleState("focusable");
163 * Indicates that an object has keyboard focus.
165 * @see #FOCUSABLE
167 public static final AccessibleState FOCUSED
168 = new AccessibleState("focused");
171 * Indicates that an object is minimized to an icon.
173 * @see AccessibleRole#FRAME
174 * @see AccessibleRole#INTERNAL_FRAME
176 public static final AccessibleState ICONIFIED
177 = new AccessibleState("iconified");
180 * Indicates that something must be done in the current object before
181 * interaction is allowed on other windows, usually for dialogs.
183 * @see AccessibleRole#DIALOG
185 public static final AccessibleState MODAL
186 = new AccessibleState("modal");
189 * Indicates that all pixels in the object are painted. If this state is not
190 * present, then the object has some degree of transparency, letting lower
191 * panes show through.
193 * @see Accessible#getAccessibleContext()
194 * @see AccessibleContext#getAccessibleComponent()
195 * @see AccessibleComponent#getBounds()
197 public static final AccessibleState OPAQUE
198 = new AccessibleState("opaque");
201 * Indicates the size of this object is not fixed.
203 * @see Accessible#getAccessibleContext()
204 * @see AccessibleContext#getAccessibleComponent()
205 * @see AccessibleComponent#getSize()
206 * @see AccessibleComponent#setSize(Dimension)
208 public static final AccessibleState RESIZABLE
209 = new AccessibleState("resizable");
212 * Indicates that multiple children can be selected at once.
214 * @see Accessible#getAccessibleContext()
215 * @see AccessibleContext#getAccessibleSelection()
216 * @see AccessibleSelection
218 public static final AccessibleState MULTISELECTABLE
219 = new AccessibleState("multiselectable");
222 * Indicates that this child is one which can be selected from its parent.
224 * @see #SELECTED
225 * @see Accessible#getAccessibleContext()
226 * @see AccessibleContext#getAccessibleSelection()
227 * @see AccessibleSelection
229 public static final AccessibleState SELECTABLE
230 = new AccessibleState("selectable");
233 * Indicates that this child has been selected from its parent.
235 * @see #SELECTABLE
236 * @see Accessible#getAccessibleContext()
237 * @see AccessibleContext#getAccessibleSelection()
238 * @see AccessibleSelection
240 public static final AccessibleState SELECTED
241 = new AccessibleState("selected");
244 * Indicates that this object and all its parents are visible, so that it
245 * is on the screen. However, something opaque may be on top of it.
247 * @see #VISIBLE
249 public static final AccessibleState SHOWING
250 = new AccessibleState("showing");
253 * Indicates that this object intends to be visible. However, if its
254 * parent is invisible, this object is as well.
256 * @see #SHOWING
258 public static final AccessibleState VISIBLE
259 = new AccessibleState("visible");
262 * Indicates that an object has vertical orientation.
264 * @see #HORIZONTAL
265 * @see AccessibleRole#SCROLL_BAR
266 * @see AccessibleRole#SLIDER
267 * @see AccessibleRole#PROGRESS_BAR
269 public static final AccessibleState VERTICAL
270 = new AccessibleState("vertical");
273 * Indicates that an object has horizontal orientation.
275 * @see #VERTICAL
276 * @see AccessibleRole#SCROLL_BAR
277 * @see AccessibleRole#SLIDER
278 * @see AccessibleRole#PROGRESS_BAR
280 public static final AccessibleState HORIZONTAL
281 = new AccessibleState("horizontal");
284 * Indicates that this text object can only hold a single line.
286 * @see #MULTI_LINE
288 public static final AccessibleState SINGLE_LINE
289 = new AccessibleState("single line");
292 * Indicates that this text object can hold multiple lines.
294 * @see #SINGLE_LINE
296 public static final AccessibleState MULTI_LINE
297 = new AccessibleState("multiple line");
300 * Indicates that this object is transient. This means the object is
301 * generated for method queries, but will never generate events, because
302 * its container (such as a tree, list, or table) does all the work.
304 public static final AccessibleState TRANSIENT
305 = new AccessibleState("transient");
308 * Create a new constant with a locale independent key. Follow the example,
309 * keep the constructor private and make public constants instead.
311 * @param key the name of the state
312 * @see #toDisplayString(String, Locale)
314 protected AccessibleState(String key)
316 this.key = key;
318 } // class AccessibleState