Example usage for javax.accessibility AccessibleContext getAccessibleAction

List of usage examples for javax.accessibility AccessibleContext getAccessibleAction

Introduction

In this page you can find the example usage for javax.accessibility AccessibleContext getAccessibleAction.

Prototype

public AccessibleAction getAccessibleAction() 

Source Link

Document

Gets the AccessibleAction associated with this object that supports one or more actions.

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);/*from  w  w w .  j  a v  a 2s .  c  o  m*/

        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());
}