本文整理汇总了Java中javax.accessibility.AccessibleRole.LIST属性的典型用法代码示例。如果您正苦于以下问题:Java AccessibleRole.LIST属性的具体用法?Java AccessibleRole.LIST怎么用?Java AccessibleRole.LIST使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.accessibility.AccessibleRole
的用法示例。
在下文中一共展示了AccessibleRole.LIST属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeListeners
/**
* Removes PropertyChange listeners for the given AccessibleContext
* object, its children (so long as the object isn't of TRANSIENT
* state).
*
* @param a the Accessible object to remove listeners from
*/
private void removeListeners(AccessibleContext ac) {
if (ac != null) {
// Listeners are not added to transient components.
AccessibleStateSet states = ac.getAccessibleStateSet();
if (!states.contains(AccessibleState.TRANSIENT)) {
ac.removePropertyChangeListener(this);
/*
* Listeners are not added to transient children. Components
* with transient children should return an AccessibleStateSet
* containing AccessibleState.MANAGES_DESCENDANTS. Components
* may not explicitly return the MANAGES_DESCENDANTS state.
* In this case, don't remove listeners from the children of
* lists, tables and trees.
*/
if (states.contains(AccessibleState.MANAGES_DESCENDANTS)) {
return;
}
AccessibleRole role = ac.getAccessibleRole();
if ( role == AccessibleRole.LIST ||
role == AccessibleRole.TABLE ||
role == AccessibleRole.TREE ) {
return;
}
int count = ac.getAccessibleChildrenCount();
for (int i = 0; i < count; i++) {
Accessible child = ac.getAccessibleChild(i);
if (child != null) {
removeListeners(child);
}
}
}
}
}
示例2: getAccessibleRole
public AccessibleRole getAccessibleRole() {
return AccessibleRole.LIST;
}
示例3: getAccessibleRole
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.LIST;
}
示例4: getAccessibleRole
@Override
public AccessibleRole getAccessibleRole() {
return AccessibleRole.LIST;
}
示例5: getAccessibleRole
/**
* Returns the accessible role for <code>JList</code>,
* {@link AccessibleRole#LIST}.
*
* @return the accessible role for <code>JList</code>
*/
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.LIST;
}