Example usage for javax.accessibility AccessibleContext getAccessibleIcon

List of usage examples for javax.accessibility AccessibleContext getAccessibleIcon

Introduction

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

Prototype

public AccessibleIcon[] getAccessibleIcon() 

Source Link

Document

Gets the AccessibleIcons associated with an object that has one or more associated icons.

Usage

From source file:MainClass.java

void dumpIconInfo(AccessibleContext ac) {
    AccessibleIcon[] ai = ac.getAccessibleIcon();

    if (ai != null) {
        for (int i = 0; i < ai.length; i++) {
            String s = ai[i].getAccessibleIconDescription();
            System.out.println("Description = " + s);
            System.out.println("Width = " + ai[i].getAccessibleIconWidth());
            System.out.println("height = " + ai[i].getAccessibleIconHeight());
        }/*www  . j a va2s .co m*/
        return;
    }
    int nChildren = ac.getAccessibleChildrenCount();

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