forked from openjdk/jfx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAccessibleAttribute.java
862 lines (790 loc) · 23.1 KB
/
AccessibleAttribute.java
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
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
/*
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javafx.scene;
import java.time.LocalDate;
import javafx.collections.ObservableList;
import javafx.geometry.Bounds;
import javafx.geometry.Orientation;
import javafx.scene.input.KeyCombination;
import javafx.scene.text.Font;
/**
* This enum describes the attributes that an assistive technology
* such as a screen reader can request from the scene graph.
*
* The {@link AccessibleRole} dictates the set of attributes that
* the screen reader will request for a particular control. For
* example, a slider is expected to return a double that represents
* the current value.
* <p>
* Attributes may have any number of parameters, depending on the particular attribute.</p>
* <p>
* When the value of an attribute is changed by a node, it must notify the assistive technology
* using {@link Node#notifyAccessibleAttributeChanged(AccessibleAttribute)}. This will allow
* the screen reader to inform the user that a value has changed. The most common form of
* notification is focus change.
* </p>
*
* @see Node#queryAccessibleAttribute(AccessibleAttribute, Object...)
* @see Node#notifyAccessibleAttributeChanged(AccessibleAttribute)
* @see AccessibleRole
* @see AccessibleAttribute#ROLE
*
* @since JavaFX 8u40
*/
public enum AccessibleAttribute {
/**
* Returns the accelerator for the node.
* <ul>
* <li>Used by: Menu, MenuItem, RadioMenuItem, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link KeyCombination} </li>
* <li>Parameters: </li>
* </ul>
*/
ACCELERATOR(KeyCombination.class),
/**
* Returns the bounds for the node, in screen coordinates.
* <ul>
* <li>Used by: Node </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Bounds} in screen coordinates</li>
* <li>Parameters: </li>
* </ul>
*/
BOUNDS(Bounds.class),
/**
* Returns the array of bounding rectangles for the given character range,
* in screen coordinates.
* <ul>
* <li>Used by: TextField and TextArea </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Bounds}[] in screen coordinates</li>
* <li>Parameters:
* <ul>
* <li>{@link Integer} the start offset </li>
* <li>{@link Integer} the end offset </li>
* </ul>
* </li>
* </ul>
*/
BOUNDS_FOR_RANGE(Bounds[].class),
/**
* Returns the caret offset for the node.
* <ul>
* <li>Used by: TextField and TextArea </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters: </li>
* </ul>
*/
CARET_OFFSET(Integer.class),
/**
* Returns the children for the node.
* <ul>
* <li>Used by: Parent </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link javafx.collections.ObservableList}<{@link Node}> </li>
* <li>Parameters: </li>
* </ul>
*/
CHILDREN(ObservableList.class),
/**
* Returns the column at the given index.
* <ul>
* <li>Used by: TableView and TreeTableView </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters:
* <ul>
* <li>{@link Integer} the index </li>
* </ul>
* </li>
* </ul>
*/
COLUMN_AT_INDEX(Node.class),
/**
* Returns the cell at the given row and column indices.
* <ul>
* <li>Used by: TableView and TreeTableView </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters:
* <ul>
* <li>{@link Integer} the row index </li>
* <li>{@link Integer} the column index </li>
* </ul>
* </li>
* </ul>
*/
CELL_AT_ROW_COLUMN(Node.class),
/**
* Returns the column count for the node.
* <ul>
* <li>Used by: TableView and TreeTableView </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters: </li>
* </ul>
*/
COLUMN_COUNT(Integer.class),
/**
* Returns the column index for the node.
* <ul>
* <li>Used by: TableCell and TreeTableCell </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters: </li>
* </ul>
*/
COLUMN_INDEX(Integer.class),
/**
* Returns the contents of the node.
* <ul>
* <li>Used by: ScrollPane </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters: </li>
* </ul>
*/
CONTENTS(Node.class),
/**
* Returns true if the node is disabled, otherwise false.
* <ul>
* <li>Used by: Node </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Boolean} </li>
* <li>Parameters: </li>
* </ul>
*/
DISABLED(Boolean.class),
/**
* Returns the depth of a row in the disclosure hierarchy.
* <ul>
* <li>Used by: TreeItem and TreeTableRow </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters: </li>
* </ul>
*/
DISCLOSURE_LEVEL(Integer.class),
/**
* Returns the local date for the node.
* <ul>
* <li>Used by: DatePicker </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link LocalDate} </li>
* <li>Parameters: </li>
* </ul>
*/
DATE(LocalDate.class),
/**
* Returns true if the node is editable, otherwise false.
* <ul>
* <li>Used by: TextField, ComboBox, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Boolean} </li>
* <li>Parameters: </li>
* </ul>
*/
EDITABLE(Boolean.class),
/**
* Returns true if the node is expanded, otherwise false.
* <ul>
* <li>Used by: TreeItem, TitledPane, and others </li>
* <li>Needs notify: yes </li>
* <li>Return Type: {@link Boolean} </li>
* <li>Parameters: </li>
* </ul>
*/
EXPANDED(Boolean.class),
/**
* Returns the focus item.
* <p>
* Used for controls such as TabPane, TableView, ListView
* where the assistive technology focus is different from the
* normal focus node. For example, a table control will have focus,
* while a cell inside the table might have the screen reader focus.
* </p>
* <ul>
* <li>Used by: ListView, TabPane, and others </li>
* <li>Needs notify: yes </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters: </li>
* </ul>
*/
FOCUS_ITEM(Node.class),
/**
* Returns the focus node.
* Type: Node
* <p>
* When this attribute is requested from the Scene, the default implementation
* returns {@link Scene#focusOwnerProperty()}.
* </p>
* <ul>
* <li>Used by: Scene </li>
* <li>Needs notify: yes </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters: </li>
* </ul>
*/
FOCUS_NODE(Node.class),
/**
* Returns true if the node is focused, otherwise false.
* <ul>
* <li>Used by: Node </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Boolean} </li>
* <li>Parameters: </li>
* </ul>
*/
FOCUSED(Boolean.class),
/**
* Returns the font for the node.
* <ul>
* <li>Used by: TextField and TextArea </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Font} </li>
* <li>Parameters: </li>
* </ul>
*/
FONT(Font.class),
/**
* Returns the header for the node.
* <ul>
* <li>Used by: TableView and TreeTableView </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters: </li>
* </ul>
*/
HEADER(Node.class),
/**
* Returns the help text for the node.
* <ul>
* <li>Used by: Node </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link String} </li>
* <li>Parameters: </li>
* </ul>
*/
HELP(String.class),
/**
* Returns the horizontal scroll bar for the node.
* <ul>
* <li>Used by: ListView, ScrollPane, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters: </li>
* </ul>
*/
HORIZONTAL_SCROLLBAR(Node.class),
/**
* Returns true of the node is indeterminate, otherwise false.
* <ul>
* <li>Used by: CheckBox and ProgressIndicator </li>
* <li>Needs notify: yes </li>
* <li>Return Type: {@link Boolean} </li>
* <li>Parameters: </li>
* </ul>
*/
INDETERMINATE(Boolean.class),
/**
* Returns {@link ToggleState toggle state} of CheckBox of CheckBoxTreeItem.
* <ul>
* <li>Used by: CheckBoxTreeItem</li>
* <li>Needs notify: yes </li>
* <li>Return Type: {@link ToggleState}
* <ul>
* <li>{@link ToggleState#UNCHECKED ToggleState.UNCHECKED}: control is not selected</li>
* <li>{@link ToggleState#CHECKED ToggleState.CHECKED}: control is selected</li>
* <li>{@link ToggleState#INDETERMINATE ToggleState.INDETERMINATE}:
* selection state of control cannot be determined</li>
* </ul>
* </li>
* <li>Parameters: </li>
* </ul>
*
* @see ToggleState
* @since 21
*/
TOGGLE_STATE(ToggleState.class),
/**
* Returns the item at the given index.
* <ul>
* <li>Used by: TabPane, ListView, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters:
* <ul>
* <li> {@link Integer} the index </li>
* </ul>
* </li>
* </ul>
*/
ITEM_AT_INDEX(Node.class),
/**
* Returns the item count for the node.
* <ul>
* <li>Used by: TabPane, ListView, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters: </li>
* </ul>
*/
ITEM_COUNT(Integer.class),
/**
* Returns the index for the node.
* <ul>
* <li>Used by: ListItem, TableRow, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters: </li>
* </ul>
*/
INDEX(Integer.class),
/**
* Returns the node that is the label for this node.
* <p>When {@link javafx.scene.control.Label#labelForProperty() labelFor} is set,
* the default implementation of {@code LABELED_BY} uses this
* relationship to return the appropriate node to the screen
* reader.</p>
* <ul>
* <li>Used by: Node </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters: </li>
* </ul>
*/
LABELED_BY(Node.class),
/**
* Returns true if the node is a leaf element, otherwise false.
* <ul>
* <li>Used by: TreeItem and TreeTableRow </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Boolean} </li>
* <li>Parameters: </li>
* </ul>
*/
LEAF(Boolean.class),
/**
* Returns the line end offset of the given line index.
* <ul>
* <li>Used by: TextArea </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters:
* <ul>
* <li> {@link Integer} the line index </li>
* </ul>
* </li>
* </ul>
*/
LINE_END(Integer.class),
/**
* Returns the line index of the given character offset.
* <ul>
* <li>Used by: TextArea </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters:
* <ul>
* <li> {@link Integer} the character offset </li>
* </ul>
* </li>
* </ul>
*/
LINE_FOR_OFFSET(Integer.class),
/**
* Returns the line start offset of the given line index.
* <ul>
* <li>Used by: TextArea </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters:
* <ul>
* <li> {@link Integer} the line index </li>
* </ul>
* </li>
* </ul>
*/
LINE_START(Integer.class),
/**
* Returns the minimum value for the node.
* <ul>
* <li>Used by: Slider, ScrollBar, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Double} </li>
* <li>Parameters: </li>
* </ul>
*/
MIN_VALUE(Double.class),
/**
* Returns the maximum value for the node.
* <ul>
* <li>Used by: Slider, ScrollBar, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Double} </li>
* <li>Parameters: </li>
* </ul>
*/
MAX_VALUE(Double.class),
/**
* Returns the mnemonic for the node.
* <ul>
* <li>Used by: Menu, MenuItem, CheckMenuItem, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link String} </li>
* <li>Parameters: </li>
* </ul>
*/
MNEMONIC(String.class),
/**
* Returns true if the node allows for multiple selection, otherwise false.
* <ul>
* <li>Used by: ListView, TableView, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Boolean} </li>
* <li>Parameters: </li>
* </ul>
*/
MULTIPLE_SELECTION(Boolean.class),
/**
* Returns the node at the given location.
* <ul>
* <li>Used by: Scene </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters:
* <ul>
* <li> {@link javafx.geometry.Point2D} the point location, in screen coordinates </li>
* </ul>
* </li>
* </ul>
*/
NODE_AT_POINT(Node.class),
/**
* Returns the character offset at the given location.
* <ul>
* <li>Used by: TextField and TextArea </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters:
* <ul>
* <li> {@link javafx.geometry.Point2D} the point location, in screen coordinates </li>
* </ul>
* </li>
* </ul>
*/
OFFSET_AT_POINT(Integer.class),
/**
* Returns the orientation of the node.
* <ul>
* <li>Used by: ScrolBar and Slider </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link javafx.geometry.Orientation} </li>
* <li>Parameters: </li>
* </ul>
*/
ORIENTATION(Orientation.class),
/**
* Return the overflow button for the node.
* <ul>
* <li>Used by: Toolbar </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters: </li>
* </ul>
*/
OVERFLOW_BUTTON(Node.class),
/**
* Returns the parent for the node.
* <ul>
* <li>Used by: Node </li>
* <li>Needs notify: yes </li>
* <li>Return Type: {@link Parent} </li>
* <li>Parameters: </li>
* </ul>
*/
PARENT(Parent.class),
/**
* Returns the parent menu for the node.
* <ul>
* <li>Used by: ContextMenu </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters: </li>
* </ul>
*/
PARENT_MENU(Node.class),
/**
* Returns the role for the node.
* <ul>
* <li>Used by: Node </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link AccessibleRole} </li>
* <li>Parameters: </li>
* </ul>
*/
ROLE(AccessibleRole.class),
/**
* Returns the role description for the node.
* <ul>
* <li>Used by: Node </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link String} </li>
* <li>Parameters: </li>
* </ul>
*/
ROLE_DESCRIPTION(String.class),
/**
* Returns the row at the given index.
* <ul>
* <li>Used by: TableView, TreeView, and TreeTableView </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters:
* <ul>
* <li> {@link Integer} the row index </li>
* </ul>
* </li>
* </ul>
*/
ROW_AT_INDEX(Node.class),
/**
* Returns the row count for the node.
* <ul>
* <li>Used by: TableView, TreeView, and TreeTableView </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters: </li>
* </ul>
*/
ROW_COUNT(Integer.class),
/**
* Returns the row index of the node.
* <ul>
* <li>Used by: TableCell, TreeItem, and TreeTableCell </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters: </li>
* </ul>
*/
ROW_INDEX(Integer.class),
/**
* Returns the scene for the node.
* <ul>
* <li>Used by: Node </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Scene} </li>
* <li>Parameters: </li>
* </ul>
*/
SCENE(Scene.class),
/**
* Returns true if the node is selected, otherwise false.
* <ul>
* <li>Used by: CheckBox, TreeItem, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Boolean} </li>
* <li>Parameters: </li>
* </ul>
*/
SELECTED(Boolean.class),
/**
* Returns the list of selected items for the node.
* <ul>
* <li>Used by: ListView, TableView, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link javafx.collections.ObservableList}<{@link Node}> </li>
* <li>Parameters: </li>
* </ul>
*/
SELECTED_ITEMS(ObservableList.class),
/**
* Returns the text selection end offset for the node.
* Selection end corresponds to the larger position in the selection range.
* <ul>
* <li>Used by: TextField and TextArea </li>
* <li>Needs notify: yes </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters: </li>
* </ul>
*/
SELECTION_END(Integer.class),
/**
* Returns the text selection start offset for the node.
* Selection start corresponds to the smaller position in the selection range.
* <ul>
* <li>Used by: TextField and TextArea </li>
* <li>Needs notify: yes </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters: </li>
* </ul>
*/
SELECTION_START(Integer.class),
/**
* Returns the sub menu for the node.
* <ul>
* <li>Used by: Menu </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters: </li>
* </ul>
*/
SUBMENU(Node.class),
/**
* Returns the text for the node.
* E.g.
* <ul>
* <li>ComboBox returns a string representation of the current selected item.
* <li>TextField returns the contents of the text field.
* </ul>
*
* <ul>
* <li>Used by: Node </li>
* <li>Needs notify: yes </li>
* <li>Return Type: {@link String} </li>
* <li>Parameters: </li>
* </ul>
*/
TEXT(String.class),
/**
* Returns a tree item at the given index, relative to its TREE_ITEM_PARENT.
* <ul>
* <li>Used by: TreeItem and TreeTableRow </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters:
* <ul>
* <li> {@link Integer} the index </li>
* </ul>
* </li>
* </ul>
*/
TREE_ITEM_AT_INDEX(Node.class),
/**
* Returns the tree item count for the node, relative to its TREE_ITEM_PARENT.
* <ul>
* <li>Used by: TreeItem and TreeTableRow </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Integer} </li>
* <li>Parameters: </li>
* </ul>
*/
TREE_ITEM_COUNT(Integer.class),
/**
* Returns the parent item for the item, or null if the item is the root.
* <ul>
* <li>Used by: TreeItem and TreeTableRow </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters: </li>
* </ul>
*/
TREE_ITEM_PARENT(Node.class),
/**
* Returns the value for the node.
* <ul>
* <li>Used by: Slider, ScrollBar, Thumb, and others </li>
* <li>Needs notify: yes </li>
* <li>Return Type: {@link Double} </li>
* <li>Parameters: </li>
* </ul>
*/
VALUE(Double.class),
/**
* Returns the value as string for the node.
* <ul>
* <li>Used by: Spinner </li>
* <li>Needs notify: yes </li>
* <li>Return Type: {@link String} </li>
* <li>Parameters: </li>
* </ul>
*
* @since 22
*/
VALUE_STRING(String.class),
/**
* Returns the vertical scroll bar for the node.
* <ul>
* <li>Used by: ListView, ScrollPane, and others </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Node} </li>
* <li>Parameters: </li>
* </ul>
*/
VERTICAL_SCROLLBAR(Node.class),
/**
* Returns true if node is visible, otherwise false.
* <ul>
* <li>Used by: Node and ContextMenu </li>
* <li>Needs notify: yes </li>
* <li>Return Type: {@link Boolean} </li>
* <li>Parameters: </li>
* </ul>
*/
VISIBLE(Boolean.class),
/**
* Returns true if the node has been visited, otherwise false.
* <ul>
* <li>Used by: Hyperlink </li>
* <li>Needs notify: no </li>
* <li>Return Type: {@link Boolean} </li>
* <li>Parameters: </li>
* </ul>
*/
VISITED(Boolean.class),
;
private Class<?> returnClass;
AccessibleAttribute(Class<?> returnClass) {
this.returnClass = returnClass;
}
/**
* Gets the type of {@code AccessibleAttribute}.
* @return the type of {@code AccessibleAttribute}
*/
public Class<?> getReturnType() {
return returnClass;
}
/**
* This enum describes the values for {@link AccessibleAttribute#TOGGLE_STATE TOGGLE_STATE} attribute.
*
* @since 21
*/
public enum ToggleState {
/**
* Indicates that the toggle control is not selected.
*/
UNCHECKED,
/**
* Indicates that the toggle control is selected.
*/
CHECKED,
/**
* Indicates that the toggle state of the control cannot be determined.
*/
INDETERMINATE
}
}