List of usage examples for javax.accessibility AccessibleContext getAccessibleName
public String getAccessibleName()
From source file:MainClass.java
void dumpInfo(AccessibleContext ac) { System.out.println("Name = " + ac.getAccessibleName()); System.out.println("Description = " + ac.getAccessibleDescription()); int nChildren = ac.getAccessibleChildrenCount(); for (int i = 0; i < nChildren; i++) dumpInfo(ac.getAccessibleChild(i).getAccessibleContext()); }
From source file:MainClass.java
void dumpSelectionInfo(AccessibleContext ac) { AccessibleSelection as = ac.getAccessibleSelection(); if (as != null) { int count = as.getAccessibleSelectionCount(); for (int i = 0; i < count; i++) { Accessible a = as.getAccessibleSelection(i); AccessibleContext ac2 = a.getAccessibleContext(); String s = ac2.getAccessibleName(); System.out.println("Name = " + s); }/*from w ww. ja v a 2 s . c o m*/ return; } int nChildren = ac.getAccessibleChildrenCount(); for (int i = 0; i < nChildren; i++) dumpSelectionInfo(ac.getAccessibleChild(i).getAccessibleContext()); }
From source file:MainClass.java
void dumpComponentInfo(AccessibleContext ac) { AccessibleComponent ax = ac.getAccessibleComponent(); if (ax != null) { String s = ac.getAccessibleName(); if (s != null && s.equals("OK")) { System.out.println("Background color: " + ax.getBackground()); System.out.println("Cursor: " + ax.getCursor()); Cursor c = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR); ax.setCursor(c);/* ww w . j av a 2 s . com*/ System.out.println("Foreground color: " + ax.getForeground()); System.out.println("Location: " + ax.getLocationOnScreen()); } } int nChildren = ac.getAccessibleChildrenCount(); for (int i = 0; i < nChildren; i++) dumpComponentInfo(ac.getAccessibleChild(i).getAccessibleContext()); }
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 www. j av a 2 s . co 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()); }