Path: blob/master/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java
41153 views
/*1* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.accessibility;2627import java.awt.IllegalComponentStateException;28import java.beans.BeanProperty;29import java.beans.JavaBean;30import java.beans.PropertyChangeEvent;31import java.beans.PropertyChangeListener;32import java.beans.PropertyChangeSupport;33import java.util.Locale;3435import sun.awt.AWTAccessor;36import sun.awt.AppContext;3738/**39* {@code AccessibleContext} represents the minimum information all accessible40* objects return. This information includes the accessible name, description,41* role, and state of the object, as well as information about its parent and42* children. {@code AccessibleContext} also contains methods for obtaining more43* specific accessibility information about a component. If the component44* supports them, these methods will return an object that implements one or45* more of the following interfaces:46* <ul>47* <li>{@link AccessibleAction} - the object can perform one or more actions.48* This interface provides the standard mechanism for an assistive technology49* to determine what those actions are and tell the object to perform them.50* Any object that can be manipulated should support this interface.51* <li>{@link AccessibleComponent} - the object has a graphical52* representation. This interface provides the standard mechanism for an53* assistive technology to determine and set the graphical representation of54* the object. Any object that is rendered on the screen should support this55* interface.56* <li>{@link AccessibleSelection} - the object allows its children to be57* selected. This interface provides the standard mechanism for an assistive58* technology to determine the currently selected children of the object as59* well as modify its selection set. Any object that has children that can be60* selected should support this interface.61* <li>{@link AccessibleText} - the object presents editable textual62* information on the display. This interface provides the standard mechanism63* for an assistive technology to access that text via its content,64* attributes, and spatial location. Any object that contains editable text65* should support this interface.66* <li>{@link AccessibleValue} - the object supports a numerical value. This67* interface provides the standard mechanism for an assistive technology to68* determine and set the current value of the object, as well as obtain its69* minimum and maximum values. Any object that supports a numerical value70* should support this interface.71* </ul>72*73* @author Peter Korn74* @author Hans Muller75* @author Willie Walker76* @author Lynn Monsanto77*/78@JavaBean(description = "Minimal information that all accessible objects return")79public abstract class AccessibleContext {8081/**82* Constructor for subclasses to call.83*/84protected AccessibleContext() {}8586/**87* The {@code AppContext} that should be used to dispatch events for this88* {@code AccessibleContext}.89*/90private volatile AppContext targetAppContext;9192static {93AWTAccessor.setAccessibleContextAccessor(new AWTAccessor.AccessibleContextAccessor() {94@Override95public void setAppContext(AccessibleContext accessibleContext, AppContext appContext) {96accessibleContext.targetAppContext = appContext;97}9899@Override100public AppContext getAppContext(AccessibleContext accessibleContext) {101return accessibleContext.targetAppContext;102}103104@Override105public Object getNativeAXResource(AccessibleContext accessibleContext) {106return accessibleContext.nativeAXResource;107}108109@Override110public void setNativeAXResource(AccessibleContext accessibleContext, Object value) {111accessibleContext.nativeAXResource = value;112}113});114}115116/**117* Constant used to determine when the {@link #accessibleName} property has118* changed. The old value in the {@code PropertyChangeEvent} will be the old119* {@code accessibleName} and the new value will be the new120* {@code accessibleName}.121*122* @see #getAccessibleName123* @see #addPropertyChangeListener124*/125public static final String ACCESSIBLE_NAME_PROPERTY = "AccessibleName";126127/**128* Constant used to determine when the {@link #accessibleDescription}129* property has changed. The old value in the {@code PropertyChangeEvent}130* will be the old {@code accessibleDescription} and the new value will be131* the new {@code accessibleDescription}.132*133* @see #getAccessibleDescription134* @see #addPropertyChangeListener135*/136public static final String ACCESSIBLE_DESCRIPTION_PROPERTY = "AccessibleDescription";137138/**139* Constant used to determine when the {@code accessibleStateSet} property140* has changed. The old value will be the old {@code AccessibleState} and141* the new value will be the new {@code AccessibleState} in the142* {@code accessibleStateSet}. For example, if a component that supports the143* vertical and horizontal states changes its orientation from vertical to144* horizontal, the old value will be {@code AccessibleState.VERTICAL} and145* the new value will be {@code AccessibleState.HORIZONTAL}. Please note146* that either value can also be {@code null}. For example, when a component147* changes from being enabled to disabled, the old value will be148* {@code AccessibleState.ENABLED} and the new value will be {@code null}.149*150* @see #getAccessibleStateSet151* @see AccessibleState152* @see AccessibleStateSet153* @see #addPropertyChangeListener154*/155public static final String ACCESSIBLE_STATE_PROPERTY = "AccessibleState";156157/**158* Constant used to determine when the {@code accessibleValue} property has159* changed. The old value in the {@code PropertyChangeEvent} will be a160* {@code Number} representing the old value and the new value will be a161* {@code Number} representing the new value.162*163* @see #getAccessibleValue164* @see #addPropertyChangeListener165*/166public static final String ACCESSIBLE_VALUE_PROPERTY = "AccessibleValue";167168/**169* Constant used to determine when the {@code accessibleSelection} has170* changed. The old and new values in the {@code PropertyChangeEvent} are171* currently reserved for future use.172*173* @see #getAccessibleSelection174* @see #addPropertyChangeListener175*/176public static final String ACCESSIBLE_SELECTION_PROPERTY = "AccessibleSelection";177178/**179* Constant used to determine when the {@code accessibleText} caret has180* changed. The old value in the {@code PropertyChangeEvent} will be an181* integer representing the old caret position, and the new value will be an182* integer representing the new/current caret position.183*184* @see #addPropertyChangeListener185*/186public static final String ACCESSIBLE_CARET_PROPERTY = "AccessibleCaret";187188/**189* Constant used to determine when the visual appearance of the object has190* changed. The old and new values in the {@code PropertyChangeEvent} are191* currently reserved for future use.192*193* @see #addPropertyChangeListener194*/195public static final String ACCESSIBLE_VISIBLE_DATA_PROPERTY = "AccessibleVisibleData";196197/**198* Constant used to determine when {@code Accessible} children are199* added/removed from the object. If an {@code Accessible} child is being200* added, the old value will be {@code null} and the new value will be the201* {@code Accessible} child. If an {@code Accessible} child is being202* removed, the old value will be the {@code Accessible} child, and the new203* value will be {@code null}.204*205* @see #addPropertyChangeListener206*/207public static final String ACCESSIBLE_CHILD_PROPERTY = "AccessibleChild";208209/**210* Constant used to determine when the active descendant of a component has211* changed. The active descendant is used for objects such as list, tree,212* and table, which may have transient children. When the active descendant213* has changed, the old value of the property change event will be the214* {@code Accessible} representing the previous active child, and the new215* value will be the {@code Accessible} representing the current active216* child.217*218* @see #addPropertyChangeListener219*/220public static final String ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY = "AccessibleActiveDescendant";221222/**223* Constant used to indicate that the table caption has changed. The old224* value in the {@code PropertyChangeEvent} will be an {@code Accessible}225* representing the previous table caption and the new value will be an226* {@code Accessible} representing the new table caption.227*228* @see Accessible229* @see AccessibleTable230*/231public static final String ACCESSIBLE_TABLE_CAPTION_CHANGED =232"accessibleTableCaptionChanged";233234/**235* Constant used to indicate that the table summary has changed. The old236* value in the {@code PropertyChangeEvent} will be an {@code Accessible}237* representing the previous table summary and the new value will be an238* {@code Accessible} representing the new table summary.239*240* @see Accessible241* @see AccessibleTable242*/243public static final String ACCESSIBLE_TABLE_SUMMARY_CHANGED =244"accessibleTableSummaryChanged";245246/**247* Constant used to indicate that table data has changed. The old value in248* the {@code PropertyChangeEvent} will be {@code null} and the new value249* will be an {@code AccessibleTableModelChange} representing the table250* change.251*252* @see AccessibleTable253* @see AccessibleTableModelChange254*/255public static final String ACCESSIBLE_TABLE_MODEL_CHANGED =256"accessibleTableModelChanged";257258/**259* Constant used to indicate that the row header has changed. The old value260* in the {@code PropertyChangeEvent} will be {@code null} and the new value261* will be an {@code AccessibleTableModelChange} representing the header262* change.263*264* @see AccessibleTable265* @see AccessibleTableModelChange266*/267public static final String ACCESSIBLE_TABLE_ROW_HEADER_CHANGED =268"accessibleTableRowHeaderChanged";269270/**271* Constant used to indicate that the row description has changed. The old272* value in the {@code PropertyChangeEvent} will be {@code null} and the new273* value will be an {@code Integer} representing the row index.274*275* @see AccessibleTable276*/277public static final String ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED =278"accessibleTableRowDescriptionChanged";279280/**281* Constant used to indicate that the column header has changed. The old282* value in the {@code PropertyChangeEvent} will be {@code null} and the new283* value will be an {@code AccessibleTableModelChange} representing the284* header change.285*286* @see AccessibleTable287* @see AccessibleTableModelChange288*/289public static final String ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED =290"accessibleTableColumnHeaderChanged";291292/**293* Constant used to indicate that the column description has changed. The294* old value in the {@code PropertyChangeEvent} will be {@code null} and the295* new value will be an {@code Integer} representing the column index.296*297* @see AccessibleTable298*/299public static final String ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED =300"accessibleTableColumnDescriptionChanged";301302/**303* Constant used to indicate that the supported set of actions has changed.304* The old value in the {@code PropertyChangeEvent} will be an305* {@code Integer} representing the old number of actions supported and the306* new value will be an {@code Integer} representing the new number of307* actions supported.308*309* @see AccessibleAction310*/311public static final String ACCESSIBLE_ACTION_PROPERTY =312"accessibleActionProperty";313314/**315* Constant used to indicate that a hypertext element has received focus.316* The old value in the {@code PropertyChangeEvent} will be an317* {@code Integer} representing the start index in the document of the318* previous element that had focus and the new value will be an319* {@code Integer} representing the start index in the document of the320* current element that has focus. A value of -1 indicates that an element321* does not or did not have focus.322*323* @see AccessibleHyperlink324*/325public static final String ACCESSIBLE_HYPERTEXT_OFFSET =326"AccessibleHypertextOffset";327328/**329* {@code PropertyChangeEvent} which indicates that text has changed.330* <br>331* For text insertion, the {@code oldValue} is {@code null} and the332* {@code newValue} is an {@code AccessibleTextSequence} specifying the text333* that was inserted.334* <br>335* For text deletion, the {@code oldValue} is an336* {@code AccessibleTextSequence} specifying the text that was deleted and337* the {@code newValue} is {@code null}.338* <br>339* For text replacement, the {@code oldValue} is an340* {@code AccessibleTextSequence} specifying the old text and the341* {@code newValue} is an {@code AccessibleTextSequence} specifying the new342* text.343*344* @see #getAccessibleText345* @see #addPropertyChangeListener346* @see AccessibleTextSequence347*/348public static final String ACCESSIBLE_TEXT_PROPERTY349= "AccessibleText";350351/**352* {@code PropertyChangeEvent} which indicates that a significant change has353* occurred to the children of a component like a tree or text. This change354* notifies the event listener that it needs to reacquire the state of the355* subcomponents. The {@code oldValue} is {@code null} and the356* {@code newValue} is the component whose children have become invalid.357*358* @see #getAccessibleText359* @see #addPropertyChangeListener360* @see AccessibleTextSequence361* @since 1.5362*/363public static final String ACCESSIBLE_INVALIDATE_CHILDREN =364"accessibleInvalidateChildren";365366/**367* {@code PropertyChangeEvent} which indicates that text attributes have368* changed.369* <br>370* For attribute insertion, the {@code oldValue} is {@code null} and the371* {@code newValue} is an {@code AccessibleAttributeSequence} specifying the372* attributes that were inserted.373* <br>374* For attribute deletion, the {@code oldValue} is an375* {@code AccessibleAttributeSequence} specifying the attributes that were376* deleted and the {@code newValue} is {@code null}.377* <br>378* For attribute replacement, the {@code oldValue} is an379* {@code AccessibleAttributeSequence} specifying the old attributes and the380* {@code newValue} is an {@code AccessibleAttributeSequence} specifying the381* new attributes.382*383* @see #getAccessibleText384* @see #addPropertyChangeListener385* @see AccessibleAttributeSequence386* @since 1.5387*/388public static final String ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED =389"accessibleTextAttributesChanged";390391/**392* {@code PropertyChangeEvent} which indicates that a change has occurred in393* a component's bounds. The {@code oldValue} is the old component bounds394* and the {@code newValue} is the new component bounds.395*396* @see #addPropertyChangeListener397* @since 1.5398*/399public static final String ACCESSIBLE_COMPONENT_BOUNDS_CHANGED =400"accessibleComponentBoundsChanged";401402/**403* The accessible parent of this object.404*405* @see #getAccessibleParent406* @see #setAccessibleParent407*/408protected Accessible accessibleParent = null;409410/**411* A localized String containing the name of the object.412*413* @see #getAccessibleName414* @see #setAccessibleName415*/416protected String accessibleName = null;417418/**419* A localized String containing the description of the object.420*421* @see #getAccessibleDescription422* @see #setAccessibleDescription423*/424protected String accessibleDescription = null;425426/**427* Used to handle the listener list for property change events.428*429* @see #addPropertyChangeListener430* @see #removePropertyChangeListener431* @see #firePropertyChange432*/433private PropertyChangeSupport accessibleChangeSupport = null;434435/**436* Used to represent the context's relation set.437*438* @see #getAccessibleRelationSet439*/440private AccessibleRelationSet relationSet441= new AccessibleRelationSet();442443private Object nativeAXResource;444445/**446* Gets the {@code accessibleName} property of this object. The447* {@code accessibleName} property of an object is a localized448* {@code String} that designates the purpose of the object. For example,449* the {@code accessibleName} property of a label or button might be the450* text of the label or button itself. In the case of an object that doesn't451* display its name, the {@code accessibleName} should still be set. For452* example, in the case of a text field used to enter the name of a city,453* the {@code accessibleName} for the {@code en_US} locale could be 'city.'454*455* @return the localized name of the object; {@code null} if this object456* does not have a name457* @see #setAccessibleName458*/459public String getAccessibleName() {460return accessibleName;461}462463/**464* Sets the localized accessible name of this object. Changing the name will465* cause a {@code PropertyChangeEvent} to be fired for the466* {@code ACCESSIBLE_NAME_PROPERTY} property.467*468* @param s the new localized name of the object469* @see #getAccessibleName470* @see #addPropertyChangeListener471*/472@BeanProperty(preferred = true, description473= "Sets the accessible name for the component.")474public void setAccessibleName(String s) {475String oldName = accessibleName;476accessibleName = s;477firePropertyChange(ACCESSIBLE_NAME_PROPERTY,oldName,accessibleName);478}479480/**481* Gets the {@code accessibleDescription} property of this object. The482* {@code accessibleDescription} property of this object is a short483* localized phrase describing the purpose of the object. For example, in484* the case of a 'Cancel' button, the {@code accessibleDescription} could be485* 'Ignore changes and close dialog box.'486*487* @return the localized description of the object; {@code null} if this488* object does not have a description489* @see #setAccessibleDescription490*/491public String getAccessibleDescription() {492return accessibleDescription;493}494495/**496* Sets the accessible description of this object. Changing the name will497* cause a {@code PropertyChangeEvent} to be fired for the498* {@code ACCESSIBLE_DESCRIPTION_PROPERTY} property.499*500* @param s the new localized description of the object501* @see #setAccessibleName502* @see #addPropertyChangeListener503*/504@BeanProperty(preferred = true, description505= "Sets the accessible description for the component.")506public void setAccessibleDescription(String s) {507String oldDescription = accessibleDescription;508accessibleDescription = s;509firePropertyChange(ACCESSIBLE_DESCRIPTION_PROPERTY,510oldDescription,accessibleDescription);511}512513/**514* Gets the role of this object. The role of the object is the generic515* purpose or use of the class of this object. For example, the role of a516* push button is {@code AccessibleRole.PUSH_BUTTON}. The roles in517* {@code AccessibleRole} are provided so component developers can pick from518* a set of predefined roles. This enables assistive technologies to provide519* a consistent interface to various tweaked subclasses of components (e.g.,520* use {@code AccessibleRole.PUSH_BUTTON} for all components that act like a521* push button) as well as distinguish between subclasses that behave522* differently (e.g., {@code AccessibleRole.CHECK_BOX} for check boxes and523* {@code AccessibleRole.RADIO_BUTTON} for radio buttons).524* <p>525* Note that the {@code AccessibleRole} class is also extensible, so custom526* component developers can define their own {@code AccessibleRole}'s if the527* set of predefined roles is inadequate.528*529* @return an instance of {@code AccessibleRole} describing the role of the530* object531* @see AccessibleRole532*/533public abstract AccessibleRole getAccessibleRole();534535/**536* Gets the state set of this object. The {@code AccessibleStateSet} of an537* object is composed of a set of unique {@code AccessibleStates}. A change538* in the {@code AccessibleStateSet} of an object will cause a539* {@code PropertyChangeEvent} to be fired for the540* {@code ACCESSIBLE_STATE_PROPERTY} property.541*542* @return an instance of {@code AccessibleStateSet} containing the current543* state set of the object544* @see AccessibleStateSet545* @see AccessibleState546* @see #addPropertyChangeListener547*/548public abstract AccessibleStateSet getAccessibleStateSet();549550/**551* Gets the {@code Accessible} parent of this object.552*553* @return the {@code Accessible} parent of this object; {@code null} if554* this object does not have an {@code Accessible} parent555*/556public Accessible getAccessibleParent() {557return accessibleParent;558}559560/**561* Sets the {@code Accessible} parent of this object. This is meant to be562* used only in the situations where the actual component's parent should563* not be treated as the component's accessible parent and is a method that564* should only be called by the parent of the accessible child.565*566* @param a - {@code Accessible} to be set as the parent567*/568public void setAccessibleParent(Accessible a) {569accessibleParent = a;570}571572/**573* Gets the 0-based index of this object in its accessible parent.574*575* @return the 0-based index of this object in its parent; -1 if this object576* does not have an accessible parent.577* @see #getAccessibleParent578* @see #getAccessibleChildrenCount579* @see #getAccessibleChild580*/581public abstract int getAccessibleIndexInParent();582583/**584* Returns the number of accessible children of the object.585*586* @return the number of accessible children of the object.587*/588public abstract int getAccessibleChildrenCount();589590/**591* Returns the specified {@code Accessible} child of the object. The592* {@code Accessible} children of an {@code Accessible} object are593* zero-based, so the first child of an {@code Accessible} child is at index594* 0, the second child is at index 1, and so on.595*596* @param i zero-based index of child597* @return the {@code Accessible} child of the object598* @see #getAccessibleChildrenCount599*/600public abstract Accessible getAccessibleChild(int i);601602/**603* Gets the locale of the component. If the component does not have a604* locale, then the locale of its parent is returned.605*606* @return this component's locale. If this component does not have a607* locale, the locale of its parent is returned.608* @throws IllegalComponentStateException If the component does not have its609* own locale and has not yet been added to a containment hierarchy610* such that the locale can be determined from the containing611* parent612*/613public abstract Locale getLocale() throws IllegalComponentStateException;614615/**616* Adds a {@code PropertyChangeListener} to the listener list. The listener617* is registered for all {@code Accessible} properties and will be called618* when those properties change.619*620* @param listener The PropertyChangeListener to be added621* @see #ACCESSIBLE_NAME_PROPERTY622* @see #ACCESSIBLE_DESCRIPTION_PROPERTY623* @see #ACCESSIBLE_STATE_PROPERTY624* @see #ACCESSIBLE_VALUE_PROPERTY625* @see #ACCESSIBLE_SELECTION_PROPERTY626* @see #ACCESSIBLE_TEXT_PROPERTY627* @see #ACCESSIBLE_VISIBLE_DATA_PROPERTY628*/629public void addPropertyChangeListener(PropertyChangeListener listener) {630if (accessibleChangeSupport == null) {631accessibleChangeSupport = new PropertyChangeSupport(this);632}633accessibleChangeSupport.addPropertyChangeListener(listener);634}635636/**637* Removes a {@code PropertyChangeListener} from the listener list. This638* removes a {@code PropertyChangeListener} that was registered for all639* properties.640*641* @param listener The PropertyChangeListener to be removed642*/643public void removePropertyChangeListener(PropertyChangeListener listener) {644if (accessibleChangeSupport != null) {645accessibleChangeSupport.removePropertyChangeListener(listener);646}647}648649/**650* Gets the {@code AccessibleAction} associated with this object that651* supports one or more actions.652*653* @return {@code AccessibleAction} if supported by object; else return654* {@code null}655* @see AccessibleAction656*/657public AccessibleAction getAccessibleAction() {658return null;659}660661/**662* Gets the {@code AccessibleComponent} associated with this object that has663* a graphical representation.664*665* @return {@code AccessibleComponent} if supported by object; else return666* {@code null}667* @see AccessibleComponent668*/669public AccessibleComponent getAccessibleComponent() {670return null;671}672673/**674* Gets the {@code AccessibleSelection} associated with this object which675* allows its {@code Accessible} children to be selected.676*677* @return {@code AccessibleSelection} if supported by object; else return678* {@code null}679* @see AccessibleSelection680*/681public AccessibleSelection getAccessibleSelection() {682return null;683}684685/**686* Gets the {@code AccessibleText} associated with this object presenting687* text on the display.688*689* @return {@code AccessibleText} if supported by object; else return690* {@code null}691* @see AccessibleText692*/693public AccessibleText getAccessibleText() {694return null;695}696697/**698* Gets the {@code AccessibleEditableText} associated with this object699* presenting editable text on the display.700*701* @return {@code AccessibleEditableText} if supported by object; else702* return {@code null}703* @see AccessibleEditableText704* @since 1.4705*/706public AccessibleEditableText getAccessibleEditableText() {707return null;708}709710/**711* Gets the {@code AccessibleValue} associated with this object that712* supports a {@code Numerical} value.713*714* @return {@code AccessibleValue} if supported by object; else return715* {@code null}716* @see AccessibleValue717*/718public AccessibleValue getAccessibleValue() {719return null;720}721722/**723* Gets the {@code AccessibleIcons} associated with an object that has one724* or more associated icons.725*726* @return an array of {@code AccessibleIcon} if supported by object;727* otherwise return {@code null}728* @see AccessibleIcon729* @since 1.3730*/731public AccessibleIcon [] getAccessibleIcon() {732return null;733}734735/**736* Gets the {@code AccessibleRelationSet} associated with an object.737*738* @return an {@code AccessibleRelationSet} if supported by object;739* otherwise return {@code null}740* @see AccessibleRelationSet741* @since 1.3742*/743public AccessibleRelationSet getAccessibleRelationSet() {744return relationSet;745}746747/**748* Gets the {@code AccessibleTable} associated with an object.749*750* @return an {@code AccessibleTable} if supported by object; otherwise return751* {@code null}752* @see AccessibleTable753* @since 1.3754*/755public AccessibleTable getAccessibleTable() {756return null;757}758759/**760* Support for reporting bound property changes. If {@code oldValue} and761* {@code newValue} are not equal and the {@code PropertyChangeEvent}762* listener list is not empty, then fire a {@code PropertyChange} event to763* each listener. In general, this is for use by the {@code Accessible}764* objects themselves and should not be called by an application program.765*766* @param propertyName The programmatic name of the property that was767* changed768* @param oldValue The old value of the property769* @param newValue The new value of the property770* @see PropertyChangeSupport771* @see #addPropertyChangeListener772* @see #removePropertyChangeListener773* @see #ACCESSIBLE_NAME_PROPERTY774* @see #ACCESSIBLE_DESCRIPTION_PROPERTY775* @see #ACCESSIBLE_STATE_PROPERTY776* @see #ACCESSIBLE_VALUE_PROPERTY777* @see #ACCESSIBLE_SELECTION_PROPERTY778* @see #ACCESSIBLE_TEXT_PROPERTY779* @see #ACCESSIBLE_VISIBLE_DATA_PROPERTY780*/781public void firePropertyChange(String propertyName,782Object oldValue,783Object newValue) {784if (accessibleChangeSupport != null) {785if (newValue instanceof PropertyChangeEvent) {786PropertyChangeEvent pce = (PropertyChangeEvent)newValue;787accessibleChangeSupport.firePropertyChange(pce);788} else {789accessibleChangeSupport.firePropertyChange(propertyName,790oldValue,791newValue);792}793}794}795}796797798