当前位置: 首页>>代码示例>>Java>>正文


Java AccessibleRole.LIST属性代码示例

本文整理汇总了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);
                }
            }
        }
    }
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:41,代码来源:AccessibilityEventMonitor.java

示例2: getAccessibleRole

public AccessibleRole getAccessibleRole() {
    return AccessibleRole.LIST;
}
 
开发者ID:ajmath,项目名称:VASSAL-src,代码行数:3,代码来源:InstructionsPanel.java

示例3: getAccessibleRole

public AccessibleRole getAccessibleRole()
{
  return AccessibleRole.LIST;
}
 
开发者ID:vilie,项目名称:javify,代码行数:4,代码来源:List.java

示例4: getAccessibleRole

@Override
public AccessibleRole getAccessibleRole() {
    return AccessibleRole.LIST;
}
 
开发者ID:mike10004,项目名称:appengine-imaging,代码行数:4,代码来源:List.java

示例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;
}
 
开发者ID:vilie,项目名称:javify,代码行数:10,代码来源:JList.java


注:本文中的javax.accessibility.AccessibleRole.LIST属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。