KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > accessibility > AccessibleContext


1 /*
2  * @(#)AccessibleContext.java 1.43 04/04/02
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.accessibility;
9
10 import java.util.Locale JavaDoc;
11 import java.beans.PropertyChangeListener JavaDoc;
12 import java.beans.PropertyChangeSupport JavaDoc;
13 import java.beans.PropertyChangeEvent JavaDoc;
14 import java.awt.IllegalComponentStateException JavaDoc;
15
16 /**
17  * AccessibleContext represents the minimum information all accessible objects
18  * return. This information includes the accessible name, description, role,
19  * and state of the object, as well as information about its parent and
20  * children. AccessibleContext also contains methods for
21  * obtaining more specific accessibility information about a component.
22  * If the component supports them, these methods will return an object that
23  * implements one or more of the following interfaces:
24  * <P><ul>
25  * <li>{@link AccessibleAction} - the object can perform one or more actions.
26  * This interface provides the standard mechanism for an assistive
27  * technology to determine what those actions are and tell the object
28  * to perform them. Any object that can be manipulated should
29  * support this interface.
30  * <li>{@link AccessibleComponent} - the object has a graphical representation.
31  * This interface provides the standard mechanism for an assistive
32  * technology to determine and set the graphical representation of the
33  * object. Any object that is rendered on the screen should support
34  * this interface.
35  * <li>{@link AccessibleSelection} - the object allows its children to be
36  * selected. This interface provides the standard mechanism for an
37  * assistive technology to determine the currently selected children of the object
38  * as well as modify its selection set. Any object that has children
39  * that can be selected should support this interface.
40  * <li>{@link AccessibleText} - the object presents editable textual information
41  * on the display. This interface provides the standard mechanism for
42  * an assistive technology to access that text via its content, attributes,
43  * and spatial location. Any object that contains editable text should
44  * support this interface.
45  * <li>{@link AccessibleValue} - the object supports a numerical value. This
46  * interface provides the standard mechanism for an assistive technology
47  * to determine and set the current value of the object, as well as obtain its
48  * minimum and maximum values. Any object that supports a numerical value
49  * should support this interface.</ul>
50  *
51  *
52  * @beaninfo
53  * attribute: isContainer false
54  * description: Minimal information that all accessible objects return
55  *
56
57  * @version 1.43 04/02/04
58  * @author Peter Korn
59  * @author Hans Muller
60  * @author Willie Walker
61  * @author Lynn Monsanto
62  */

63 public abstract class AccessibleContext {
64
65    /**
66     * Constant used to determine when the accessibleName property has
67     * changed. The old value in the PropertyChangeEvent will be the old
68     * accessibleName and the new value will be the new accessibleName.
69     *
70     * @see #getAccessibleName
71     * @see #addPropertyChangeListener
72     */

73    public static final String JavaDoc ACCESSIBLE_NAME_PROPERTY = "AccessibleName";
74
75    /**
76     * Constant used to determine when the accessibleDescription property has
77     * changed. The old value in the PropertyChangeEvent will be the
78     * old accessibleDescription and the new value will be the new
79     * accessibleDescription.
80     *
81     * @see #getAccessibleDescription
82     * @see #addPropertyChangeListener
83     */

84    public static final String JavaDoc ACCESSIBLE_DESCRIPTION_PROPERTY = "AccessibleDescription";
85
86    /**
87     * Constant used to determine when the accessibleStateSet property has
88     * changed. The old value will be the old AccessibleState and the new
89     * value will be the new AccessibleState in the accessibleStateSet.
90     * For example, if a component that supports the vertical and horizontal
91     * states changes its orientation from vertical to horizontal, the old
92     * value will be AccessibleState.VERTICAL and the new value will be
93     * AccessibleState.HORIZONTAL. Please note that either value can also
94     * be null. For example, when a component changes from being enabled
95     * to disabled, the old value will be AccessibleState.ENABLED
96     * and the new value will be null.
97     *
98     * @see #getAccessibleStateSet
99     * @see AccessibleState
100     * @see AccessibleStateSet
101     * @see #addPropertyChangeListener
102     */

103    public static final String JavaDoc ACCESSIBLE_STATE_PROPERTY = "AccessibleState";
104
105    /**
106     * Constant used to determine when the accessibleValue property has
107     * changed. The old value in the PropertyChangeEvent will be a Number
108     * representing the old value and the new value will be a Number
109     * representing the new value
110     *
111     * @see #getAccessibleValue
112     * @see #addPropertyChangeListener
113     */

114    public static final String JavaDoc ACCESSIBLE_VALUE_PROPERTY = "AccessibleValue";
115
116    /**
117     * Constant used to determine when the accessibleSelection has changed.
118     * The old and new values in the PropertyChangeEvent are currently
119     * reserved for future use.
120     *
121     * @see #getAccessibleSelection
122     * @see #addPropertyChangeListener
123     */

124    public static final String JavaDoc ACCESSIBLE_SELECTION_PROPERTY = "AccessibleSelection";
125
126    /**
127     * Constant used to determine when the accessibleText caret has changed.
128     * The old value in the PropertyChangeEvent will be an
129     * integer representing the old caret position, and the new value will
130     * be an integer representing the new/current caret position.
131     *
132     * @see #addPropertyChangeListener
133     */

134    public static final String JavaDoc ACCESSIBLE_CARET_PROPERTY = "AccessibleCaret";
135
136    /**
137     * Constant used to determine when the visual appearance of the object
138     * has changed. The old and new values in the PropertyChangeEvent are
139     * currently reserved for future use.
140     *
141     * @see #addPropertyChangeListener
142     */

143    public static final String JavaDoc ACCESSIBLE_VISIBLE_DATA_PROPERTY = "AccessibleVisibleData";
144
145    /**
146     * Constant used to determine when Accessible children are added/removed
147     * from the object. If an Accessible child is being added, the old
148     * value will be null and the new value will be the Accessible child. If an
149     * Accessible child is being removed, the old value will be the Accessible
150     * child, and the new value will be null.
151     *
152     * @see #addPropertyChangeListener
153     */

154    public static final String JavaDoc ACCESSIBLE_CHILD_PROPERTY = "AccessibleChild";
155
156    /**
157     * Constant used to determine when the active descendant of a component
158     * has changed. The active descendant is used for objects such as
159     * list, tree, and table, which may have transient children. When the
160     * active descendant has changed, the old value of the property change
161     * event will be the Accessible representing the previous active child, and
162     * the new value will be the Accessible representing the current active
163     * child.
164     *
165     * @see #addPropertyChangeListener
166     */

167    public static final String JavaDoc ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY = "AccessibleActiveDescendant";
168
169     /**
170      * Constant used to indicate that the table caption has changed
171      * The old value in the PropertyChangeEvent will be an Accessible
172      * representing the previous table caption and the new value will
173      * be an Accessible representing the new table caption.
174      * @see Accessible
175      * @see AccessibleTable
176      */

177     public static final String JavaDoc ACCESSIBLE_TABLE_CAPTION_CHANGED =
178     "accessibleTableCaptionChanged";
179
180     /**
181      * Constant used to indicate that the table summary has changed
182      * The old value in the PropertyChangeEvent will be an Accessible
183      * representing the previous table summary and the new value will
184      * be an Accessible representing the new table summary.
185      * @see Accessible
186      * @see AccessibleTable
187      */

188     public static final String JavaDoc ACCESSIBLE_TABLE_SUMMARY_CHANGED =
189     "accessibleTableSummaryChanged";
190
191     /**
192      * Constant used to indicate that table data has changed.
193      * The old value in the PropertyChangeEvent will be null and the
194      * new value will be an AccessibleTableModelChange representing
195      * the table change.
196      * @see AccessibleTable
197      * @see AccessibleTableModelChange
198      */

199     public static final String JavaDoc ACCESSIBLE_TABLE_MODEL_CHANGED =
200     "accessibleTableModelChanged";
201
202     /**
203      * Constant used to indicate that the row header has changed
204      * The old value in the PropertyChangeEvent will be null and the
205      * new value will be an AccessibleTableModelChange representing
206      * the header change.
207      * @see AccessibleTable
208      * @see AccessibleTableModelChange
209      */

210     public static final String JavaDoc ACCESSIBLE_TABLE_ROW_HEADER_CHANGED =
211     "accessibleTableRowHeaderChanged";
212
213     /**
214      * Constant used to indicate that the row description has changed
215      * The old value in the PropertyChangeEvent will be null and the
216      * new value will be an Integer representing the row index.
217      * @see AccessibleTable
218      */

219     public static final String JavaDoc ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED =
220     "accessibleTableRowDescriptionChanged";
221
222     /**
223      * Constant used to indicate that the column header has changed
224      * The old value in the PropertyChangeEvent will be null and the
225      * new value will be an AccessibleTableModelChange representing
226      * the header change.
227      * @see AccessibleTable
228      * @see AccessibleTableModelChange
229      */

230     public static final String JavaDoc ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED =
231     "accessibleTableColumnHeaderChanged";
232
233     /**
234      * Constant used to indicate that the column description has changed
235      * The old value in the PropertyChangeEvent will be null and the
236      * new value will be an Integer representing the column index.
237      * @see AccessibleTable
238      */

239     public static final String JavaDoc ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED =
240     "accessibleTableColumnDescriptionChanged";
241
242     /**
243      * Constant used to indicate that the supported set of actions
244      * has changed. The old value in the PropertyChangeEvent will
245      * be an Integer representing the old number of actions supported
246      * and the new value will be an Integer representing the new
247      * number of actions supported.
248      * @see AccessibleAction
249      */

250     public static final String JavaDoc ACCESSIBLE_ACTION_PROPERTY =
251     "accessibleActionProperty";
252      
253     /**
254      * Constant used to indicate that a hypertext element has received focus.
255      * The old value in the PropertyChangeEvent will be an Integer
256      * representing the start index in the document of the previous element
257      * that had focus and the new value will be an Integer representing
258      * the start index in the document of the current element that has
259      * focus. A value of -1 indicates that an element does not or did
260      * not have focus.
261      * @see AccessibleHyperlink
262      */

263     public static final String JavaDoc ACCESSIBLE_HYPERTEXT_OFFSET =
264     "AccessibleHypertextOffset";
265
266     /**
267      * PropertyChangeEvent which indicates that text has changed.
268      * <br>
269      * For text insertion, the oldValue is null and the newValue
270      * is an AccessibleTextSequence specifying the text that was
271      * inserted.
272      * <br>
273      * For text deletion, the oldValue is an AccessibleTextSequence
274      * specifying the text that was deleted and the newValue is null.
275      * <br>
276      * For text replacement, the oldValue is an AccessibleTextSequence
277      * specifying the old text and the newValue is an AccessibleTextSequence
278      * specifying the new text.
279      *
280      * @see #getAccessibleText
281      * @see #addPropertyChangeListener
282      * @see #AccessibleText.AccessibleTextSequence
283      */

284     public static final String JavaDoc ACCESSIBLE_TEXT_PROPERTY
285         = "AccessibleText";
286  
287     /**
288      * PropertyChangeEvent which indicates that a significant change
289      * has occurred to the children of a component like a tree or text.
290      * This change notifies the event listener that it needs to
291      * reacquire the state of the subcomponents. The oldValue is
292      * null and the newValue is the component whose children have
293      * become invalid.
294      *
295      * @see #getAccessibleText
296      * @see #addPropertyChangeListener
297      * @see #AccessibleText.AccessibleTextSequence
298      *
299      * @since 1.5
300      */

301     public static final String JavaDoc ACCESSIBLE_INVALIDATE_CHILDREN =
302         "accessibleInvalidateChildren";
303  
304      /**
305      * PropertyChangeEvent which indicates that text attributes have changed.
306      * <br>
307      * For attribute insertion, the oldValue is null and the newValue
308      * is an AccessibleAttributeSequence specifying the attributes that were
309      * inserted.
310      * <br>
311      * For attribute deletion, the oldValue is an AccessibleAttributeSequence
312      * specifying the attributes that were deleted and the newValue is null.
313      * <br>
314      * For attribute replacement, the oldValue is an AccessibleAttributeSequence
315      * specifying the old attributes and the newValue is an
316      * AccessibleAttributeSequence specifying the new attributes.
317      *
318      * @see #getAccessibleText
319      * @see #addPropertyChangeListener
320      * @see #AccessibleText.AccessibleAttributeSequence
321      *
322      * @since 1.5
323      */

324     public static final String JavaDoc ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED =
325         "accessibleTextAttributesChanged";
326  
327    /**
328      * PropertyChangeEvent which indicates that a change has occurred
329      * in a component's bounds.
330      * The oldValue is the old component bounds and the newValue is
331      * the new component bounds.
332      *
333      * @see #addPropertyChangeListener
334      *
335      * @since 1.5
336      */

337     public static final String JavaDoc ACCESSIBLE_COMPONENT_BOUNDS_CHANGED =
338         "accessibleComponentBoundsChanged";
339  
340     /**
341      * The accessible parent of this object.
342      *
343      * @see #getAccessibleParent
344      * @see #setAccessibleParent
345      */

346     protected Accessible JavaDoc accessibleParent = null;
347
348     /**
349      * A localized String containing the name of the object.
350      *
351      * @see #getAccessibleName
352      * @see #setAccessibleName
353      */

354     protected String JavaDoc accessibleName = null;
355
356     /**
357      * A localized String containing the description of the object.
358      *
359      * @see #getAccessibleDescription
360      * @see #setAccessibleDescription
361      */

362     protected String JavaDoc accessibleDescription = null;
363
364     /**
365      * Used to handle the listener list for property change events.
366      *
367      * @see #addPropertyChangeListener
368      * @see #removePropertyChangeListener
369      * @see #firePropertyChangeListener
370      */

371     private PropertyChangeSupport JavaDoc accessibleChangeSupport = null;
372
373     /**
374      * Used to represent the context's relation set
375      * @see #getAccessibleRelationSet
376      */

377     private AccessibleRelationSet JavaDoc relationSet
378     = new AccessibleRelationSet JavaDoc();
379
380     /**
381      * Gets the accessibleName property of this object. The accessibleName
382      * property of an object is a localized String that designates the purpose
383      * of the object. For example, the accessibleName property of a label
384      * or button might be the text of the label or button itself. In the
385      * case of an object that doesn't display its name, the accessibleName
386      * should still be set. For example, in the case of a text field used
387      * to enter the name of a city, the accessibleName for the en_US locale
388      * could be 'city.'
389      *
390      * @return the localized name of the object; null if this
391      * object does not have a name
392      *
393      * @see #setAccessibleName
394      */

395     public String JavaDoc getAccessibleName() {
396     return accessibleName;
397     }
398     
399     /**
400      * Sets the localized accessible name of this object. Changing the
401      * name will cause a PropertyChangeEvent to be fired for the
402      * ACCESSIBLE_NAME_PROPERTY property.
403      *
404      * @param s the new localized name of the object.
405      *
406      * @see #getAccessibleName
407      * @see #addPropertyChangeListener
408      *
409      * @beaninfo
410      * preferred: true
411      * description: Sets the accessible name for the component.
412      */

413     public void setAccessibleName(String JavaDoc s) {
414     String JavaDoc oldName = accessibleName;
415     accessibleName = s;
416     firePropertyChange(ACCESSIBLE_NAME_PROPERTY,oldName,accessibleName);
417     }
418
419     /**
420      * Gets the accessibleDescription property of this object. The
421      * accessibleDescription property of this object is a short localized
422      * phrase describing the purpose of the object. For example, in the
423      * case of a 'Cancel' button, the accessibleDescription could be
424      * 'Ignore changes and close dialog box.'
425      *
426      * @return the localized description of the object; null if
427      * this object does not have a description
428      *
429      * @see #setAccessibleDescription
430      */

431     public String JavaDoc getAccessibleDescription() {
432     return accessibleDescription;
433     }
434
435     /**
436      * Sets the accessible description of this object. Changing the
437      * name will cause a PropertyChangeEvent to be fired for the
438      * ACCESSIBLE_DESCRIPTION_PROPERTY property.
439      *
440      * @param s the new localized description of the object
441      *
442      * @see #setAccessibleName
443      * @see #addPropertyChangeListener
444      *
445      * @beaninfo
446      * preferred: true
447      * description: Sets the accessible description for the component.
448      */

449     public void setAccessibleDescription(String JavaDoc s) {
450     String JavaDoc oldDescription = accessibleDescription;
451     accessibleDescription = s;
452     firePropertyChange(ACCESSIBLE_DESCRIPTION_PROPERTY,
453                oldDescription,accessibleDescription);
454     }
455
456     /**
457      * Gets the role of this object. The role of the object is the generic
458      * purpose or use of the class of this object. For example, the role
459      * of a push button is AccessibleRole.PUSH_BUTTON. The roles in
460      * AccessibleRole are provided so component developers can pick from
461      * a set of predefined roles. This enables assistive technologies to
462      * provide a consistent interface to various tweaked subclasses of
463      * components (e.g., use AccessibleRole.PUSH_BUTTON for all components
464      * that act like a push button) as well as distinguish between sublasses
465      * that behave differently (e.g., AccessibleRole.CHECK_BOX for check boxes
466      * and AccessibleRole.RADIO_BUTTON for radio buttons).
467      * <p>Note that the AccessibleRole class is also extensible, so
468      * custom component developers can define their own AccessibleRole's
469      * if the set of predefined roles is inadequate.
470      *
471      * @return an instance of AccessibleRole describing the role of the object
472      * @see AccessibleRole
473      */

474     public abstract AccessibleRole JavaDoc getAccessibleRole();
475     
476     /**
477      * Gets the state set of this object. The AccessibleStateSet of an object
478      * is composed of a set of unique AccessibleStates. A change in the
479      * AccessibleStateSet of an object will cause a PropertyChangeEvent to
480      * be fired for the ACCESSIBLE_STATE_PROPERTY property.
481      *
482      * @return an instance of AccessibleStateSet containing the
483      * current state set of the object
484      * @see AccessibleStateSet
485      * @see AccessibleState
486      * @see #addPropertyChangeListener
487      */

488     public abstract AccessibleStateSet JavaDoc getAccessibleStateSet();
489
490     /**
491      * Gets the Accessible parent of this object.
492      *
493      * @return the Accessible parent of this object; null if this
494      * object does not have an Accessible parent
495      */

496     public Accessible JavaDoc getAccessibleParent() {
497     return accessibleParent;
498     }
499
500     /**
501      * Sets the Accessible parent of this object. This is meant to be used
502      * only in the situations where the actual component's parent should
503      * not be treated as the component's accessible parent and is a method
504      * that should only be called by the parent of the accessible child.
505      *
506      * @param a - Accessible to be set as the parent
507      */

508     public void setAccessibleParent(Accessible JavaDoc a) {
509         accessibleParent = a;
510     }
511
512     /**
513      * Gets the 0-based index of this object in its accessible parent.
514      *
515      * @return the 0-based index of this object in its parent; -1 if this
516      * object does not have an accessible parent.
517      *
518      * @see #getAccessibleParent
519      * @see #getAccessibleChildrenCount
520      * @see #getAccessibleChild
521      */

522     public abstract int getAccessibleIndexInParent();
523
524     /**
525      * Returns the number of accessible children of the object.
526      *
527      * @return the number of accessible children of the object.
528      */

529     public abstract int getAccessibleChildrenCount();
530
531     /**
532      * Returns the specified Accessible child of the object. The Accessible
533      * children of an Accessible object are zero-based, so the first child
534      * of an Accessible child is at index 0, the second child is at index 1,
535      * and so on.
536      *
537      * @param i zero-based index of child
538      * @return the Accessible child of the object
539      * @see #getAccessibleChildrenCount
540      */

541     public abstract Accessible JavaDoc getAccessibleChild(int i);
542
543     /**
544      * Gets the locale of the component. If the component does not have a
545      * locale, then the locale of its parent is returned.
546      *
547      * @return this component's locale. If this component does not have
548      * a locale, the locale of its parent is returned.
549      *
550      * @exception IllegalComponentStateException
551      * If the Component does not have its own locale and has not yet been
552      * added to a containment hierarchy such that the locale can be
553      * determined from the containing parent.
554      */

555     public abstract Locale JavaDoc getLocale() throws IllegalComponentStateException JavaDoc;
556
557     /**
558      * Adds a PropertyChangeListener to the listener list.
559      * The listener is registered for all Accessible properties and will
560      * be called when those properties change.
561      *
562      * @see #ACCESSIBLE_NAME_PROPERTY
563      * @see #ACCESSIBLE_DESCRIPTION_PROPERTY
564      * @see #ACCESSIBLE_STATE_PROPERTY
565      * @see #ACCESSIBLE_VALUE_PROPERTY
566      * @see #ACCESSIBLE_SELECTION_PROPERTY
567      * @see #ACCESSIBLE_TEXT_PROPERTY
568      * @see #ACCESSIBLE_VISIBLE_DATA_PROPERTY
569      *
570      * @param listener The PropertyChangeListener to be added
571      */

572     public void addPropertyChangeListener(PropertyChangeListener JavaDoc listener) {
573         if (accessibleChangeSupport == null) {
574             accessibleChangeSupport = new PropertyChangeSupport JavaDoc(this);
575         }
576         accessibleChangeSupport.addPropertyChangeListener(listener);
577     }
578
579     /**
580      * Removes a PropertyChangeListener from the listener list.
581      * This removes a PropertyChangeListener that was registered
582      * for all properties.
583      *
584      * @param listener The PropertyChangeListener to be removed
585      */

586     public void removePropertyChangeListener(PropertyChangeListener JavaDoc listener) {
587         if (accessibleChangeSupport != null) {
588             accessibleChangeSupport.removePropertyChangeListener(listener);
589         }
590     }
591
592     /**
593      * Gets the AccessibleAction associated with this object that supports
594      * one or more actions.
595      *
596      * @return AccessibleAction if supported by object; else return null
597      * @see AccessibleAction
598      */

599     public AccessibleAction JavaDoc getAccessibleAction() {
600     return null;
601     }
602
603     /**
604      * Gets the AccessibleComponent associated with this object that has a
605      * graphical representation.
606      *
607      * @return AccessibleComponent if supported by object; else return null
608      * @see AccessibleComponent
609      */

610     public AccessibleComponent JavaDoc getAccessibleComponent() {
611     return null;
612     }
613
614     /**
615      * Gets the AccessibleSelection associated with this object which allows its
616      * Accessible children to be selected.
617      *
618      * @return AccessibleSelection if supported by object; else return null
619      * @see AccessibleSelection
620      */

621     public AccessibleSelection JavaDoc getAccessibleSelection() {
622     return null;
623     }
624
625     /**
626      * Gets the AccessibleText associated with this object presenting
627      * text on the display.
628      *
629      * @return AccessibleText if supported by object; else return null
630      * @see AccessibleText
631      */

632     public AccessibleText JavaDoc getAccessibleText() {
633     return null;
634     }
635
636     /**
637      * Gets the AccessibleEditableText associated with this object
638      * presenting editable text on the display.
639      *
640      * @return AccessibleEditableText if supported by object; else return null
641      * @see AccessibleEditableText
642      */

643     public AccessibleEditableText JavaDoc getAccessibleEditableText() {
644     return null;
645     }
646
647
648     /**
649      * Gets the AccessibleValue associated with this object that supports a
650      * Numerical value.
651      *
652      * @return AccessibleValue if supported by object; else return null
653      * @see AccessibleValue
654      */

655     public AccessibleValue JavaDoc getAccessibleValue() {
656     return null;
657     }
658
659     /**
660      * Gets the AccessibleIcons associated with an object that has
661      * one or more associated icons
662      *
663      * @return an array of AccessibleIcon if supported by object;
664      * otherwise return null
665      * @see AccessibleIcon
666      */

667     public AccessibleIcon JavaDoc [] getAccessibleIcon() {
668     return null;
669     }
670
671     /**
672      * Gets the AccessibleRelationSet associated with an object
673      *
674      * @return an AccessibleRelationSet if supported by object;
675      * otherwise return null
676      * @see AccessibleRelationSet
677      */

678     public AccessibleRelationSet JavaDoc getAccessibleRelationSet() {
679     return relationSet;
680     }
681
682     /**
683      * Gets the AccessibleTable associated with an object
684      *
685      * @return an AccessibleTable if supported by object;
686      * otherwise return null
687      * @see AccessibleTable
688      */

689     public AccessibleTable JavaDoc getAccessibleTable() {
690     return null;
691     }
692
693     /**
694      * Support for reporting bound property changes. If oldValue and
695      * newValue are not equal and the PropertyChangeEvent listener list
696      * is not empty, then fire a PropertyChange event to each listener.
697      * In general, this is for use by the Accessible objects themselves
698      * and should not be called by an application program.
699      * @param propertyName The programmatic name of the property that
700      * was changed.
701      * @param oldValue The old value of the property.
702      * @param newValue The new value of the property.
703      * @see java.beans.PropertyChangeSupport
704      * @see #addPropertyChangeListener
705      * @see #removePropertyChangeListener
706      * @see #ACCESSIBLE_NAME_PROPERTY
707      * @see #ACCESSIBLE_DESCRIPTION_PROPERTY
708      * @see #ACCESSIBLE_STATE_PROPERTY
709      * @see #ACCESSIBLE_VALUE_PROPERTY
710      * @see #ACCESSIBLE_SELECTION_PROPERTY
711      * @see #ACCESSIBLE_TEXT_PROPERTY
712      * @see #ACCESSIBLE_VISIBLE_DATA_PROPERTY
713      */

714     public void firePropertyChange(String JavaDoc propertyName,
715                    Object JavaDoc oldValue,
716                    Object JavaDoc newValue) {
717         if (accessibleChangeSupport != null) {
718         if (newValue instanceof PropertyChangeEvent JavaDoc) {
719         PropertyChangeEvent JavaDoc pce = (PropertyChangeEvent JavaDoc)newValue;
720         accessibleChangeSupport.firePropertyChange(pce);
721         } else {
722         accessibleChangeSupport.firePropertyChange(propertyName,
723                                oldValue,
724                                newValue);
725         }
726     }
727     }
728 }
729
Popular Tags