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