1 /*
   2  * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.scene;
  27 
  28 import java.time.LocalDate;
  29 
  30 import javafx.collections.ObservableList;
  31 import javafx.geometry.Bounds;
  32 import javafx.geometry.Orientation;
  33 import javafx.scene.input.KeyCombination;
  34 import javafx.scene.text.Font;
  35 
  36 /**
  37  * This enum describes the attributes that an assistive technology
  38  * such as a screen reader can request from the scene graph.
  39  *
  40  * The {@link AccessibleRole} dictates the set of attributes that
  41  * the screen reader will request for a particular control.  For
  42  * example, a slider is expected to return a double that represents
  43  * the current value.
  44  * <p>
  45  * Attributes may have any number of parameters, depending on the particular attribute.</p>
  46  * <p>
  47  * When the value of an attribute is changed by a node, it must notify the assistive technology
  48  * using {@link Node#notifyAccessibleAttributeChanged(AccessibleAttribute)}.  This will allow
  49  * the screen reader to inform the user that a value has changed.  The most common form of
  50  * notification is focus change.
  51  * </p>
  52  *
  53  * @see Node#queryAccessibleAttribute(AccessibleAttribute, Object...)
  54  * @see Node#notifyAccessibleAttributeChanged(AccessibleAttribute)
  55  * @see AccessibleRole
  56  * @see AccessibleAttribute#ROLE
  57  *
  58  * @since JavaFX 8u40
  59  */
  60 public enum AccessibleAttribute {
  61 
  62     /**
  63      * Returns the accelerator for the node.
  64      * <ul>
  65      * <li>Used by: Menu, MenuItem, RadioMenuItem, and others </li>
  66      * <li>Needs notify: no </li>
  67      * <li>Return Type: {@link KeyCombination} </li>
  68      * <li>Parameters: </li>
  69      * </ul>
  70      */
  71     ACCELERATOR(KeyCombination.class),
  72 
  73     /**
  74      * Returns the bounds for the node.
  75      * <ul>
  76      * <li>Used by: Node </li>
  77      * <li>Needs notify: no </li>
  78      * <li>Return Type: {@link Bounds} </li>
  79      * <li>Parameters: </li>
  80      * </ul>
  81      */
  82     BOUNDS(Bounds.class),
  83 
  84     /**
  85      * Returns the array of bounding rectangles for the given character range.
  86      * <ul>
  87      * <li>Used by: TextField and TextArea </li>
  88      * <li>Needs notify: no </li>
  89      * <li>Return Type: {@link Bounds}[] </li>
  90      * <li>Parameters:
  91      *   <ul>
  92      *    <li>{@link Integer} the start offset </li>
  93      *    <li>{@link Integer} the end offset </li>
  94      *   </ul>
  95      * </li>
  96      * </ul>
  97      */
  98     BOUNDS_FOR_RANGE(Bounds[].class),
  99 
 100     /**
 101      * Returns the caret offset for the node.
 102      * <ul>
 103      * <li>Used by: TextField and TextArea </li>
 104      * <li>Needs notify: no </li>
 105      * <li>Return Type: {@link Integer} </li>
 106      * <li>Parameters: </li>
 107      * </ul>
 108      */
 109     CARET_OFFSET(Integer.class),
 110 
 111     /**
 112      * Returns the children for the node.
 113      * <ul>
 114      * <li>Used by: Parent </li>
 115      * <li>Needs notify: no </li>
 116      * <li>Return Type: {@link javafx.collections.ObservableList}&lt;{@link Node}&gt; </li>
 117      * <li>Parameters: </li>
 118      * </ul>
 119      */
 120     CHILDREN(ObservableList.class),
 121 
 122     /**
 123      * Returns the column at the given index.
 124      * <ul>
 125      * <li>Used by: TableView and TreeTableView </li>
 126      * <li>Needs notify: no </li>
 127      * <li>Return Type: {@link Node} </li>
 128      * <li>Parameters:
 129      *   <ul>
 130      *    <li>{@link Integer} the index </li>
 131      *   </ul>
 132      * </li>
 133      * </ul>
 134      */
 135     COLUMN_AT_INDEX(Node.class),
 136 
 137     /**
 138      * Returns the cell at the given row and column indices.
 139      * <ul>
 140      * <li>Used by: TableView and TreeTableView </li>
 141      * <li>Needs notify: no </li>
 142      * <li>Return Type: {@link Node} </li>
 143      * <li>Parameters:
 144      *   <ul>
 145      *    <li>{@link Integer} the row index </li>
 146      *    <li>{@link Integer} the column index </li>
 147      *   </ul>
 148      * </li>
 149      * </ul>
 150      */
 151     CELL_AT_ROW_COLUMN(Node.class),
 152 
 153     /**
 154      * Returns the column count for the node.
 155      * <ul>
 156      * <li>Used by: TableView and TreeTableView </li>
 157      * <li>Needs notify: no </li>
 158      * <li>Return Type: {@link Integer} </li>
 159      * <li>Parameters: </li>
 160      * </ul>
 161      */
 162     COLUMN_COUNT(Integer.class),
 163 
 164     /**
 165      * Returns the column index for the node.
 166      * <ul>
 167      * <li>Used by: TableCell and TreeTableCell </li>
 168      * <li>Needs notify: no </li>
 169      * <li>Return Type: {@link Integer} </li>
 170      * <li>Parameters: </li>
 171      * </ul>
 172      */
 173     COLUMN_INDEX(Integer.class),
 174 
 175     /**
 176      * Returns the contents of the node.
 177      * <ul>
 178      * <li>Used by: ScrollPane </li>
 179      * <li>Needs notify: no </li>
 180      * <li>Return Type: {@link Node} </li>
 181      * <li>Parameters: </li>
 182      * </ul>
 183      */
 184     CONTENTS(Node.class),
 185 
 186     /**
 187      * Returns true if the node is disabled, otherwise false.
 188      * <ul>
 189      * <li>Used by: Node </li>
 190      * <li>Needs notify: no </li>
 191      * <li>Return Type: {@link Boolean} </li>
 192      * <li>Parameters: </li>
 193      * </ul>
 194      */
 195     DISABLED(Boolean.class),
 196 
 197     /**
 198      * Returns the depth of a row in the disclosure hierarchy.
 199      * <ul>
 200      * <li>Used by: TreeItem and TreeTableRow </li>
 201      * <li>Needs notify: no </li>
 202      * <li>Return Type: {@link Integer} </li>
 203      * <li>Parameters: </li>
 204      * </ul>
 205      */
 206     DISCLOSURE_LEVEL(Integer.class),
 207 
 208     /**
 209      * Returns the local date for the node.
 210      * <ul>
 211      * <li>Used by: DatePicker </li>
 212      * <li>Needs notify: no </li>
 213      * <li>Return Type: {@link LocalDate} </li>
 214      * <li>Parameters: </li>
 215      * </ul>
 216      */
 217     DATE(LocalDate.class),
 218 
 219     /**
 220      * Returns true if the node is editable, otherwise false.
 221      * <ul>
 222      * <li>Used by: TextField, ComboBox, and others </li>
 223      * <li>Needs notify: no </li>
 224      * <li>Return Type: {@link Boolean} </li>
 225      * <li>Parameters: </li>
 226      * </ul>
 227      */
 228     EDITABLE(Boolean.class),
 229 
 230     /**
 231      * Returns true if the node is expanded, otherwise false.
 232      * <ul>
 233      * <li>Used by: TreeItem, TitledPane, and others </li>
 234      * <li>Needs notify: yes </li>
 235      * <li>Return Type: {@link Boolean} </li>
 236      * <li>Parameters: </li>
 237      * </ul>
 238      */
 239     EXPANDED(Boolean.class),
 240 
 241     /**
 242      * Returns the focus item.
 243      * <p>
 244      * Used for controls such as TabPane, TableView, ListView
 245      * where the assistive technology focus is different from the
 246      * normal focus node.  For example, a table control will have focus,
 247      * while a cell inside the table might have the screen reader focus.
 248      * </p>
 249      * <ul>
 250      * <li>Used by: ListView, TabPane, and others </li>
 251      * <li>Needs notify: yes </li>
 252      * <li>Return Type: {@link Node} </li>
 253      * <li>Parameters: </li>
 254      * </ul>
 255      */
 256     FOCUS_ITEM(Node.class),
 257 
 258     /**
 259      * Returns the focus node.
 260      * Type: Node
 261      * <p>
 262      * When this attribute is requested from the Scene, the default implementation
 263      * returns {@link Scene#focusOwnerProperty()}.
 264      * </p>
 265      * <ul>
 266      * <li>Used by: Scene </li>
 267      * <li>Needs notify: yes </li>
 268      * <li>Return Type: {@link Node} </li>
 269      * <li>Parameters: </li>
 270      * </ul>
 271      */
 272     FOCUS_NODE(Node.class),
 273 
 274     /**
 275      * Returns true if the node is focused, otherwise false.
 276      * <ul>
 277      * <li>Used by: Node </li>
 278      * <li>Needs notify: no </li>
 279      * <li>Return Type: {@link Boolean} </li>
 280      * <li>Parameters: </li>
 281      * </ul>
 282      */
 283     FOCUSED(Boolean.class),
 284 
 285     /**
 286      * Returns the font for the node.
 287      * <ul>
 288      * <li>Used by: TextField and TextArea </li>
 289      * <li>Needs notify: no </li>
 290      * <li>Return Type: {@link Font} </li>
 291      * <li>Parameters: </li>
 292      * </ul>
 293      */
 294     FONT(Font.class),
 295 
 296     /**
 297      * Returns the header for the node.
 298      * <ul>
 299      * <li>Used by: TableView and TreeTableView </li>
 300      * <li>Needs notify: no </li>
 301      * <li>Return Type: {@link Node} </li>
 302      * <li>Parameters: </li>
 303      * </ul>
 304      */
 305     HEADER(Node.class),
 306 
 307     /**
 308      * Returns the help text for the node.
 309      * <ul>
 310      * <li>Used by: Node </li>
 311      * <li>Needs notify: no </li>
 312      * <li>Return Type: {@link String} </li>
 313      * <li>Parameters: </li>
 314      * </ul>
 315      */
 316     HELP(String.class),
 317 
 318     /**
 319      * Returns the horizontal scroll bar for the node.
 320      * <ul>
 321      * <li>Used by: ListView, ScrollPane, and others </li>
 322      * <li>Needs notify: no </li>
 323      * <li>Return Type: {@link Node} </li>
 324      * <li>Parameters: </li>
 325      * </ul>
 326      */
 327     HORIZONTAL_SCROLLBAR(Node.class),
 328 
 329     /**
 330      * Returns true of the node is indeterminaite, otherwise false.
 331      * <ul>
 332      * <li>Used by: CheckBox and ProgressIndicator </li>
 333      * <li>Needs notify: yes </li>
 334      * <li>Return Type: {@link Boolean} </li>
 335      * <li>Parameters: </li>
 336      * </ul>
 337      */
 338     INDETERMINATE(Boolean.class),
 339 
 340     /**
 341      * Returns the item at the given index.
 342      * <ul>
 343      * <li>Used by: TabPane, ListView, and others </li>
 344      * <li>Needs notify: no </li>
 345      * <li>Return Type: {@link Node} </li>
 346      * <li>Parameters:
 347      *   <ul>
 348      *   <li> {@link Integer} the index </li>
 349      *   </ul>
 350      * </li>
 351      * </ul>
 352      */
 353     ITEM_AT_INDEX(Node.class),
 354 
 355     /**
 356      * Returns the item count for the node.
 357      * <ul>
 358      * <li>Used by: TabPane, ListView, and others </li>
 359      * <li>Needs notify: no </li>
 360      * <li>Return Type: {@link Integer} </li>
 361      * <li>Parameters: </li>
 362      * </ul>
 363      */
 364     ITEM_COUNT(Integer.class),
 365 
 366     /**
 367      * Returns the index for the node.
 368      * <ul>
 369      * <li>Used by: ListItem, TableRow, and others </li>
 370      * <li>Needs notify: no </li>
 371      * <li>Return Type: {@link Integer} </li>
 372      * <li>Parameters: </li>
 373      * </ul>
 374      */
 375     INDEX(Integer.class),
 376 
 377     /**
 378      * Returns the node that is the label for this node.
 379      * <p>When {@link javafx.scene.control.Label#labelForProperty() labelFor} is set,
 380      * the default implementation of {@code LABELED_BY} uses this
 381      * relationship to return the appropriate node to the screen
 382      * reader.</p>
 383      * <ul>
 384      * <li>Used by: Node </li>
 385      * <li>Needs notify: no </li>
 386      * <li>Return Type: {@link Node} </li>
 387      * <li>Parameters: </li>
 388      * </ul>
 389      */
 390     LABELED_BY(Node.class),
 391 
 392     /**
 393      * Returns true if the node is a leaf element, otherwise false.
 394      * <ul>
 395      * <li>Used by: TreeItem and TreeTableRow </li>
 396      * <li>Needs notify: no </li>
 397      * <li>Return Type: {@link Boolean} </li>
 398      * <li>Parameters: </li>
 399      * </ul>
 400      */
 401     LEAF(Boolean.class),
 402 
 403     /**
 404      * Returns the line end offset of the given line index.
 405      * <ul>
 406      * <li>Used by: TextArea </li>
 407      * <li>Needs notify: no </li>
 408      * <li>Return Type: {@link Integer} </li>
 409      * <li>Parameters:
 410      *   <ul>
 411      *   <li> {@link Integer} the line index </li>
 412      *   </ul>
 413      * </li>
 414      * </ul>
 415      */
 416     LINE_END(Integer.class),
 417 
 418     /**
 419      * Returns the line index of the given character offset.
 420      * <ul>
 421      * <li>Used by: TextArea </li>
 422      * <li>Needs notify: no </li>
 423      * <li>Return Type: {@link Integer} </li>
 424      * <li>Parameters:
 425      *   <ul>
 426      *   <li> {@link Integer} the character offset </li>
 427      *   </ul>
 428      * </li>
 429      * </ul>
 430      */
 431     LINE_FOR_OFFSET(Integer.class),
 432 
 433     /**
 434      * Returns the line start offset of the given line index.
 435      * <ul>
 436      * <li>Used by: TextArea </li>
 437      * <li>Needs notify: no </li>
 438      * <li>Return Type: {@link Integer} </li>
 439      * <li>Parameters:
 440      *   <ul>
 441      *   <li> {@link Integer} the line index </li>
 442      *   </ul>
 443      * </li>
 444      * </ul>
 445      */
 446     LINE_START(Integer.class),
 447 
 448     /**
 449      * Returns the minimum value for the node.
 450      * <ul>
 451      * <li>Used by: Slider, ScrollBar, and others </li>
 452      * <li>Needs notify: no </li>
 453      * <li>Return Type: {@link Double} </li>
 454      * <li>Parameters: </li>
 455      * </ul>
 456      */
 457     MIN_VALUE(Double.class),
 458 
 459     /**
 460      * Returns the maximum value for the node.
 461      * <ul>
 462      * <li>Used by: Slider, ScrollBar, and others </li>
 463      * <li>Needs notify: no </li>
 464      * <li>Return Type: {@link Double} </li>
 465      * <li>Parameters: </li>
 466      * </ul>
 467      */
 468     MAX_VALUE(Double.class),
 469 
 470     /**
 471      * Returns the mnemonic for the node.
 472      * <ul>
 473      * <li>Used by: Menu, MenuItem, CheckMenuItem, and others </li>
 474      * <li>Needs notify: no </li>
 475      * <li>Return Type: {@link String} </li>
 476      * <li>Parameters: </li>
 477      * </ul>
 478      */
 479     MNEMONIC(String.class),
 480 
 481     /**
 482      * Returns true if the node allows for multiple selection, otherwise false.
 483      * <ul>
 484      * <li>Used by: ListView, TableView, and others </li>
 485      * <li>Needs notify: no </li>
 486      * <li>Return Type: {@link Boolean} </li>
 487      * <li>Parameters: </li>
 488      * </ul>
 489      */
 490     MULTIPLE_SELECTION(Boolean.class),
 491 
 492     /**
 493      * Returns the node at the given location.
 494      * <ul>
 495      * <li>Used by: Scene </li>
 496      * <li>Needs notify: no </li>
 497      * <li>Return Type: {@link Node} </li>
 498      * <li>Parameters:
 499      *   <ul>
 500      *   <li> {@link javafx.geometry.Point2D} the point location </li>
 501      *   </ul>
 502      * </li>
 503      * </ul>
 504      */
 505     NODE_AT_POINT(Node.class),
 506 
 507     /**
 508      * Returns the character offset at the given location.
 509      * <ul>
 510      * <li>Used by: TextField and TextArea </li>
 511      * <li>Needs notify: no </li>
 512      * <li>Return Type: {@link Integer} </li>
 513      * <li>Parameters:
 514      *   <ul>
 515      *   <li> {@link javafx.geometry.Point2D} the point location </li>
 516      *   </ul>
 517      * </li>
 518      * </ul>
 519      */
 520     OFFSET_AT_POINT(Integer.class),
 521 
 522     /**
 523      * Returns the orientation of the node.
 524      * <ul>
 525      * <li>Used by: ScrolBar and Slider </li>
 526      * <li>Needs notify: no </li>
 527      * <li>Return Type: {@link javafx.geometry.Orientation} </li>
 528      * <li>Parameters: </li>
 529      * </ul>
 530      */
 531     ORIENTATION(Orientation.class),
 532 
 533     /**
 534      * Return the overflow button for the node.
 535      * <ul>
 536      * <li>Used by: Toolbar </li>
 537      * <li>Needs notify: no </li>
 538      * <li>Return Type: {@link Node} </li>
 539      * <li>Parameters: </li>
 540      * </ul>
 541      */
 542     OVERFLOW_BUTTON(Node.class),
 543 
 544     /**
 545      * Returns the parent for the node.
 546      * <ul>
 547      * <li>Used by: Node </li>
 548      * <li>Needs notify: yes </li>
 549      * <li>Return Type: {@link Parent} </li>
 550      * <li>Parameters: </li>
 551      * </ul>
 552      */
 553     PARENT(Parent.class),
 554 
 555     /**
 556      * Returns the parent menu for the node.
 557      * <ul>
 558      * <li>Used by: ContextMenu </li>
 559      * <li>Needs notify: no </li>
 560      * <li>Return Type: {@link Node} </li>
 561      * <li>Parameters: </li>
 562      * </ul>
 563      */
 564     PARENT_MENU(Node.class),
 565 
 566     /**
 567      * Returns the role for the node.
 568      * <ul>
 569      * <li>Used by: Node </li>
 570      * <li>Needs notify: no </li>
 571      * <li>Return Type: {@link AccessibleRole} </li>
 572      * <li>Parameters: </li>
 573      * </ul>
 574      */
 575     ROLE(AccessibleRole.class),
 576 
 577     /**
 578      * Returns the role description for the node.
 579      * <ul>
 580      * <li>Used by: Node </li>
 581      * <li>Needs notify: no </li>
 582      * <li>Return Type: {@link String} </li>
 583      * <li>Parameters: </li>
 584      * </ul>
 585      */
 586     ROLE_DESCRIPTION(String.class),
 587 
 588     /**
 589      * Returns the row at the given index.
 590      * <ul>
 591      * <li>Used by: TableView, TreeView, and TreeTableView </li>
 592      * <li>Needs notify: no </li>
 593      * <li>Return Type: {@link Node} </li>
 594      * <li>Parameters:
 595      *   <ul>
 596      *   <li> {@link Integer} the row index </li>
 597      *   </ul>
 598      * </li>
 599      * </ul>
 600      */
 601     ROW_AT_INDEX(Node.class),
 602 
 603     /**
 604      * Returns the row count for the node.
 605      * <ul>
 606      * <li>Used by: TableView, TreeView, and TreeTableView </li>
 607      * <li>Needs notify: no </li>
 608      * <li>Return Type: {@link Integer} </li>
 609      * <li>Parameters: </li>
 610      * </ul>
 611      */
 612     ROW_COUNT(Integer.class),
 613 
 614     /**
 615      * Returns the row index of the node.
 616      * <ul>
 617      * <li>Used by: TableCell, TreeItem, and TreeTableCell </li>
 618      * <li>Needs notify: no </li>
 619      * <li>Return Type: {@link Integer} </li>
 620      * <li>Parameters: </li>
 621      * </ul>
 622      */
 623     ROW_INDEX(Integer.class),
 624 
 625     /**
 626      * Returns the scene for the node.
 627      * <ul>
 628      * <li>Used by: Node </li>
 629      * <li>Needs notify: no </li>
 630      * <li>Return Type: {@link Scene} </li>
 631      * <li>Parameters: </li>
 632      * </ul>
 633      */
 634     SCENE(Scene.class),
 635 
 636     /**
 637      * Returns true if the node is selected, otherwise false.
 638      * <ul>
 639      * <li>Used by: CheckBox, TreeItem, and others </li>
 640      * <li>Needs notify: no </li>
 641      * <li>Return Type: {@link Boolean} </li>
 642      * <li>Parameters: </li>
 643      * </ul>
 644      */
 645     SELECTED(Boolean.class),
 646 
 647     /**
 648      * Returns the list of selected items for the node.
 649      * <ul>
 650      * <li>Used by: ListView, TableView, and others </li>
 651      * <li>Needs notify: no </li>
 652      * <li>Return Type: {@link javafx.collections.ObservableList}&lt;{@link Node}&gt; </li>
 653      * <li>Parameters: </li>
 654      * </ul>
 655      */
 656     SELECTED_ITEMS(ObservableList.class),
 657 
 658     /**
 659      * Returns the text selection end offset for the node.
 660      * <ul>
 661      * <li>Used by: TextField and TextArea </li>
 662      * <li>Needs notify: yes </li>
 663      * <li>Return Type: {@link Integer} </li>
 664      * <li>Parameters: </li>
 665      * </ul>
 666      */
 667     SELECTION_END(Integer.class),
 668 
 669     /**
 670      * Returns the text selection start offset for the node.
 671      * <ul>
 672      * <li>Used by: TextField and TextArea </li>
 673      * <li>Needs notify: yes </li>
 674      * <li>Return Type: {@link Integer} </li>
 675      * <li>Parameters: </li>
 676      * </ul>
 677      */
 678     SELECTION_START(Integer.class),
 679 
 680     /**
 681      * Returns the sub menu for the node.
 682      * <ul>
 683      * <li>Used by: Menu </li>
 684      * <li>Needs notify: no </li>
 685      * <li>Return Type: {@link Node} </li>
 686      * <li>Parameters: </li>
 687      * </ul>
 688      */
 689     SUBMENU(Node.class),
 690 
 691     /**
 692      * Returns the text for the node.
 693      * E.g.
 694      * <ul>
 695      * <li>ComboBox returns a string representation of the current selected item.
 696      * <li>TextField returns the contents of the text field.
 697      * </ul>
 698      *
 699      * <ul>
 700      * <li>Used by: Node </li>
 701      * <li>Needs notify: yes </li>
 702      * <li>Return Type: {@link String} </li>
 703      * <li>Parameters: </li>
 704      * </ul>
 705      */
 706     TEXT(String.class),
 707 
 708     /**
 709      * Returns a tree item at the given index, relative to its TREE_ITEM_PARENT.
 710      * <ul>
 711      * <li>Used by: TreeItem and TreeTableRow </li>
 712      * <li>Needs notify: no </li>
 713      * <li>Return Type: {@link Node} </li>
 714      * <li>Parameters:
 715      *   <ul>
 716      *   <li> {@link Integer} the index </li>
 717      *   </ul>
 718      * </li>
 719      * </ul>
 720      */
 721     TREE_ITEM_AT_INDEX(Node.class),
 722 
 723     /**
 724      * Returns the tree item count for the node, relative to its TREE_ITEM_PARENT.
 725      * <ul>
 726      * <li>Used by: TreeItem and TreeTableRow </li>
 727      * <li>Needs notify: no </li>
 728      * <li>Return Type: {@link Integer} </li>
 729      * <li>Parameters: </li>
 730      * </ul>
 731      */
 732     TREE_ITEM_COUNT(Integer.class),
 733 
 734     /**
 735      * Returns the parent item for the item, or null if the item is the root.
 736      * <ul>
 737      * <li>Used by: TreeItem and TreeTableRow </li>
 738      * <li>Needs notify: no </li>
 739      * <li>Return Type: {@link Node} </li>
 740      * <li>Parameters: </li>
 741      * </ul>
 742      */
 743     TREE_ITEM_PARENT(Node.class),
 744 
 745     /**
 746      * Returns the value for the node.
 747      * <ul>
 748      * <li>Used by: Slider, ScrollBar, Thumb, and others </li>
 749      * <li>Needs notify: yes </li>
 750      * <li>Return Type: {@link Double} </li>
 751      * <li>Parameters: </li>
 752      * </ul>
 753      */
 754     VALUE(Double.class),
 755 
 756     /**
 757      * Returns the vertical scroll bar for the node.
 758      * <ul>
 759      * <li>Used by: ListView, ScrollPane, and others </li>
 760      * <li>Needs notify: no </li>
 761      * <li>Return Type: {@link Node} </li>
 762      * <li>Parameters: </li>
 763      * </ul>
 764      */
 765     VERTICAL_SCROLLBAR(Node.class),
 766 
 767     /**
 768      * Returns true if node is visible, otherwise false.
 769      * <ul>
 770      * <li>Used by: Node and ContextMenu </li>
 771      * <li>Needs notify: yes </li>
 772      * <li>Return Type: {@link Boolean} </li>
 773      * <li>Parameters: </li>
 774      * </ul>
 775      */
 776     VISIBLE(Boolean.class),
 777 
 778     /**
 779      * Returns true if the node has been visited, otherwise false.
 780      * <ul>
 781      * <li>Used by: Hyperlink </li>
 782      * <li>Needs notify: no </li>
 783      * <li>Return Type: {@link Boolean} </li>
 784      * <li>Parameters: </li>
 785      * </ul>
 786      */
 787     VISITED(Boolean.class),
 788     ;
 789 
 790     private Class<?> returnClass;
 791 
 792     AccessibleAttribute(Class<?> returnClass) {
 793         this.returnClass = returnClass;
 794     }
 795 
 796     public Class<?> getReturnType() {
 797         return returnClass;
 798     }
 799 }