protected class JMenuBar.AccessibleJMenuBar extends JComponent.AccessibleJComponent implements AccessibleSelection
JMenuBar
类。
它提供了适用于菜单栏用户界面元素的Java Accessibility API的实现。
警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,对所有JavaBeans的长期存储的支持已经添加到java.beans
包中。 请参阅XMLEncoder
。
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
accessibleFocusHandler
accessibleContainerHandler
accessibleAWTComponentHandler, accessibleAWTFocusHandler
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_COMPONENT_BOUNDS_CHANGED, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_HYPERTEXT_OFFSET, ACCESSIBLE_INVALIDATE_CHILDREN, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
Modifier | Constructor and Description |
---|---|
protected |
AccessibleJMenuBar() |
Modifier and Type | Method and Description |
---|---|
void |
addAccessibleSelection(int i)
选择菜单栏中的第n个菜单,强制弹出。
|
void |
clearAccessibleSelection()
清除对象中的选择,以便选择对象中的任何内容。
|
AccessibleRole |
getAccessibleRole()
获取此对象的角色。
|
AccessibleSelection |
getAccessibleSelection()
获取与此对象关联的AccessibleSelection。
|
Accessible |
getAccessibleSelection(int i)
如果选择了一个菜单,返回当前选择的菜单,否则返回null。
|
int |
getAccessibleSelectionCount()
如果当前在此菜单栏中选择菜单,则返回1。
|
AccessibleStateSet |
getAccessibleStateSet()
获取此对象的可访问状态集。
|
boolean |
isAccessibleChildSelected(int i)
如果选择此对象的当前子级,则返回true。
|
void |
removeAccessibleSelection(int i)
从对象的选择中删除对象中第n个选定的项目。
|
void |
selectAllAccessibleSelection()
如果对象支持多个选择,通常会导致选择对象中的每个选定项目。
|
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleKeyBinding, getAccessibleName, getBorderTitle, getTitledBorderText, getToolTipText, removePropertyChangeListener
getAccessibleAt
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
firePropertyChange, getAccessibleAction, getAccessibleEditableText, getAccessibleIcon, getAccessibleRelationSet, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addFocusListener, contains, getAccessibleAt, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
public AccessibleStateSet getAccessibleStateSet()
getAccessibleStateSet
在
JComponent.AccessibleJComponent
AccessibleState
public AccessibleRole getAccessibleRole()
getAccessibleRole
在
JComponent.AccessibleJComponent
AccessibleRole
public AccessibleSelection getAccessibleSelection()
getAccessibleSelection
在
AccessibleContext
AccessibleSelection
public int getAccessibleSelectionCount()
getAccessibleSelectionCount
在界面
AccessibleSelection
public Accessible getAccessibleSelection(int i)
getAccessibleSelection
在界面
AccessibleSelection
i
- 所选子女的从零开始的索引
AccessibleSelection.getAccessibleSelectionCount()
public boolean isAccessibleChildSelected(int i)
isAccessibleChildSelected
在界面
AccessibleSelection
i
- 此Accessible对象
i
的从零开始的索引。
AccessibleContext.getAccessibleChild(int)
public void addAccessibleSelection(int i)
addAccessibleSelection
在接口
AccessibleSelection
i
- 可选项目的零基索引
getAccessibleStateSet()
public void removeAccessibleSelection(int i)
removeAccessibleSelection
在界面
AccessibleSelection
i
- 可选项目的从零开始的索引
AccessibleContext.getAccessibleChild(int)
public void clearAccessibleSelection()
clearAccessibleSelection
在界面
AccessibleSelection
public void selectAllAccessibleSelection()
selectAllAccessibleSelection
在界面
AccessibleSelection
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.