Example usage for javax.accessibility AccessibleAction getAccessibleActionCount

List of usage examples for javax.accessibility AccessibleAction getAccessibleActionCount

Introduction

In this page you can find the example usage for javax.accessibility AccessibleAction getAccessibleActionCount.

Prototype

public int getAccessibleActionCount();

Source Link

Document

Returns the number of accessible actions available in this object If there are more than one, the first one is considered the "default" action of the object.

Usage

From source file:MainClass.java

void dumpActionInfo(AccessibleContext ac) {
    AccessibleAction aa = ac.getAccessibleAction();

    if (aa != null) {
        String s = ac.getAccessibleName();
        System.out.println(s);/*  w  ww. j  a  v  a 2  s.  c om*/

        int count = aa.getAccessibleActionCount();

        for (int i = 0; i < count; i++) {
            s = aa.getAccessibleActionDescription(i);
            System.out.println("Description = " + s);
        }
    }

    int nChildren = ac.getAccessibleChildrenCount();

    for (int i = 0; i < nChildren; i++)
        dumpActionInfo(ac.getAccessibleChild(i).getAccessibleContext());
}