Example usage for javax.accessibility AccessibleHyperlink getAccessibleActionDescription

List of usage examples for javax.accessibility AccessibleHyperlink getAccessibleActionDescription

Introduction

In this page you can find the example usage for javax.accessibility AccessibleHyperlink getAccessibleActionDescription.

Prototype

public abstract String getAccessibleActionDescription(int i);

Source Link

Document

Returns a string description of this particular link action.

Usage

From source file:MainClass.java

void dumpHypertextInfo(AccessibleContext ac) {
    AccessibleText at = ac.getAccessibleText();

    AccessibleHypertext ah = null;
    if (at instanceof AccessibleHypertext)
        ah = (AccessibleHypertext) at;

    if (ah != null) {
        int nLinks = ah.getLinkCount();

        for (int i = 0; i < nLinks; i++) {
            AccessibleHyperlink ahl = ah.getLink(i);

            int nActions = ahl.getAccessibleActionCount();

            for (int j = 0; j < nActions; j++) {
                String s = ahl.getAccessibleActionDescription(j);
                System.out.println("Action = " + s);
            }//from  w ww.  j  av a  2  s.  co  m
        }
        return;
    }

    int nChildren = ac.getAccessibleChildrenCount();

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