📄 accessiblecontext.java
字号:
/* AccessibleContext.java -- the context of an accessible object Copyright (C) 2002 Free Software FoundationThis file is part of GNU Classpath.GNU Classpath is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version.GNU Classpath is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU Classpath; see the file COPYING. If not, write to theFree Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307 USA.Linking this library statically or dynamically with other modules ismaking a combined work based on this library. Thus, the terms andconditions of the GNU General Public License cover the wholecombination.As a special exception, the copyright holders of this library give youpermission to link this library with independent modules to produce anexecutable, regardless of the license terms of these independentmodules, and to copy and distribute the resulting executable underterms of your choice, provided that you also meet, for each linkedindependent module, the terms and conditions of the license of thatmodule. An independent module is a module which is not derived fromor based on this library. If you modify this library, you may extendthis exception to your version of the library, but you are notobligated to do so. If you do not wish to do so, delete thisexception statement from your version. */package javax.accessibility;import java.beans.PropertyChangeListener;import java.beans.PropertyChangeSupport;import java.util.Locale;/** * The minimum information that all accessible objects return. This includes * name, description, role, and state of the object, parents and children, * and any other useful information. If a component supports further details, * it should implement one of the following:<ul> * <li>{@link AccessibleAction} - the object can perform actions</li> * <li>{@link AccessibleComponent} - the object has a graphical * representation</li> * <li>{@link AccessibleSelection} - the object allows its children to be * selected</li> * <li>{@link AccessibleText} - the object represents editable text</li> * <li>{@link AccessibleValue} - the object represents a numerical value</li> * </ul> * * @author Eric Blake <ebb9@email.byu.edu> * @since 1.2 * @status updated to 1.4 */public abstract class AccessibleContext{ /** * Constant used when the accessible name has changed. Both the old and new * values are listed in the event. * * @see #getAccessibleName() * @see #addPropertyChangeListener(PropertyChangeListener) */ public static final String ACCESSIBLE_NAME_PROPERTY = "AccessibleName"; /** * Constanat used when the accessible description has changed. Both the old * and new values are listed in the event. * * @see #getAccessibleDescription() * @see #addPropertyChangeListener(PropertyChangeListener) */ public static final String ACCESSIBLE_DESCRIPTION_PROPERTY = "AccessibleDescription"; /** * Constant used when the accessibleStateSet has changed. Both the old and * new values are listed in the event, although either may be null if a * state was disabled at that time. * * @see #getAccessibleStateSet() * @see AccessibleState * @see AccessibleStateSet * @see #addPropertyChangeListener(PropertyChangeListener) */ public static final String ACCESSIBLE_STATE_PROPERTY = "AccessibleState"; /** * Constant used when the accessibleValue has changed. Both the old and new * values are listed in the event. * * @see #getAccessibleValue() * @see #addPropertyChangeListener(PropertyChangeListener) */ public static final String ACCESSIBLE_VALUE_PROPERTY = "AccessibleValue"; /** * Constant used when the accessibleSelection has changed. Both the old and * new values of the event are reserved for future use. * * @see #getAccessibleSelection() * @see #addPropertyChangeListener(PropertyChangeListener) */ public static final String ACCESSIBLE_SELECTION_PROPERTY = "AccessibleSelection"; /** * Constant used when the accessibleText has changed. Both the old and new * values of the event are reserved for future use. * * @see #getAccessibleText() * @see #addPropertyChangeListener(PropertyChangeListener) */ public static final String ACCESSIBLE_TEXT_PROPERTY = "AccessibleText"; /** * Constant used when the accessibleText caret has changed. Both the old and * new values are listed in the event. * * @see #addPropertyChangeListener(PropertyChangeListener) */ public static final String ACCESSIBLE_CARET_PROPERTY = "AccessibleCaret"; /** * Constant used when the visible data has changed. Both the old and new * values of the event are reserved for future use. * * @see #addPropertyChangeListener(PropertyChangeListener) */ public static final String ACCESSIBLE_VISIBLE_DATA_PROPERTY = "AccessibleVisibleData"; /** * Constant used when children are added or removed. On addition, the new * value of the event holds the new child; on removal, the old value holds * the removed child. * * @see #addPropertyChangeListener(PropertyChangeListener) */ public static final String ACCESSIBLE_CHILD_PROPERTY = "AccessibleChild"; /** * Constant used when active descendent of a component has changed. Both * the old and new values are listed in the event. * * @see #addPropertyChangeListener(PropertyChangeListener) */ public static final String ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY = "AccessibleActiveDescendant"; /** * Constant used when the accessible table caption has changed. Both the * old and new values are listed in the event. * * @see Accessible * @see AccessibleTable */ public static final String ACCESSIBLE_TABLE_CAPTION_CHANGED = "accessibleTableCaptionChanged"; /** * Constant used when the accessible table summary has changed. Both the * old and new values are listed in the event. * * @see Accessible * @see AccessibleTable */ public static final String ACCESSIBLE_TABLE_SUMMARY_CHANGED = "accessibleTableSummaryChanged"; /** * Constant used when the accessible table model has changed. Only the new * value of the event has meaning. * * @see AccessibleTable * @see AccessibleTableModelChange */ public static final String ACCESSIBLE_TABLE_MODEL_CHANGED = "accessibleTableModelChanged"; /** * Constant used when the accessible table row header has changed. Only the * new value of the event has meaning. * * @see AccessibleTable * @see AccessibleTableModelChange */ public static final String ACCESSIBLE_TABLE_ROW_HEADER_CHANGED = "accessibleTableRowHeaderChanged"; /** * Constant used when the accessible table row description has changed. Only * the new value of the event has meaning. * * @see AccessibleTable */ public static final String ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED = "accessibleTableRowDescriptionChanged"; /** * Constant used when the accessible table column header has changed. Only * the new value of the event has meaning. * * @see AccessibleTable * @see AccessibleTableModelChange */ public static final String ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED = "accessibleTableColumnHeaderChanged"; /** * Constant used when the accessible table column description has changed. * Only the new value of the event has meaning. * * @see AccessibleTable */ public static final String ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED = "accessibleTableColumnDescriptionChanged"; /** * Constant used when supported set of actions has changed. Both the old * and new values are listed in the event. * * @see AccessibleAction */ public static final String ACCESSIBLE_ACTION_PROPERTY = "accessibleActionProperty"; /** * Constant used when a hypertext element received focus. Both the old * and new values are listed in the event, with -1 indicating that no link * had focus. * * @see AccessibleHyperlink */ public static final String ACCESSIBLE_HYPERTEXT_OFFSET = "AccessibleHypertextOffset"; /** * The accessible parent of this object. * * @see #getAccessibleParent() * @see #setAccessibleParent(Accessible) */ protected Accessible accessibleParent; /** * A localized string naming this object. * * @see #getAccessibleName() * @see #setAccessibleName(String) */ protected String accessibleName; /** * A localized string describing this object. * * @see #getAccessibleDescription() * @see #setAccessibleDescription(String) */ protected String accessibleDescription; /** * The listener tool. * * @see #addPropertyChangeListener(PropertyChangeListener) * @see #removePropertyChangeListener(PropertyChangeListener) * @see #firePropertyChange(String, Object, Object) */ private final PropertyChangeSupport listeners = new PropertyChangeSupport(this); /** * Default constructor. */ public AccessibleContext() { } /** * Get the localized name of the object. For example, a label may just * return the text of the label, while an entry field for city may return * "city" in en_US.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -