1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
|
/* AccessibleState.java -- a state of an accessible object
Copyright (C) 2002, 2005 Free Software Foundation
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package javax.accessibility;
import java.awt.Dimension;
import java.util.Locale;
/**
* A state portion of an accessible object. A combination of states represent
* the entire object state, in an AccessibleStateSet. For example, this could
* be "active" or "selected". This strongly typed "enumeration" supports
* localized strings. If the constants of this class are not adequate, new
* ones may be added in a similar matter, while avoiding a public constructor.
*
* @author Eric Blake (ebb9@email.byu.edu)
* @since 1.2
* @status updated to 1.4
*/
public class AccessibleState extends AccessibleBundle
{
/**
* Indicates an active window, as well as an active child in a list or other
* collection.
*
* @see AccessibleRole#WINDOW
* @see AccessibleRole#FRAME
* @see AccessibleRole#DIALOG
*/
public static final AccessibleState ACTIVE
= new AccessibleState("active");
/**
* Indicates a pushed button, usually when the mouse has been pressed but
* not released.
*
* @see AccessibleRole#PUSH_BUTTON
*/
public static final AccessibleState PRESSED
= new AccessibleState("pressed");
/**
* Indicates an armed object, usually a button which has been pushed and
* the mouse has not left the button area.
*
* @see AccessibleRole#PUSH_BUTTON
*/
public static final AccessibleState ARMED
= new AccessibleState("armed");
/**
* Indicates an object is busy, such as a slider, scroll bar, or progress
* bar in transition.
*
* @see AccessibleRole#PROGRESS_BAR
* @see AccessibleRole#SCROLL_BAR
* @see AccessibleRole#SLIDER
*/
public static final AccessibleState BUSY
= new AccessibleState("busy");
/**
* Indicates an object is checked.
*
* @see AccessibleRole#TOGGLE_BUTTON
* @see AccessibleRole#RADIO_BUTTON
* @see AccessibleRole#CHECK_BOX
*/
public static final AccessibleState CHECKED
= new AccessibleState("checked");
/**
* Indicates the user can edit the component contents. This is usually for
* text, as other objects like scroll bars are automatically editable.
*
* @see #ENABLED
*/
public static final AccessibleState EDITABLE
= new AccessibleState("editable");
/**
* Indicates the object allows progressive disclosure of its children,
* usually in a collapsible tree or other hierachical object.
*
* @see #EXPANDED
* @see #COLLAPSED
* @see AccessibleRole#TREE
*/
public static final AccessibleState EXPANDABLE
= new AccessibleState("expandable");
/**
* Indicates that the object is collapsed, usually in a tree.
*
* @see #EXPANDABLE
* @see #EXPANDED
* @see AccessibleRole#TREE
*/
public static final AccessibleState COLLAPSED
= new AccessibleState("collapsed");
/**
* Indicates that the object is expanded, usually in a tree.
*
* @see #EXPANDABLE
* @see #COLLAPSED
* @see AccessibleRole#TREE
*/
public static final AccessibleState EXPANDED
= new AccessibleState("expanded");
/**
* Indicates that an object is enabled. In the absence of this state,
* graphics are often grayed out, and cannot be manipulated.
*/
public static final AccessibleState ENABLED
= new AccessibleState("enabled");
/**
* Indicates that an object can accept focus, which means it will process
* keyboard events when focused.
*
* @see #FOCUSED
*/
public static final AccessibleState FOCUSABLE
= new AccessibleState("focusable");
/**
* Indicates that an object has keyboard focus.
*
* @see #FOCUSABLE
*/
public static final AccessibleState FOCUSED
= new AccessibleState("focused");
/**
* Indicates that an object is minimized to an icon.
*
* @see AccessibleRole#FRAME
* @see AccessibleRole#INTERNAL_FRAME
*/
public static final AccessibleState ICONIFIED
= new AccessibleState("iconified");
/**
* Indicates that the state of this particular object is
* indeterminate. This commonly occurs when an object is incapable
* of representing the state by a single value.
*
* @since 1.5
*/
public static final AccessibleState INDETERMINATE
= new AccessibleState("indeterminate");
/**
* Indicates that this particular object manages a number of
* subcomponents. This is a common property of structures such as
* trees and tables, which have a number of sub-elements such as
* rows and columns. The subcomponents should be left to the
* object, and not managed by the application.
*
* @since 1.5
*/
public static final AccessibleState MANAGES_DESCENDANTS
= new AccessibleState("manages descendants");
/**
* Indicates that something must be done in the current object before
* interaction is allowed on other windows, usually for dialogs.
*
* @see AccessibleRole#DIALOG
*/
public static final AccessibleState MODAL
= new AccessibleState("modal");
/**
* Indicates that all pixels in the object are painted. If this state is not
* present, then the object has some degree of transparency, letting lower
* panes show through.
*
* @see Accessible#getAccessibleContext()
* @see AccessibleContext#getAccessibleComponent()
* @see AccessibleComponent#getBounds()
*/
public static final AccessibleState OPAQUE
= new AccessibleState("opaque");
/**
* Indicates the size of this object is not fixed.
*
* @see Accessible#getAccessibleContext()
* @see AccessibleContext#getAccessibleComponent()
* @see AccessibleComponent#getSize()
* @see AccessibleComponent#setSize(Dimension)
*/
public static final AccessibleState RESIZABLE
= new AccessibleState("resizable");
/**
* Indicates that multiple children can be selected at once.
*
* @see Accessible#getAccessibleContext()
* @see AccessibleContext#getAccessibleSelection()
* @see AccessibleSelection
*/
public static final AccessibleState MULTISELECTABLE
= new AccessibleState("multiselectable");
/**
* Indicates that this child is one which can be selected from its parent.
*
* @see #SELECTED
* @see Accessible#getAccessibleContext()
* @see AccessibleContext#getAccessibleSelection()
* @see AccessibleSelection
*/
public static final AccessibleState SELECTABLE
= new AccessibleState("selectable");
/**
* Indicates that this child has been selected from its parent.
*
* @see #SELECTABLE
* @see Accessible#getAccessibleContext()
* @see AccessibleContext#getAccessibleSelection()
* @see AccessibleSelection
*/
public static final AccessibleState SELECTED
= new AccessibleState("selected");
/**
* Indicates that this object and all its parents are visible, so that it
* is on the screen. However, something opaque may be on top of it.
*
* @see #VISIBLE
*/
public static final AccessibleState SHOWING
= new AccessibleState("showing");
/**
* Indicates that this particular object is truncated when displayed
* visually.
*
* @since 1.5
*/
public static final AccessibleState TRUNCATED
= new AccessibleState("truncated");
/**
* Indicates that this object intends to be visible. However, if its
* parent is invisible, this object is as well.
*
* @see #SHOWING
*/
public static final AccessibleState VISIBLE
= new AccessibleState("visible");
/**
* Indicates that an object has vertical orientation.
*
* @see #HORIZONTAL
* @see AccessibleRole#SCROLL_BAR
* @see AccessibleRole#SLIDER
* @see AccessibleRole#PROGRESS_BAR
*/
public static final AccessibleState VERTICAL
= new AccessibleState("vertical");
/**
* Indicates that an object has horizontal orientation.
*
* @see #VERTICAL
* @see AccessibleRole#SCROLL_BAR
* @see AccessibleRole#SLIDER
* @see AccessibleRole#PROGRESS_BAR
*/
public static final AccessibleState HORIZONTAL
= new AccessibleState("horizontal");
/**
* Indicates that this text object can only hold a single line.
*
* @see #MULTI_LINE
*/
public static final AccessibleState SINGLE_LINE
= new AccessibleState("single line");
/**
* Indicates that this text object can hold multiple lines.
*
* @see #SINGLE_LINE
*/
public static final AccessibleState MULTI_LINE
= new AccessibleState("multiple line");
/**
* Indicates that this object is transient. This means the object is
* generated for method queries, but will never generate events, because
* its container (such as a tree, list, or table) does all the work.
*/
public static final AccessibleState TRANSIENT
= new AccessibleState("transient");
/**
* Create a new constant with a locale independent key. Follow the example,
* keep the constructor private and make public constants instead.
*
* @param key the name of the state
* @see #toDisplayString(String, Locale)
*/
protected AccessibleState(String key)
{
this.key = key;
}
} // class AccessibleState
|