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