1 /*
   2  * Copyright (c) 1997, 2013, 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 javax.accessibility;
  27 
  28 import java.util.Locale;
  29 import java.beans.PropertyChangeListener;
  30 import java.beans.PropertyChangeSupport;
  31 import java.beans.PropertyChangeEvent;
  32 import java.awt.IllegalComponentStateException;
  33 
  34 /**
  35  * AccessibleContext represents the minimum information all accessible objects
  36  * return.  This information includes the accessible name, description, role,
  37  * and state of the object, as well as information about its parent and
  38  * children.  AccessibleContext also contains methods for
  39  * obtaining more specific accessibility information about a component.
  40  * If the component supports them, these methods will return an object that
  41  * implements one or more of the following interfaces:
  42  * <ul>
  43  * <li>{@link AccessibleAction} - the object can perform one or more actions.
  44  * This interface provides the standard mechanism for an assistive
  45  * technology to determine what those actions are and tell the object
  46  * to perform them.  Any object that can be manipulated should
  47  * support this interface.
  48  * <li>{@link AccessibleComponent} - the object has a graphical representation.
  49  * This interface provides the standard mechanism for an assistive
  50  * technology to determine and set the graphical representation of the
  51  * object.  Any object that is rendered on the screen should support
  52  * this interface.
  53  * <li>{@link  AccessibleSelection} - the object allows its children to be
  54  * selected.  This interface provides the standard mechanism for an
  55  * assistive technology to determine the currently selected children of the object
  56  * as well as modify its selection set.  Any object that has children
  57  * that can be selected should support this interface.
  58  * <li>{@link AccessibleText} - the object presents editable textual information
  59  * on the display.  This interface provides the standard mechanism for
  60  * an assistive technology to access that text via its content, attributes,
  61  * and spatial location.  Any object that contains editable text should
  62  * support this interface.
  63  * <li>{@link AccessibleValue} - the object supports a numerical value.  This
  64  * interface provides the standard mechanism for an assistive technology
  65  * to determine and set the current value of the object, as well as obtain its
  66  * minimum and maximum values.  Any object that supports a numerical value
  67  * should support this interface.</ul>
  68  *
  69  *
  70  * @beaninfo
  71  *   attribute: isContainer false
  72  * description: Minimal information that all accessible objects return
  73  *
  74 
  75  * @author      Peter Korn
  76  * @author      Hans Muller
  77  * @author      Willie Walker
  78  * @author      Lynn Monsanto
  79  */
  80 public abstract class AccessibleContext {
  81 
  82    /**
  83     * Constant used to determine when the accessibleName property has
  84     * changed.  The old value in the PropertyChangeEvent will be the old
  85     * accessibleName and the new value will be the new accessibleName.
  86     *
  87     * @see #getAccessibleName
  88     * @see #addPropertyChangeListener
  89     */
  90    public static final String ACCESSIBLE_NAME_PROPERTY = "AccessibleName";
  91 
  92    /**
  93     * Constant used to determine when the accessibleDescription property has
  94     * changed.  The old value in the PropertyChangeEvent will be the
  95     * old accessibleDescription and the new value will be the new
  96     * accessibleDescription.
  97     *
  98     * @see #getAccessibleDescription
  99     * @see #addPropertyChangeListener
 100     */
 101    public static final String ACCESSIBLE_DESCRIPTION_PROPERTY = "AccessibleDescription";
 102 
 103    /**
 104     * Constant used to determine when the accessibleStateSet property has
 105     * changed.  The old value will be the old AccessibleState and the new
 106     * value will be the new AccessibleState in the accessibleStateSet.
 107     * For example, if a component that supports the vertical and horizontal
 108     * states changes its orientation from vertical to horizontal, the old
 109     * value will be AccessibleState.VERTICAL and the new value will be
 110     * AccessibleState.HORIZONTAL.  Please note that either value can also
 111     * be null.  For example, when a component changes from being enabled
 112     * to disabled, the old value will be AccessibleState.ENABLED
 113     * and the new value will be null.
 114     *
 115     * @see #getAccessibleStateSet
 116     * @see AccessibleState
 117     * @see AccessibleStateSet
 118     * @see #addPropertyChangeListener
 119     */
 120    public static final String ACCESSIBLE_STATE_PROPERTY = "AccessibleState";
 121 
 122    /**
 123     * Constant used to determine when the accessibleValue property has
 124     * changed.  The old value in the PropertyChangeEvent will be a Number
 125     * representing the old value and the new value will be a Number
 126     * representing the new value
 127     *
 128     * @see #getAccessibleValue
 129     * @see #addPropertyChangeListener
 130     */
 131    public static final String ACCESSIBLE_VALUE_PROPERTY = "AccessibleValue";
 132 
 133    /**
 134     * Constant used to determine when the accessibleSelection has changed.
 135     * The old and new values in the PropertyChangeEvent are currently
 136     * reserved for future use.
 137     *
 138     * @see #getAccessibleSelection
 139     * @see #addPropertyChangeListener
 140     */
 141    public static final String ACCESSIBLE_SELECTION_PROPERTY = "AccessibleSelection";
 142 
 143    /**
 144     * Constant used to determine when the accessibleText caret has changed.
 145     * The old value in the PropertyChangeEvent will be an
 146     * integer representing the old caret position, and the new value will
 147     * be an integer representing the new/current caret position.
 148     *
 149     * @see #addPropertyChangeListener
 150     */
 151    public static final String ACCESSIBLE_CARET_PROPERTY = "AccessibleCaret";
 152 
 153    /**
 154     * Constant used to determine when the visual appearance of the object
 155     * has changed.  The old and new values in the PropertyChangeEvent are
 156     * currently reserved for future use.
 157     *
 158     * @see #addPropertyChangeListener
 159     */
 160    public static final String ACCESSIBLE_VISIBLE_DATA_PROPERTY = "AccessibleVisibleData";
 161 
 162    /**
 163     * Constant used to determine when Accessible children are added/removed
 164     * from the object.  If an Accessible child is being added, the old
 165     * value will be null and the new value will be the Accessible child.  If an
 166     * Accessible child is being removed, the old value will be the Accessible
 167     * child, and the new value will be null.
 168     *
 169     * @see #addPropertyChangeListener
 170     */
 171    public static final String ACCESSIBLE_CHILD_PROPERTY = "AccessibleChild";
 172 
 173    /**
 174     * Constant used to determine when the active descendant of a component
 175     * has changed.  The active descendant is used for objects such as
 176     * list, tree, and table, which may have transient children.  When the
 177     * active descendant has changed, the old value of the property change
 178     * event will be the Accessible representing the previous active child, and
 179     * the new value will be the Accessible representing the current active
 180     * child.
 181     *
 182     * @see #addPropertyChangeListener
 183     */
 184    public static final String ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY = "AccessibleActiveDescendant";
 185 
 186     /**
 187      * Constant used to indicate that the table caption has changed
 188      * The old value in the PropertyChangeEvent will be an Accessible
 189      * representing the previous table caption and the new value will
 190      * be an Accessible representing the new table caption.
 191      * @see Accessible
 192      * @see AccessibleTable
 193      */
 194     public static final String ACCESSIBLE_TABLE_CAPTION_CHANGED =
 195         "accessibleTableCaptionChanged";
 196 
 197     /**
 198      * Constant used to indicate that the table summary has changed
 199      * The old value in the PropertyChangeEvent will be an Accessible
 200      * representing the previous table summary and the new value will
 201      * be an Accessible representing the new table summary.
 202      * @see Accessible
 203      * @see AccessibleTable
 204      */
 205     public static final String ACCESSIBLE_TABLE_SUMMARY_CHANGED =
 206         "accessibleTableSummaryChanged";
 207 
 208     /**
 209      * Constant used to indicate that table data has changed.
 210      * The old value in the PropertyChangeEvent will be null and the
 211      * new value will be an AccessibleTableModelChange representing
 212      * the table change.
 213      * @see AccessibleTable
 214      * @see AccessibleTableModelChange
 215      */
 216     public static final String ACCESSIBLE_TABLE_MODEL_CHANGED =
 217         "accessibleTableModelChanged";
 218 
 219     /**
 220      * Constant used to indicate that the row header has changed
 221      * The old value in the PropertyChangeEvent will be null and the
 222      * new value will be an AccessibleTableModelChange representing
 223      * the header change.
 224      * @see AccessibleTable
 225      * @see AccessibleTableModelChange
 226      */
 227     public static final String ACCESSIBLE_TABLE_ROW_HEADER_CHANGED =
 228         "accessibleTableRowHeaderChanged";
 229 
 230     /**
 231      * Constant used to indicate that the row description has changed
 232      * The old value in the PropertyChangeEvent will be null and the
 233      * new value will be an Integer representing the row index.
 234      * @see AccessibleTable
 235      */
 236     public static final String ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED =
 237         "accessibleTableRowDescriptionChanged";
 238 
 239     /**
 240      * Constant used to indicate that the column header has changed
 241      * The old value in the PropertyChangeEvent will be null and the
 242      * new value will be an AccessibleTableModelChange representing
 243      * the header change.
 244      * @see AccessibleTable
 245      * @see AccessibleTableModelChange
 246      */
 247     public static final String ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED =
 248         "accessibleTableColumnHeaderChanged";
 249 
 250     /**
 251      * Constant used to indicate that the column description has changed
 252      * The old value in the PropertyChangeEvent will be null and the
 253      * new value will be an Integer representing the column index.
 254      * @see AccessibleTable
 255      */
 256     public static final String ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED =
 257         "accessibleTableColumnDescriptionChanged";
 258 
 259     /**
 260      * Constant used to indicate that the supported set of actions
 261      * has changed.  The old value in the PropertyChangeEvent will
 262      * be an Integer representing the old number of actions supported
 263      * and the new value will be an Integer representing the new
 264      * number of actions supported.
 265      * @see AccessibleAction
 266      */
 267     public static final String ACCESSIBLE_ACTION_PROPERTY =
 268         "accessibleActionProperty";
 269 
 270     /**
 271      * Constant used to indicate that a hypertext element has received focus.
 272      * The old value in the PropertyChangeEvent will be an Integer
 273      * representing the start index in the document of the previous element
 274      * that had focus and the new value will be an Integer representing
 275      * the start index in the document of the current element that has
 276      * focus.  A value of -1 indicates that an element does not or did
 277      * not have focus.
 278      * @see AccessibleHyperlink
 279      */
 280     public static final String ACCESSIBLE_HYPERTEXT_OFFSET =
 281         "AccessibleHypertextOffset";
 282 
 283     /**
 284      * PropertyChangeEvent which indicates that text has changed.
 285      * <br>
 286      * For text insertion, the oldValue is null and the newValue
 287      * is an AccessibleTextSequence specifying the text that was
 288      * inserted.
 289      * <br>
 290      * For text deletion, the oldValue is an AccessibleTextSequence
 291      * specifying the text that was deleted and the newValue is null.
 292      * <br>
 293      * For text replacement, the oldValue is an AccessibleTextSequence
 294      * specifying the old text and the newValue is an AccessibleTextSequence
 295      * specifying the new text.
 296      *
 297      * @see #getAccessibleText
 298      * @see #addPropertyChangeListener
 299      * @see AccessibleTextSequence
 300      */
 301     public static final String ACCESSIBLE_TEXT_PROPERTY
 302         = "AccessibleText";
 303 
 304     /**
 305      * PropertyChangeEvent which indicates that a significant change
 306      * has occurred to the children of a component like a tree or text.
 307      * This change notifies the event listener that it needs to
 308      * reacquire the state of the subcomponents. The oldValue is
 309      * null and the newValue is the component whose children have
 310      * become invalid.
 311      *
 312      * @see #getAccessibleText
 313      * @see #addPropertyChangeListener
 314      * @see AccessibleTextSequence
 315      *
 316      * @since 1.5
 317      */
 318     public static final String ACCESSIBLE_INVALIDATE_CHILDREN =
 319         "accessibleInvalidateChildren";
 320 
 321      /**
 322      * PropertyChangeEvent which indicates that text attributes have changed.
 323      * <br>
 324      * For attribute insertion, the oldValue is null and the newValue
 325      * is an AccessibleAttributeSequence specifying the attributes that were
 326      * inserted.
 327      * <br>
 328      * For attribute deletion, the oldValue is an AccessibleAttributeSequence
 329      * specifying the attributes that were deleted and the newValue is null.
 330      * <br>
 331      * For attribute replacement, the oldValue is an AccessibleAttributeSequence
 332      * specifying the old attributes and the newValue is an
 333      * AccessibleAttributeSequence specifying the new attributes.
 334      *
 335      * @see #getAccessibleText
 336      * @see #addPropertyChangeListener
 337      * @see AccessibleAttributeSequence
 338      *
 339      * @since 1.5
 340      */
 341     public static final String ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED =
 342         "accessibleTextAttributesChanged";
 343 
 344    /**
 345      * PropertyChangeEvent which indicates that a change has occurred
 346      * in a component's bounds.
 347      * The oldValue is the old component bounds and the newValue is
 348      * the new component bounds.
 349      *
 350      * @see #addPropertyChangeListener
 351      *
 352      * @since 1.5
 353      */
 354     public static final String ACCESSIBLE_COMPONENT_BOUNDS_CHANGED =
 355         "accessibleComponentBoundsChanged";
 356 
 357     /**
 358      * The accessible parent of this object.
 359      *
 360      * @see #getAccessibleParent
 361      * @see #setAccessibleParent
 362      */
 363     protected Accessible accessibleParent = null;
 364 
 365     /**
 366      * A localized String containing the name of the object.
 367      *
 368      * @see #getAccessibleName
 369      * @see #setAccessibleName
 370      */
 371     protected String accessibleName = null;
 372 
 373     /**
 374      * A localized String containing the description of the object.
 375      *
 376      * @see #getAccessibleDescription
 377      * @see #setAccessibleDescription
 378      */
 379     protected String accessibleDescription = null;
 380 
 381     /**
 382      * Used to handle the listener list for property change events.
 383      *
 384      * @see #addPropertyChangeListener
 385      * @see #removePropertyChangeListener
 386      * @see #firePropertyChangeListener
 387      */
 388     private PropertyChangeSupport accessibleChangeSupport = null;
 389 
 390     /**
 391      * Used to represent the context's relation set
 392      * @see #getAccessibleRelationSet
 393      */
 394     private AccessibleRelationSet relationSet
 395         = new AccessibleRelationSet();
 396 
 397     private Object nativeAXResource;
 398 
 399     /**
 400      * Gets the accessibleName property of this object.  The accessibleName
 401      * property of an object is a localized String that designates the purpose
 402      * of the object.  For example, the accessibleName property of a label
 403      * or button might be the text of the label or button itself.  In the
 404      * case of an object that doesn't display its name, the accessibleName
 405      * should still be set.  For example, in the case of a text field used
 406      * to enter the name of a city, the accessibleName for the en_US locale
 407      * could be 'city.'
 408      *
 409      * @return the localized name of the object; null if this
 410      * object does not have a name
 411      *
 412      * @see #setAccessibleName
 413      */
 414     public String getAccessibleName() {
 415         return accessibleName;
 416     }
 417 
 418     /**
 419      * Sets the localized accessible name of this object.  Changing the
 420      * name will cause a PropertyChangeEvent to be fired for the
 421      * ACCESSIBLE_NAME_PROPERTY property.
 422      *
 423      * @param s the new localized name of the object.
 424      *
 425      * @see #getAccessibleName
 426      * @see #addPropertyChangeListener
 427      *
 428      * @beaninfo
 429      *    preferred:   true
 430      *    description: Sets the accessible name for the component.
 431      */
 432     public void setAccessibleName(String s) {
 433         String oldName = accessibleName;
 434         accessibleName = s;
 435         firePropertyChange(ACCESSIBLE_NAME_PROPERTY,oldName,accessibleName);
 436     }
 437 
 438     /**
 439      * Gets the accessibleDescription property of this object.  The
 440      * accessibleDescription property of this object is a short localized
 441      * phrase describing the purpose of the object.  For example, in the
 442      * case of a 'Cancel' button, the accessibleDescription could be
 443      * 'Ignore changes and close dialog box.'
 444      *
 445      * @return the localized description of the object; null if
 446      * this object does not have a description
 447      *
 448      * @see #setAccessibleDescription
 449      */
 450     public String getAccessibleDescription() {
 451         return accessibleDescription;
 452     }
 453 
 454     /**
 455      * Sets the accessible description of this object.  Changing the
 456      * name will cause a PropertyChangeEvent to be fired for the
 457      * ACCESSIBLE_DESCRIPTION_PROPERTY property.
 458      *
 459      * @param s the new localized description of the object
 460      *
 461      * @see #setAccessibleName
 462      * @see #addPropertyChangeListener
 463      *
 464      * @beaninfo
 465      *    preferred:   true
 466      *    description: Sets the accessible description for the component.
 467      */
 468     public void setAccessibleDescription(String s) {
 469         String oldDescription = accessibleDescription;
 470         accessibleDescription = s;
 471         firePropertyChange(ACCESSIBLE_DESCRIPTION_PROPERTY,
 472                            oldDescription,accessibleDescription);
 473     }
 474 
 475     /**
 476      * Gets the role of this object.  The role of the object is the generic
 477      * purpose or use of the class of this object.  For example, the role
 478      * of a push button is AccessibleRole.PUSH_BUTTON.  The roles in
 479      * AccessibleRole are provided so component developers can pick from
 480      * a set of predefined roles.  This enables assistive technologies to
 481      * provide a consistent interface to various tweaked subclasses of
 482      * components (e.g., use AccessibleRole.PUSH_BUTTON for all components
 483      * that act like a push button) as well as distinguish between subclasses
 484      * that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes
 485      * and AccessibleRole.RADIO_BUTTON for radio buttons).
 486      * <p>Note that the AccessibleRole class is also extensible, so
 487      * custom component developers can define their own AccessibleRole's
 488      * if the set of predefined roles is inadequate.
 489      *
 490      * @return an instance of AccessibleRole describing the role of the object
 491      * @see AccessibleRole
 492      */
 493     public abstract AccessibleRole getAccessibleRole();
 494 
 495     /**
 496      * Gets the state set of this object.  The AccessibleStateSet of an object
 497      * is composed of a set of unique AccessibleStates.  A change in the
 498      * AccessibleStateSet of an object will cause a PropertyChangeEvent to
 499      * be fired for the ACCESSIBLE_STATE_PROPERTY property.
 500      *
 501      * @return an instance of AccessibleStateSet containing the
 502      * current state set of the object
 503      * @see AccessibleStateSet
 504      * @see AccessibleState
 505      * @see #addPropertyChangeListener
 506      */
 507     public abstract AccessibleStateSet getAccessibleStateSet();
 508 
 509     /**
 510      * Gets the Accessible parent of this object.
 511      *
 512      * @return the Accessible parent of this object; null if this
 513      * object does not have an Accessible parent
 514      */
 515     public Accessible getAccessibleParent() {
 516         return accessibleParent;
 517     }
 518 
 519     /**
 520      * Sets the Accessible parent of this object.  This is meant to be used
 521      * only in the situations where the actual component's parent should
 522      * not be treated as the component's accessible parent and is a method
 523      * that should only be called by the parent of the accessible child.
 524      *
 525      * @param a - Accessible to be set as the parent
 526      */
 527     public void setAccessibleParent(Accessible a) {
 528         accessibleParent = a;
 529     }
 530 
 531     /**
 532      * Gets the 0-based index of this object in its accessible parent.
 533      *
 534      * @return the 0-based index of this object in its parent; -1 if this
 535      * object does not have an accessible parent.
 536      *
 537      * @see #getAccessibleParent
 538      * @see #getAccessibleChildrenCount
 539      * @see #getAccessibleChild
 540      */
 541     public abstract int getAccessibleIndexInParent();
 542 
 543     /**
 544      * Returns the number of accessible children of the object.
 545      *
 546      * @return the number of accessible children of the object.
 547      */
 548     public abstract int getAccessibleChildrenCount();
 549 
 550     /**
 551      * Returns the specified Accessible child of the object.  The Accessible
 552      * children of an Accessible object are zero-based, so the first child
 553      * of an Accessible child is at index 0, the second child is at index 1,
 554      * and so on.
 555      *
 556      * @param i zero-based index of child
 557      * @return the Accessible child of the object
 558      * @see #getAccessibleChildrenCount
 559      */
 560     public abstract Accessible getAccessibleChild(int i);
 561 
 562     /**
 563      * Gets the locale of the component. If the component does not have a
 564      * locale, then the locale of its parent is returned.
 565      *
 566      * @return this component's locale.  If this component does not have
 567      * a locale, the locale of its parent is returned.
 568      *
 569      * @exception IllegalComponentStateException
 570      * If the Component does not have its own locale and has not yet been
 571      * added to a containment hierarchy such that the locale can be
 572      * determined from the containing parent.
 573      */
 574     public abstract Locale getLocale() throws IllegalComponentStateException;
 575 
 576     /**
 577      * Adds a PropertyChangeListener to the listener list.
 578      * The listener is registered for all Accessible properties and will
 579      * be called when those properties change.
 580      *
 581      * @see #ACCESSIBLE_NAME_PROPERTY
 582      * @see #ACCESSIBLE_DESCRIPTION_PROPERTY
 583      * @see #ACCESSIBLE_STATE_PROPERTY
 584      * @see #ACCESSIBLE_VALUE_PROPERTY
 585      * @see #ACCESSIBLE_SELECTION_PROPERTY
 586      * @see #ACCESSIBLE_TEXT_PROPERTY
 587      * @see #ACCESSIBLE_VISIBLE_DATA_PROPERTY
 588      *
 589      * @param listener  The PropertyChangeListener to be added
 590      */
 591     public void addPropertyChangeListener(PropertyChangeListener listener) {
 592         if (accessibleChangeSupport == null) {
 593             accessibleChangeSupport = new PropertyChangeSupport(this);
 594         }
 595         accessibleChangeSupport.addPropertyChangeListener(listener);
 596     }
 597 
 598     /**
 599      * Removes a PropertyChangeListener from the listener list.
 600      * This removes a PropertyChangeListener that was registered
 601      * for all properties.
 602      *
 603      * @param listener  The PropertyChangeListener to be removed
 604      */
 605     public void removePropertyChangeListener(PropertyChangeListener listener) {
 606         if (accessibleChangeSupport != null) {
 607             accessibleChangeSupport.removePropertyChangeListener(listener);
 608         }
 609     }
 610 
 611     /**
 612      * Gets the AccessibleAction associated with this object that supports
 613      * one or more actions.
 614      *
 615      * @return AccessibleAction if supported by object; else return null
 616      * @see AccessibleAction
 617      */
 618     public AccessibleAction getAccessibleAction() {
 619         return null;
 620     }
 621 
 622     /**
 623      * Gets the AccessibleComponent associated with this object that has a
 624      * graphical representation.
 625      *
 626      * @return AccessibleComponent if supported by object; else return null
 627      * @see AccessibleComponent
 628      */
 629     public AccessibleComponent getAccessibleComponent() {
 630         return null;
 631     }
 632 
 633     /**
 634      * Gets the AccessibleSelection associated with this object which allows its
 635      * Accessible children to be selected.
 636      *
 637      * @return AccessibleSelection if supported by object; else return null
 638      * @see AccessibleSelection
 639      */
 640     public AccessibleSelection getAccessibleSelection() {
 641         return null;
 642     }
 643 
 644     /**
 645      * Gets the AccessibleText associated with this object presenting
 646      * text on the display.
 647      *
 648      * @return AccessibleText if supported by object; else return null
 649      * @see AccessibleText
 650      */
 651     public AccessibleText getAccessibleText() {
 652         return null;
 653     }
 654 
 655     /**
 656      * Gets the AccessibleEditableText associated with this object
 657      * presenting editable text on the display.
 658      *
 659      * @return AccessibleEditableText if supported by object; else return null
 660      * @see AccessibleEditableText
 661      * @since 1.4
 662      */
 663     public AccessibleEditableText getAccessibleEditableText() {
 664         return null;
 665     }
 666 
 667 
 668     /**
 669      * Gets the AccessibleValue associated with this object that supports a
 670      * Numerical value.
 671      *
 672      * @return AccessibleValue if supported by object; else return null
 673      * @see AccessibleValue
 674      */
 675     public AccessibleValue getAccessibleValue() {
 676         return null;
 677     }
 678 
 679     /**
 680      * Gets the AccessibleIcons associated with an object that has
 681      * one or more associated icons
 682      *
 683      * @return an array of AccessibleIcon if supported by object;
 684      * otherwise return null
 685      * @see AccessibleIcon
 686      * @since 1.3
 687      */
 688     public AccessibleIcon [] getAccessibleIcon() {
 689         return null;
 690     }
 691 
 692     /**
 693      * Gets the AccessibleRelationSet associated with an object
 694      *
 695      * @return an AccessibleRelationSet if supported by object;
 696      * otherwise return null
 697      * @see AccessibleRelationSet
 698      * @since 1.3
 699      */
 700     public AccessibleRelationSet getAccessibleRelationSet() {
 701         return relationSet;
 702     }
 703 
 704     /**
 705      * Gets the AccessibleTable associated with an object
 706      *
 707      * @return an AccessibleTable if supported by object;
 708      * otherwise return null
 709      * @see AccessibleTable
 710      * @since 1.3
 711      */
 712     public AccessibleTable getAccessibleTable() {
 713         return null;
 714     }
 715 
 716     /**
 717      * Support for reporting bound property changes.  If oldValue and
 718      * newValue are not equal and the PropertyChangeEvent listener list
 719      * is not empty, then fire a PropertyChange event to each listener.
 720      * In general, this is for use by the Accessible objects themselves
 721      * and should not be called by an application program.
 722      * @param propertyName  The programmatic name of the property that
 723      * was changed.
 724      * @param oldValue  The old value of the property.
 725      * @param newValue  The new value of the property.
 726      * @see java.beans.PropertyChangeSupport
 727      * @see #addPropertyChangeListener
 728      * @see #removePropertyChangeListener
 729      * @see #ACCESSIBLE_NAME_PROPERTY
 730      * @see #ACCESSIBLE_DESCRIPTION_PROPERTY
 731      * @see #ACCESSIBLE_STATE_PROPERTY
 732      * @see #ACCESSIBLE_VALUE_PROPERTY
 733      * @see #ACCESSIBLE_SELECTION_PROPERTY
 734      * @see #ACCESSIBLE_TEXT_PROPERTY
 735      * @see #ACCESSIBLE_VISIBLE_DATA_PROPERTY
 736      */
 737     public void firePropertyChange(String propertyName,
 738                                    Object oldValue,
 739                                    Object newValue) {
 740         if (accessibleChangeSupport != null) {
 741             if (newValue instanceof PropertyChangeEvent) {
 742                 PropertyChangeEvent pce = (PropertyChangeEvent)newValue;
 743                 accessibleChangeSupport.firePropertyChange(pce);
 744             } else {
 745                 accessibleChangeSupport.firePropertyChange(propertyName,
 746                                                            oldValue,
 747                                                            newValue);
 748             }
 749         }
 750     }
 751 }