< prev index next >
src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java
Print this page
*** 158,168 ****
// start in a new thread
Thread abthread = new Thread(new dllRunner());
abthread.setDaemon(true);
abthread.start();
! debugString("AccessBridge started");
}
/*
* adaptor to run the AccessBridge DLL
*/
--- 158,168 ----
// start in a new thread
Thread abthread = new Thread(new dllRunner());
abthread.setDaemon(true);
abthread.start();
! debugString("[INFO]:AccessBridge started");
}
/*
* adaptor to run the AccessBridge DLL
*/
*** 176,186 ****
* shutdown hook
*/
private class shutdownHook implements Runnable {
public void run() {
! debugString("***** shutdownHook: shutting down...");
javaShutdown();
}
}
--- 176,186 ----
* shutdown hook
*/
private class shutdownHook implements Runnable {
public void run() {
! debugString("[INFO]:***** shutdownHook: shutting down...");
javaShutdown();
}
}
*** 295,305 ****
integerParemter[0] = Integer.TYPE;
Class<?>[] componentParemter = new Class<?>[1];
try {
componentParemter[0] = Class.forName("java.awt.Component");
} catch (ClassNotFoundException e) {
! debugString("Exception: " + e.toString());
}
toolkit = Toolkit.getDefaultToolkit();
return;
}
--- 295,305 ----
integerParemter[0] = Integer.TYPE;
Class<?>[] componentParemter = new Class<?>[1];
try {
componentParemter[0] = Class.forName("java.awt.Component");
} catch (ClassNotFoundException e) {
! debugString("[ERROR]:Exception: " + e.toString());
}
toolkit = Toolkit.getDefaultToolkit();
return;
}
*** 384,399 ****
/*
* saves the mapping between an AccessibleContext and a window handle
*/
private void saveContextToWindowHandleMapping(AccessibleContext ac,
int nativeHandle) {
! debugString("saveContextToWindowHandleMapping...");
if (ac == null) {
return;
}
if (! contextToWindowHandleMap.containsKey(ac)) {
! debugString("saveContextToWindowHandleMapping: ac = "+ac+"; handle = "+nativeHandle);
contextToWindowHandleMap.put(ac, nativeHandle);
}
}
/**
--- 384,399 ----
/*
* saves the mapping between an AccessibleContext and a window handle
*/
private void saveContextToWindowHandleMapping(AccessibleContext ac,
int nativeHandle) {
! debugString("[INFO]:saveContextToWindowHandleMapping...");
if (ac == null) {
return;
}
if (! contextToWindowHandleMap.containsKey(ac)) {
! debugString("[INFO]: saveContextToWindowHandleMapping: ac = "+ac+"; handle = "+nativeHandle);
contextToWindowHandleMap.put(ac, nativeHandle);
}
}
/**
*** 432,442 ****
/**
* maps an AccessibleContext to a native window handle
* returns 0 on error
*/
private int getNativeWindowHandleFromContext(AccessibleContext ac) {
! debugString("getNativeWindowHandleFromContext: ac = "+ac);
try {
return contextToWindowHandleMap.get(ac);
} catch (Exception ex) {
return 0;
}
--- 432,442 ----
/**
* maps an AccessibleContext to a native window handle
* returns 0 on error
*/
private int getNativeWindowHandleFromContext(AccessibleContext ac) {
! debugString("[INFO]: getNativeWindowHandleFromContext: ac = "+ac);
try {
return contextToWindowHandleMap.get(ac);
} catch (Exception ex) {
return 0;
}
*** 513,523 ****
/*
* StarOffice version that does not use the EventQueueMonitor
*/
private AccessibleContext getAccessibleContextAt_1(final int x, final int y,
final AccessibleContext parent) {
! debugString(" : getAccessibleContextAt_1 called");
debugString(" -> x = " + x + " y = " + y + " parent = " + parent);
if (parent == null) return null;
final AccessibleComponent acmp = InvocationUtils.invokeAndWait(new Callable<AccessibleComponent>() {
@Override
--- 513,523 ----
/*
* StarOffice version that does not use the EventQueueMonitor
*/
private AccessibleContext getAccessibleContextAt_1(final int x, final int y,
final AccessibleContext parent) {
! debugString("[INFO]: getAccessibleContextAt_1 called");
debugString(" -> x = " + x + " y = " + y + " parent = " + parent);
if (parent == null) return null;
final AccessibleComponent acmp = InvocationUtils.invokeAndWait(new Callable<AccessibleComponent>() {
@Override
*** 561,581 ****
/*
* AWT/Swing version
*/
private AccessibleContext getAccessibleContextAt_2(final int x, final int y,
AccessibleContext parent) {
! debugString("getAccessibleContextAt_2 called");
debugString(" -> x = " + x + " y = " + y + " parent = " + parent);
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
@Override
public AccessibleContext call() throws Exception {
Accessible a = EventQueueMonitor.getAccessibleAt(new Point(x, y));
if (a != null) {
AccessibleContext childAC = a.getAccessibleContext();
if (childAC != null) {
! debugString(" returning childAC = " + childAC);
return childAC;
}
}
return null;
}
--- 561,581 ----
/*
* AWT/Swing version
*/
private AccessibleContext getAccessibleContextAt_2(final int x, final int y,
AccessibleContext parent) {
! debugString("[INFO]: getAccessibleContextAt_2 called");
debugString(" -> x = " + x + " y = " + y + " parent = " + parent);
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
@Override
public AccessibleContext call() throws Exception {
Accessible a = EventQueueMonitor.getAccessibleAt(new Point(x, y));
if (a != null) {
AccessibleContext childAC = a.getAccessibleContext();
if (childAC != null) {
! debugString("[INFO]: returning childAC = " + childAC);
return childAC;
}
}
return null;
}
*** 606,632 ****
/**
* returns the AccessibleName from an AccessibleContext
*/
private String getAccessibleNameFromContext(final AccessibleContext ac) {
! debugString("***** ac = "+ac.getClass());
if (ac != null) {
String s = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return ac.getAccessibleName();
}
}, ac);
if (s != null) {
references.increment(s);
! debugString("Returning AccessibleName from Context: " + s);
return s;
} else {
return null;
}
} else {
! debugString("getAccessibleNameFromContext; ac = null!");
return null;
}
}
/**
--- 606,632 ----
/**
* returns the AccessibleName from an AccessibleContext
*/
private String getAccessibleNameFromContext(final AccessibleContext ac) {
! debugString("[INFO]: ***** ac = "+ac.getClass());
if (ac != null) {
String s = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return ac.getAccessibleName();
}
}, ac);
if (s != null) {
references.increment(s);
! debugString("[INFO]: Returning AccessibleName from Context: " + s);
return s;
} else {
return null;
}
} else {
! debugString("[INFO]: getAccessibleNameFromContext; ac = null!");
return null;
}
}
/**
*** 647,673 ****
public String call() throws Exception {
return ac.getAccessibleName();
}
}, ac);
if ( ( null != nameString ) && ( 0 != nameString.length () ) ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleName.");
references.increment (nameString);
return nameString;
}
String descriptionString = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return ac.getAccessibleDescription();
}
}, ac);
if ( ( null != descriptionString ) && ( 0 != descriptionString.length () ) ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleDescription.");
references.increment (descriptionString);
return descriptionString;
}
! debugString ("The Virtual Accessible Name was not found using AccessibleContext::getAccessibleDescription. or getAccessibleName");
/*
Step 2:
=======
Decide whether the extended name search algorithm should be
used for this object.
--- 647,673 ----
public String call() throws Exception {
return ac.getAccessibleName();
}
}, ac);
if ( ( null != nameString ) && ( 0 != nameString.length () ) ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleName.");
references.increment (nameString);
return nameString;
}
String descriptionString = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return ac.getAccessibleDescription();
}
}, ac);
if ( ( null != descriptionString ) && ( 0 != descriptionString.length () ) ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from AccessibleContext::getAccessibleDescription.");
references.increment (descriptionString);
return descriptionString;
}
! debugString ("[WARN]: The Virtual Accessible Name was not found using AccessibleContext::getAccessibleDescription. or getAccessibleName");
/*
Step 2:
=======
Decide whether the extended name search algorithm should be
used for this object.
*** 700,710 ****
}
}
}
if (false == bExtendedSearch) {
! debugString ("bk -- getVirtualAccessibleNameFromContext will not use the extended name search algorithm. role = " + ( role != null ? role.toDisplayString(Locale.US) : "null") );
/*
Step 3:
=======
We have determined that we should not use the extended name
search algorithm for this object (we must obtain the name of
--- 700,710 ----
}
}
}
if (false == bExtendedSearch) {
! debugString ("[INFO]: bk -- getVirtualAccessibleNameFromContext will not use the extended name search algorithm. role = " + ( role != null ? role.toDisplayString(Locale.US) : "null") );
/*
Step 3:
=======
We have determined that we should not use the extended name
search algorithm for this object (we must obtain the name of
*** 733,751 ****
return at.getCharCount();
}
}, ac);
String text = getAccessibleTextRangeFromContext (ac, 0, charCount);
if (null != text) {
! debugString ("bk -- The Virtual Accessible Name was obtained from the Accessible Text of the LABEL object.");
references.increment (text);
return text;
}
}
/*
Does the label support the Accessible Icon Interface?
*/
! debugString ("bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information.");
final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
@Override
public AccessibleIcon[] call() throws Exception {
return ac.getAccessibleIcon();
}
--- 733,751 ----
return at.getCharCount();
}
}, ac);
String text = getAccessibleTextRangeFromContext (ac, 0, charCount);
if (null != text) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the Accessible Text of the LABEL object.");
references.increment (text);
return text;
}
}
/*
Does the label support the Accessible Icon Interface?
*/
! debugString ("[INFO]: bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information.");
final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
@Override
public AccessibleIcon[] call() throws Exception {
return ac.getAccessibleIcon();
}
*** 756,766 ****
public String call() throws Exception {
return ai[0].getAccessibleIconDescription();
}
}, ac);
if (iconDescription != null){
! debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the LABEL object.");
references.increment (iconDescription);
return iconDescription;
}
} else {
parentContext = getAccessibleParentFromContext (ac);
--- 756,766 ----
public String call() throws Exception {
return ai[0].getAccessibleIconDescription();
}
}, ac);
if (iconDescription != null){
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the LABEL object.");
references.increment (iconDescription);
return iconDescription;
}
} else {
parentContext = getAccessibleParentFromContext (ac);
*** 778,788 ****
public Integer call() throws Exception {
return ac.getAccessibleIndexInParent();
}
}, ac);
final AccessibleContext acTableCell = getAccessibleChildFromContext (parentContext, indexInParent);
! debugString ("bk -- Making a second attempt to obtain the Virtual Accessible Name from the Accessible Icon information for the Table Cell.");
if (acTableCell != null) {
final AccessibleIcon [] aiRet =InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
@Override
public AccessibleIcon[] call() throws Exception {
return acTableCell.getAccessibleIcon();
--- 778,788 ----
public Integer call() throws Exception {
return ac.getAccessibleIndexInParent();
}
}, ac);
final AccessibleContext acTableCell = getAccessibleChildFromContext (parentContext, indexInParent);
! debugString ("[INFO]: bk -- Making a second attempt to obtain the Virtual Accessible Name from the Accessible Icon information for the Table Cell.");
if (acTableCell != null) {
final AccessibleIcon [] aiRet =InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
@Override
public AccessibleIcon[] call() throws Exception {
return acTableCell.getAccessibleIcon();
*** 794,804 ****
public String call() throws Exception {
return aiRet[0].getAccessibleIconDescription();
}
}, ac);
if (iconDescription != null){
! debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the Table Cell object.");
references.increment (iconDescription);
return iconDescription;
}
}
}
--- 794,804 ----
public String call() throws Exception {
return aiRet[0].getAccessibleIconDescription();
}
}, ac);
if (iconDescription != null){
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the Table Cell object.");
references.increment (iconDescription);
return iconDescription;
}
}
}
*** 808,818 ****
} else if ( (AccessibleRole.TOGGLE_BUTTON == role) ||
(AccessibleRole.PUSH_BUTTON == role) ) {
/*
Does the button support the Accessible Icon Interface?
*/
! debugString ("bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information.");
final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
@Override
public AccessibleIcon[] call() throws Exception {
return ac.getAccessibleIcon();
}
--- 808,818 ----
} else if ( (AccessibleRole.TOGGLE_BUTTON == role) ||
(AccessibleRole.PUSH_BUTTON == role) ) {
/*
Does the button support the Accessible Icon Interface?
*/
! debugString ("[INFO]: bk -- Attempting to obtain the Virtual Accessible Name from the Accessible Icon information.");
final AccessibleIcon [] ai = InvocationUtils.invokeAndWait(new Callable<AccessibleIcon[]>() {
@Override
public AccessibleIcon[] call() throws Exception {
return ac.getAccessibleIcon();
}
*** 823,833 ****
public String call() throws Exception {
return ai[0].getAccessibleIconDescription();
}
}, ac);
if (iconDescription != null){
! debugString ("bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the TOGGLE_BUTTON or PUSH_BUTTON object.");
references.increment (iconDescription);
return iconDescription;
}
}
} else if ( AccessibleRole.CHECK_BOX == role ) {
--- 823,833 ----
public String call() throws Exception {
return ai[0].getAccessibleIconDescription();
}
}, ac);
if (iconDescription != null){
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the description of the first Accessible Icon found in the TOGGLE_BUTTON or PUSH_BUTTON object.");
references.increment (iconDescription);
return iconDescription;
}
}
} else if ( AccessibleRole.CHECK_BOX == role ) {
*** 903,913 ****
Special case for Slider Bar objects.
*/
if ( (AccessibleRole.SLIDER == role) &&
(AccessibleRole.PANEL == parentRole) &&
(null != parentName) ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from the Accessible Name of the SLIDER object's parent object.");
references.increment (parentName);
return parentName;
}
boolean bIsEditCombo = false;
--- 903,913 ----
Special case for Slider Bar objects.
*/
if ( (AccessibleRole.SLIDER == role) &&
(AccessibleRole.PANEL == parentRole) &&
(null != parentName) ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from the Accessible Name of the SLIDER object's parent object.");
references.increment (parentName);
return parentName;
}
boolean bIsEditCombo = false;
*** 920,934 ****
*/
if ( (AccessibleRole.TEXT == role) &&
(AccessibleRole.COMBO_BOX == parentRole) ) {
bIsEditCombo = true;
if (null != parentName) {
! debugString ("bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Name of the object's parent object.");
references.increment (parentName);
return parentName;
} else if (null != parentDescription) {
! debugString ("bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Description of the object's parent object.");
references.increment (parentDescription);
return parentDescription;
}
testContext = parentContext;
parentRole = AccessibleRole.UNKNOWN;
--- 920,934 ----
*/
if ( (AccessibleRole.TEXT == role) &&
(AccessibleRole.COMBO_BOX == parentRole) ) {
bIsEditCombo = true;
if (null != parentName) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Name of the object's parent object.");
references.increment (parentName);
return parentName;
} else if (null != parentDescription) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name for this Edit Combo box was obtained from the Accessible Description of the object's parent object.");
references.increment (parentDescription);
return parentDescription;
}
testContext = parentContext;
parentRole = AccessibleRole.UNKNOWN;
*** 967,981 ****
AccessibleContext labelContext = ((Accessible)o).getAccessibleContext ();
if (labelContext != null) {
String labelName = labelContext.getAccessibleName ();
String labelDescription = labelContext.getAccessibleDescription ();
if (null != labelName) {
! debugString ("bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Name Case.");
references.increment (labelName);
return labelName;
} else if (null != labelDescription) {
! debugString ("bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Description Case.");
references.increment (labelDescription);
return labelDescription;
}
}
}
--- 967,981 ----
AccessibleContext labelContext = ((Accessible)o).getAccessibleContext ();
if (labelContext != null) {
String labelName = labelContext.getAccessibleName ();
String labelDescription = labelContext.getAccessibleDescription ();
if (null != labelName) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Name Case.");
references.increment (labelName);
return labelName;
} else if (null != labelDescription) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained using the LABELED_BY AccessibleRelation -- Description Case.");
references.increment (labelDescription);
return labelDescription;
}
}
}
*** 1066,1087 ****
public String call() throws Exception {
return childContext.getAccessibleName();
}
}, ac);
if ( null != childName ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object.");
references.increment (childName);
return childName;
}
childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return childContext.getAccessibleDescription();
}
}, ac);
if ( null != childDescription ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object.");
references.increment (childDescription);
return childDescription;
}
} else if ( (childY < targetY) &&
((childX <= targetX) && (targetX <= (childX + childWidth))) ) {
--- 1066,1087 ----
public String call() throws Exception {
return childContext.getAccessibleName();
}
}, ac);
if ( null != childName ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object.");
references.increment (childName);
return childName;
}
childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return childContext.getAccessibleDescription();
}
}, ac);
if ( null != childDescription ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object.");
references.increment (childDescription);
return childDescription;
}
} else if ( (childY < targetY) &&
((childX <= targetX) && (targetX <= (childX + childWidth))) ) {
*** 1090,1111 ****
public String call() throws Exception {
return childContext.getAccessibleName();
}
}, ac);
if ( null != childName ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object.");
references.increment (childName);
return childName;
}
childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return childContext.getAccessibleDescription();
}
}, ac);
if ( null != childDescription ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object.");
references.increment (childDescription);
return childDescription;
}
}
}
--- 1090,1111 ----
public String call() throws Exception {
return childContext.getAccessibleName();
}
}, ac);
if ( null != childName ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object.");
references.increment (childName);
return childName;
}
childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return childContext.getAccessibleDescription();
}
}, ac);
if ( null != childDescription ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object.");
references.increment (childDescription);
return childDescription;
}
}
}
*** 1149,1170 ****
public String call() throws Exception {
return childContext.getAccessibleName();
}
}, ac);
if ( null != childName ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object.");
references.increment (childName);
return childName;
}
childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return childContext.getAccessibleDescription();
}
}, ac);
if ( null != childDescription ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object.");
references.increment (childDescription);
return childDescription;
}
} else if ( (childY < targetY) &&
((childX <= targetX) && (targetX <= (childX + childWidth))) ) {
--- 1149,1170 ----
public String call() throws Exception {
return childContext.getAccessibleName();
}
}, ac);
if ( null != childName ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned to the left of the object.");
references.increment (childName);
return childName;
}
childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return childContext.getAccessibleDescription();
}
}, ac);
if ( null != childDescription ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned to the left of the object.");
references.increment (childDescription);
return childDescription;
}
} else if ( (childY < targetY) &&
((childX <= targetX) && (targetX <= (childX + childWidth))) ) {
*** 1173,1194 ****
public String call() throws Exception {
return childContext.getAccessibleName();
}
}, ac);
if ( null != childName ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object.");
references.increment (childName);
return childName;
}
childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return childContext.getAccessibleDescription();
}
}, ac);
if ( null != childDescription ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object.");
references.increment (childDescription);
return childDescription;
}
}
}
--- 1173,1194 ----
public String call() throws Exception {
return childContext.getAccessibleName();
}
}, ac);
if ( null != childName ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a LABEL object positioned above the object.");
references.increment (childName);
return childName;
}
childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return childContext.getAccessibleDescription();
}
}, ac);
if ( null != childDescription ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a LABEL object positioned above the object.");
references.increment (childDescription);
return childDescription;
}
}
}
*** 1246,1267 ****
public String call() throws Exception {
return childContext.getAccessibleName();
}
}, ac);
if ( null != childName ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
references.increment (childName);
return childName;
}
childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return childContext.getAccessibleDescription();
}
}, ac);
if ( null != childDescription ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
references.increment (childDescription);
return childDescription;
}
}
}
--- 1246,1267 ----
public String call() throws Exception {
return childContext.getAccessibleName();
}
}, ac);
if ( null != childName ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
references.increment (childName);
return childName;
}
childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return childContext.getAccessibleDescription();
}
}, ac);
if ( null != childDescription ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
references.increment (childDescription);
return childDescription;
}
}
}
*** 1306,1327 ****
public String call() throws Exception {
return childContext.getAccessibleName();
}
}, ac);
if ( null != childName ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
references.increment (childName);
return childName;
}
childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return childContext.getAccessibleDescription();
}
}, ac);
if ( null != childDescription ) {
! debugString ("bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
references.increment (childDescription);
return childDescription;
}
}
}
--- 1306,1327 ----
public String call() throws Exception {
return childContext.getAccessibleName();
}
}, ac);
if ( null != childName ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Name of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
references.increment (childName);
return childName;
}
childDescription = InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return childContext.getAccessibleDescription();
}
}, ac);
if ( null != childDescription ) {
! debugString ("[INFO]: bk -- The Virtual Accessible Name was obtained from Accessible Description of a PUSH_BUTTON or TOGGLE_BUTTON object positioned to the left of the object.");
references.increment (childDescription);
return childDescription;
}
}
}
*** 1330,1340 ****
childIndex ++;
}
}
return null;
} else {
! debugString ("AccessBridge::getVirtualAccessibleNameFromContext error - ac == null.");
return null;
}
}
/**
--- 1330,1340 ----
childIndex ++;
}
}
return null;
} else {
! debugString ("[ERROR]: AccessBridge::getVirtualAccessibleNameFromContext error - ac == null.");
return null;
}
}
/**
*** 1348,1362 ****
return ac.getAccessibleDescription();
}
}, ac);
if (s != null) {
references.increment(s);
! debugString("Returning AccessibleDescription from Context: " + s);
return s;
}
} else {
! debugString("getAccessibleDescriptionFromContext; ac = null");
}
return null;
}
/**
--- 1348,1362 ----
return ac.getAccessibleDescription();
}
}, ac);
if (s != null) {
references.increment(s);
! debugString("[INFO]: Returning AccessibleDescription from Context: " + s);
return s;
}
} else {
! debugString("[ERROR]: getAccessibleDescriptionFromContext; ac = null");
}
return null;
}
/**
*** 1372,1387 ****
}, ac);
if (role != null) {
String s = role.toDisplayString(Locale.US);
if (s != null) {
references.increment(s);
! debugString("Returning AccessibleRole from Context: " + s);
return s;
}
}
} else {
! debugString("getAccessibleRoleStringFromContext; ac = null");
}
return null;
}
/**
--- 1372,1387 ----
}, ac);
if (role != null) {
String s = role.toDisplayString(Locale.US);
if (s != null) {
references.increment(s);
! debugString("[INFO]: Returning AccessibleRole from Context: " + s);
return s;
}
}
} else {
! debugString("[ERROR]: getAccessibleRoleStringFromContext; ac = null");
}
return null;
}
/**
*** 1416,1431 ****
role == AccessibleRole.TREE) {
s += ",";
s += AccessibleState.MANAGES_DESCENDANTS.toDisplayString(Locale.US);
}
references.increment(s);
! debugString("Returning AccessibleStateSet from Context: " + s);
return s;
}
}
} else {
! debugString("getAccessibleStatesStringFromContext; ac = null");
}
return null;
}
/**
--- 1416,1431 ----
role == AccessibleRole.TREE) {
s += ",";
s += AccessibleState.MANAGES_DESCENDANTS.toDisplayString(Locale.US);
}
references.increment(s);
! debugString("[INFO]: Returning AccessibleStateSet from Context: " + s);
return s;
}
}
} else {
! debugString("[ERROR]: getAccessibleStatesStringFromContext; ac = null");
}
return null;
}
/**
*** 1447,1461 ****
for (int i = 1; i < states.length; i++) {
s = s + "," + states[i].toDisplayString(Locale.US);
}
}
references.increment(s);
! debugString("Returning AccessibleStateSet en_US from Context: " + s);
return s;
}
}
! debugString("getAccessibleStatesStringFromContext; ac = null");
return null;
}
/**
* returns the AccessibleParent from an AccessibleContext
--- 1447,1461 ----
for (int i = 1; i < states.length; i++) {
s = s + "," + states[i].toDisplayString(Locale.US);
}
}
references.increment(s);
! debugString("[INFO]: Returning AccessibleStateSet en_US from Context: " + s);
return s;
}
}
! debugString("[ERROR]: getAccessibleStatesStringFromContext; ac = null");
return null;
}
/**
* returns the AccessibleParent from an AccessibleContext
*** 1605,1635 ****
*/
private int getAccessibleXcoordFromContext(AccessibleContext ac) {
if (ac != null) {
Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
if (r != null) {
! debugString(" - Returning Accessible x coord from Context: " + r.x);
return r.x;
}
} else {
! debugString("getAccessibleXcoordFromContext ac = null");
}
return -1;
}
/**
* returns the AccessibleComponent y-coord from an AccessibleContext
*/
private int getAccessibleYcoordFromContext(AccessibleContext ac) {
! debugString("getAccessibleYcoordFromContext() called");
if (ac != null) {
Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
if (r != null) {
return r.y;
}
} else {
! debugString("getAccessibleYcoordFromContext; ac = null");
}
return -1;
}
/**
--- 1605,1635 ----
*/
private int getAccessibleXcoordFromContext(AccessibleContext ac) {
if (ac != null) {
Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
if (r != null) {
! debugString("[INFO]: Returning Accessible x coord from Context: " + r.x);
return r.x;
}
} else {
! debugString("[ERROR]: getAccessibleXcoordFromContext ac = null");
}
return -1;
}
/**
* returns the AccessibleComponent y-coord from an AccessibleContext
*/
private int getAccessibleYcoordFromContext(AccessibleContext ac) {
! debugString("[INFO]: getAccessibleYcoordFromContext() called");
if (ac != null) {
Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
if (r != null) {
return r.y;
}
} else {
! debugString("[ERROR]: getAccessibleYcoordFromContext; ac = null");
}
return -1;
}
/**
*** 1640,1650 ****
Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
if (r != null) {
return r.height;
}
} else {
! debugString("getAccessibleHeightFromContext; ac = null");
}
return -1;
}
/**
--- 1640,1650 ----
Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
if (r != null) {
return r.height;
}
} else {
! debugString("[ERROR]: getAccessibleHeightFromContext; ac = null");
}
return -1;
}
/**
*** 1655,1665 ****
Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
if (r != null) {
return r.width;
}
} else {
! debugString("getAccessibleWidthFromContext; ac = null");
}
return -1;
}
--- 1655,1665 ----
Rectangle r = getAccessibleBoundsOnScreenFromContext(ac);
if (r != null) {
return r.width;
}
} else {
! debugString("[ERROR]: getAccessibleWidthFromContext; ac = null");
}
return -1;
}
*** 1670,1693 ****
if (ac != null) {
AccessibleComponent acmp = InvocationUtils.invokeAndWait(() -> {
return ac.getAccessibleComponent();
}, ac);
if (acmp != null) {
! debugString("Returning AccessibleComponent Context");
return acmp;
}
} else {
! debugString("getAccessibleComponentFromContext; ac = null");
}
return null;
}
/**
* returns the AccessibleAction from an AccessibleContext
*/
private AccessibleAction getAccessibleActionFromContext(final AccessibleContext ac) {
! debugString("Returning AccessibleAction Context");
return ac == null ? null : InvocationUtils.invokeAndWait(new Callable<AccessibleAction>() {
@Override
public AccessibleAction call() throws Exception {
return ac.getAccessibleAction();
}
--- 1670,1693 ----
if (ac != null) {
AccessibleComponent acmp = InvocationUtils.invokeAndWait(() -> {
return ac.getAccessibleComponent();
}, ac);
if (acmp != null) {
! debugString("[INFO]: Returning AccessibleComponent Context");
return acmp;
}
} else {
! debugString("[ERROR]: getAccessibleComponentFromContext; ac = null");
}
return null;
}
/**
* returns the AccessibleAction from an AccessibleContext
*/
private AccessibleAction getAccessibleActionFromContext(final AccessibleContext ac) {
! debugString("[INFO]: Returning AccessibleAction Context");
return ac == null ? null : InvocationUtils.invokeAndWait(new Callable<AccessibleAction>() {
@Override
public AccessibleAction call() throws Exception {
return ac.getAccessibleAction();
}
*** 1735,1745 ****
/**
* returns the bounding rectangle for the text cursor
* XXX
*/
private Rectangle getCaretLocation(final AccessibleContext ac) {
! debugString("getCaretLocation");
if (ac==null)
return null;
return InvocationUtils.invokeAndWait(new Callable<Rectangle>() {
@Override
public Rectangle call() throws Exception {
--- 1735,1745 ----
/**
* returns the bounding rectangle for the text cursor
* XXX
*/
private Rectangle getCaretLocation(final AccessibleContext ac) {
! debugString("[INFO]: getCaretLocation");
if (ac==null)
return null;
return InvocationUtils.invokeAndWait(new Callable<Rectangle>() {
@Override
public Rectangle call() throws Exception {
*** 1856,1866 ****
* Return the index at a specific point from an AccessibleContext
* Point(x, y) is in screen coordinates.
*/
private int getAccessibleIndexAtPointFromContext(final AccessibleContext ac,
final int x, final int y) {
! debugString("getAccessibleIndexAtPointFromContext: x = "+x+"; y = "+y);
if (ac==null)
return -1;
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
--- 1856,1866 ----
* Return the index at a specific point from an AccessibleContext
* Point(x, y) is in screen coordinates.
*/
private int getAccessibleIndexAtPointFromContext(final AccessibleContext ac,
final int x, final int y) {
! debugString("[INFO]: getAccessibleIndexAtPointFromContext: x = "+x+"; y = "+y);
if (ac==null)
return -1;
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
*** 1910,1920 ****
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("getAccessibleLetterAtIndexFromContext; ac = null");
}
return null;
}
/**
--- 1910,1920 ----
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("[ERROR]: getAccessibleLetterAtIndexFromContext; ac = null");
}
return null;
}
/**
*** 1933,1943 ****
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("getAccessibleWordAtIndexFromContext; ac = null");
}
return null;
}
/**
--- 1933,1943 ----
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("[ERROR]: getAccessibleWordAtIndexFromContext; ac = null");
}
return null;
}
/**
*** 1956,1966 ****
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("getAccessibleSentenceAtIndexFromContext; ac = null");
}
return null;
}
/**
--- 1956,1966 ----
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("[ERROR]: getAccessibleSentenceAtIndexFromContext; ac = null");
}
return null;
}
/**
*** 2014,2024 ****
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("getAccessibleTextSelectedTextFromContext; ac = null");
}
return null;
}
/**
--- 2014,2024 ----
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("[ERROR]: getAccessibleTextSelectedTextFromContext; ac = null");
}
return null;
}
/**
*** 2275,2285 ****
Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
if (r != null) {
return r.x;
}
} else {
! debugString("getAccessibleXcoordTextRectAtIndexFromContext; ac = null");
}
return -1;
}
/**
--- 2275,2285 ----
Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
if (r != null) {
return r.x;
}
} else {
! debugString("[ERROR]: getAccessibleXcoordTextRectAtIndexFromContext; ac = null");
}
return -1;
}
/**
*** 2290,2300 ****
Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
if (r != null) {
return r.y;
}
} else {
! debugString("getAccessibleYcoordTextRectAtIndexFromContext; ac = null");
}
return -1;
}
/**
--- 2290,2300 ----
Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
if (r != null) {
return r.y;
}
} else {
! debugString("[ERROR]: getAccessibleYcoordTextRectAtIndexFromContext; ac = null");
}
return -1;
}
/**
*** 2305,2315 ****
Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
if (r != null) {
return r.height;
}
} else {
! debugString("getAccessibleHeightTextRectAtIndexFromContext; ac = null");
}
return -1;
}
/**
--- 2305,2315 ----
Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
if (r != null) {
return r.height;
}
} else {
! debugString("[ERROR]: getAccessibleHeightTextRectAtIndexFromContext; ac = null");
}
return -1;
}
/**
*** 2320,2330 ****
Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
if (r != null) {
return r.width;
}
} else {
! debugString("getAccessibleWidthTextRectAtIndexFromContext; ac = null");
}
return -1;
}
/* ===== AttributeSet methods for AccessibleText ===== */
--- 2320,2330 ----
Rectangle r = getAccessibleTextRectAtIndexFromContext(ac, index);
if (r != null) {
return r.width;
}
} else {
! debugString("[ERROR]: getAccessibleWidthTextRectAtIndexFromContext; ac = null");
}
return -1;
}
/* ===== AttributeSet methods for AccessibleText ===== */
*** 2334,2344 ****
*/
private boolean getBoldFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.isBold(as);
} else {
! debugString("getBoldFromAttributeSet; as = null");
}
return false;
}
/**
--- 2334,2344 ----
*/
private boolean getBoldFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.isBold(as);
} else {
! debugString("[ERROR]: getBoldFromAttributeSet; as = null");
}
return false;
}
/**
*** 2346,2356 ****
*/
private boolean getItalicFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.isItalic(as);
} else {
! debugString("getItalicFromAttributeSet; as = null");
}
return false;
}
/**
--- 2346,2356 ----
*/
private boolean getItalicFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.isItalic(as);
} else {
! debugString("[ERROR]: getItalicFromAttributeSet; as = null");
}
return false;
}
/**
*** 2358,2368 ****
*/
private boolean getUnderlineFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.isUnderline(as);
} else {
! debugString("getUnderlineFromAttributeSet; as = null");
}
return false;
}
/**
--- 2358,2368 ----
*/
private boolean getUnderlineFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.isUnderline(as);
} else {
! debugString("[ERROR]: getUnderlineFromAttributeSet; as = null");
}
return false;
}
/**
*** 2370,2380 ****
*/
private boolean getStrikethroughFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.isStrikeThrough(as);
} else {
! debugString("getStrikethroughFromAttributeSet; as = null");
}
return false;
}
/**
--- 2370,2380 ----
*/
private boolean getStrikethroughFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.isStrikeThrough(as);
} else {
! debugString("[ERROR]: getStrikethroughFromAttributeSet; as = null");
}
return false;
}
/**
*** 2382,2392 ****
*/
private boolean getSuperscriptFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.isSuperscript(as);
} else {
! debugString("getSuperscriptFromAttributeSet; as = null");
}
return false;
}
/**
--- 2382,2392 ----
*/
private boolean getSuperscriptFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.isSuperscript(as);
} else {
! debugString("[ERROR]: getSuperscriptFromAttributeSet; as = null");
}
return false;
}
/**
*** 2394,2404 ****
*/
private boolean getSubscriptFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.isSubscript(as);
} else {
! debugString("getSubscriptFromAttributeSet; as = null");
}
return false;
}
/**
--- 2394,2404 ----
*/
private boolean getSubscriptFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.isSubscript(as);
} else {
! debugString("[ERROR]: getSubscriptFromAttributeSet; as = null");
}
return false;
}
/**
*** 2410,2420 ****
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("getBackgroundColorFromAttributeSet; as = null");
}
return null;
}
/**
--- 2410,2420 ----
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("[ERROR]: getBackgroundColorFromAttributeSet; as = null");
}
return null;
}
/**
*** 2426,2436 ****
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("getForegroundColorFromAttributeSet; as = null");
}
return null;
}
/**
--- 2426,2436 ----
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("[ERROR]: getForegroundColorFromAttributeSet; as = null");
}
return null;
}
/**
*** 2442,2452 ****
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("getFontFamilyFromAttributeSet; as = null");
}
return null;
}
/**
--- 2442,2452 ----
if (s != null) {
references.increment(s);
return s;
}
} else {
! debugString("[ERROR]: getFontFamilyFromAttributeSet; as = null");
}
return null;
}
/**
*** 2454,2464 ****
*/
private int getFontSizeFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getFontSize(as);
} else {
! debugString("getFontSizeFromAttributeSet; as = null");
}
return -1;
}
/**
--- 2454,2464 ----
*/
private int getFontSizeFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getFontSize(as);
} else {
! debugString("[ERROR]: getFontSizeFromAttributeSet; as = null");
}
return -1;
}
/**
*** 2466,2476 ****
*/
private int getAlignmentFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getAlignment(as);
} else {
! debugString("getAlignmentFromAttributeSet; as = null");
}
return -1;
}
/**
--- 2466,2476 ----
*/
private int getAlignmentFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getAlignment(as);
} else {
! debugString("[ERROR]: getAlignmentFromAttributeSet; as = null");
}
return -1;
}
/**
*** 2478,2488 ****
*/
private int getBidiLevelFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getBidiLevel(as);
} else {
! debugString("getBidiLevelFromAttributeSet; as = null");
}
return -1;
}
--- 2478,2488 ----
*/
private int getBidiLevelFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getBidiLevel(as);
} else {
! debugString("[ERROR]: getBidiLevelFromAttributeSet; as = null");
}
return -1;
}
*** 2491,2501 ****
*/
private float getFirstLineIndentFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getFirstLineIndent(as);
} else {
! debugString("getFirstLineIndentFromAttributeSet; as = null");
}
return -1;
}
/**
--- 2491,2501 ----
*/
private float getFirstLineIndentFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getFirstLineIndent(as);
} else {
! debugString("[ERROR]: getFirstLineIndentFromAttributeSet; as = null");
}
return -1;
}
/**
*** 2503,2513 ****
*/
private float getLeftIndentFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getLeftIndent(as);
} else {
! debugString("getLeftIndentFromAttributeSet; as = null");
}
return -1;
}
/**
--- 2503,2513 ----
*/
private float getLeftIndentFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getLeftIndent(as);
} else {
! debugString("[ERROR]: getLeftIndentFromAttributeSet; as = null");
}
return -1;
}
/**
*** 2515,2525 ****
*/
private float getRightIndentFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getRightIndent(as);
} else {
! debugString("getRightIndentFromAttributeSet; as = null");
}
return -1;
}
/**
--- 2515,2525 ----
*/
private float getRightIndentFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getRightIndent(as);
} else {
! debugString("[ERROR]: getRightIndentFromAttributeSet; as = null");
}
return -1;
}
/**
*** 2527,2537 ****
*/
private float getLineSpacingFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getLineSpacing(as);
} else {
! debugString("getLineSpacingFromAttributeSet; as = null");
}
return -1;
}
/**
--- 2527,2537 ----
*/
private float getLineSpacingFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getLineSpacing(as);
} else {
! debugString("[ERROR]: getLineSpacingFromAttributeSet; as = null");
}
return -1;
}
/**
*** 2539,2549 ****
*/
private float getSpaceAboveFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getSpaceAbove(as);
} else {
! debugString("getSpaceAboveFromAttributeSet; as = null");
}
return -1;
}
/**
--- 2539,2549 ----
*/
private float getSpaceAboveFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getSpaceAbove(as);
} else {
! debugString("[ERROR]: getSpaceAboveFromAttributeSet; as = null");
}
return -1;
}
/**
*** 2551,2561 ****
*/
private float getSpaceBelowFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getSpaceBelow(as);
} else {
! debugString("getSpaceBelowFromAttributeSet; as = null");
}
return -1;
}
/**
--- 2551,2561 ----
*/
private float getSpaceBelowFromAttributeSet(AttributeSet as) {
if (as != null) {
return StyleConstants.getSpaceBelow(as);
} else {
! debugString("[ERROR]: getSpaceBelowFromAttributeSet; as = null");
}
return -1;
}
/**
*** 2700,2710 ****
references.increment(s);
return s;
}
}
} else {
! debugString("getCurrentAccessibleValueFromContext; ac = null");
}
return null;
}
/**
--- 2700,2710 ----
references.increment(s);
return s;
}
}
} else {
! debugString("[ERROR]: getCurrentAccessibleValueFromContext; ac = null");
}
return null;
}
/**
*** 2728,2738 ****
references.increment(s);
return s;
}
}
} else {
! debugString("getMaximumAccessibleValueFromContext; ac = null");
}
return null;
}
/**
--- 2728,2738 ----
references.increment(s);
return s;
}
}
} else {
! debugString("[ERROR]: getMaximumAccessibleValueFromContext; ac = null");
}
return null;
}
/**
*** 2756,2766 ****
references.increment(s);
return s;
}
}
} else {
! debugString("getMinimumAccessibleValueFromContext; ac = null");
}
return null;
}
--- 2756,2766 ----
references.increment(s);
return s;
}
}
} else {
! debugString("[ERROR]: getMinimumAccessibleValueFromContext; ac = null");
}
return null;
}
*** 2939,2949 ****
/*
* returns the row count for an AccessibleTable
*/
private int getAccessibleTableRowCount(final AccessibleContext ac) {
! debugString("##### getAccessibleTableRowCount");
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
if (ac != null) {
AccessibleTable at = ac.getAccessibleTable();
--- 2939,2949 ----
/*
* returns the row count for an AccessibleTable
*/
private int getAccessibleTableRowCount(final AccessibleContext ac) {
! debugString("[INFO]: ##### getAccessibleTableRowCount");
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
if (ac != null) {
AccessibleTable at = ac.getAccessibleTable();
*** 2958,2968 ****
/*
* returns the column count for an AccessibleTable
*/
private int getAccessibleTableColumnCount(final AccessibleContext ac) {
! debugString("##### getAccessibleTableColumnCount");
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
if (ac != null) {
AccessibleTable at = ac.getAccessibleTable();
--- 2958,2968 ----
/*
* returns the column count for an AccessibleTable
*/
private int getAccessibleTableColumnCount(final AccessibleContext ac) {
! debugString("[INFO]: ##### getAccessibleTableColumnCount");
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
if (ac != null) {
AccessibleTable at = ac.getAccessibleTable();
*** 2978,2988 ****
/*
* returns the AccessibleContext for an AccessibleTable cell
*/
private AccessibleContext getAccessibleTableCellAccessibleContext(final AccessibleTable at,
final int row, final int column) {
! debugString("getAccessibleTableCellAccessibleContext: at = "+at.getClass());
if (at == null) return null;
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
@Override
public AccessibleContext call() throws Exception {
if (!(at instanceof AccessibleContext)) {
--- 2978,2988 ----
/*
* returns the AccessibleContext for an AccessibleTable cell
*/
private AccessibleContext getAccessibleTableCellAccessibleContext(final AccessibleTable at,
final int row, final int column) {
! debugString("[INFO]: getAccessibleTableCellAccessibleContext: at = "+at.getClass());
if (at == null) return null;
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
@Override
public AccessibleContext call() throws Exception {
if (!(at instanceof AccessibleContext)) {
*** 3023,3095 ****
/*
* returns the index of a cell at a given row and column in an AccessibleTable
*/
private int getAccessibleTableCellIndex(final AccessibleTable at, int row, int column) {
! debugString("##### getAccessibleTableCellIndex: at="+at);
if (at != null) {
int cellIndex = row *
InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return at.getAccessibleColumnCount();
}
}, getContextFromAccessibleTable(at)) +
column;
! debugString(" ##### getAccessibleTableCellIndex="+cellIndex);
return cellIndex;
}
! debugString(" ##### getAccessibleTableCellIndex FAILED");
return -1;
}
/*
* returns the row extent of a cell at a given row and column in an AccessibleTable
*/
private int getAccessibleTableCellRowExtent(final AccessibleTable at, final int row, final int column) {
! debugString("##### getAccessibleTableCellRowExtent");
if (at != null) {
int rowExtent = InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return at.getAccessibleRowExtentAt(row, column);
}
},
getContextFromAccessibleTable(at));
! debugString(" ##### getAccessibleTableCellRowExtent="+rowExtent);
return rowExtent;
}
! debugString(" ##### getAccessibleTableCellRowExtent FAILED");
return -1;
}
/*
* returns the column extent of a cell at a given row and column in an AccessibleTable
*/
private int getAccessibleTableCellColumnExtent(final AccessibleTable at, final int row, final int column) {
! debugString("##### getAccessibleTableCellColumnExtent");
if (at != null) {
int columnExtent = InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return at.getAccessibleColumnExtentAt(row, column);
}
},
getContextFromAccessibleTable(at));
! debugString(" ##### getAccessibleTableCellColumnExtent="+columnExtent);
return columnExtent;
}
! debugString(" ##### getAccessibleTableCellColumnExtent FAILED");
return -1;
}
/*
* returns whether a cell is selected at a given row and column in an AccessibleTable
*/
private boolean isAccessibleTableCellSelected(final AccessibleTable at, final int row,
final int column) {
! debugString("##### isAccessibleTableCellSelected: ["+row+"]["+column+"]");
if (at == null)
return false;
return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
--- 3023,3095 ----
/*
* returns the index of a cell at a given row and column in an AccessibleTable
*/
private int getAccessibleTableCellIndex(final AccessibleTable at, int row, int column) {
! debugString("[INFO]: ##### getAccessibleTableCellIndex: at="+at);
if (at != null) {
int cellIndex = row *
InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return at.getAccessibleColumnCount();
}
}, getContextFromAccessibleTable(at)) +
column;
! debugString("[INFO]: ##### getAccessibleTableCellIndex="+cellIndex);
return cellIndex;
}
! debugString("[ERROR]: ##### getAccessibleTableCellIndex FAILED");
return -1;
}
/*
* returns the row extent of a cell at a given row and column in an AccessibleTable
*/
private int getAccessibleTableCellRowExtent(final AccessibleTable at, final int row, final int column) {
! debugString("[INFO]: ##### getAccessibleTableCellRowExtent");
if (at != null) {
int rowExtent = InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return at.getAccessibleRowExtentAt(row, column);
}
},
getContextFromAccessibleTable(at));
! debugString("[INFO]: ##### getAccessibleTableCellRowExtent="+rowExtent);
return rowExtent;
}
! debugString("[ERROR]: ##### getAccessibleTableCellRowExtent FAILED");
return -1;
}
/*
* returns the column extent of a cell at a given row and column in an AccessibleTable
*/
private int getAccessibleTableCellColumnExtent(final AccessibleTable at, final int row, final int column) {
! debugString("[INFO]: ##### getAccessibleTableCellColumnExtent");
if (at != null) {
int columnExtent = InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return at.getAccessibleColumnExtentAt(row, column);
}
},
getContextFromAccessibleTable(at));
! debugString("[INFO]: ##### getAccessibleTableCellColumnExtent="+columnExtent);
return columnExtent;
}
! debugString("[ERROR]: ##### getAccessibleTableCellColumnExtent FAILED");
return -1;
}
/*
* returns whether a cell is selected at a given row and column in an AccessibleTable
*/
private boolean isAccessibleTableCellSelected(final AccessibleTable at, final int row,
final int column) {
! debugString("[INFO]: ##### isAccessibleTableCellSelected: ["+row+"]["+column+"]");
if (at == null)
return false;
return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
*** 3112,3122 ****
/*
* returns an AccessibleTable that represents the row header in an
* AccessibleTable
*/
private AccessibleTable getAccessibleTableRowHeader(final AccessibleContext ac) {
! debugString(" ##### getAccessibleTableRowHeader called");
AccessibleTable at = InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() {
@Override
public AccessibleTable call() throws Exception {
if (ac != null) {
AccessibleTable at = ac.getAccessibleTable();
--- 3112,3122 ----
/*
* returns an AccessibleTable that represents the row header in an
* AccessibleTable
*/
private AccessibleTable getAccessibleTableRowHeader(final AccessibleContext ac) {
! debugString("[INFO]: ##### getAccessibleTableRowHeader called");
AccessibleTable at = InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() {
@Override
public AccessibleTable call() throws Exception {
if (ac != null) {
AccessibleTable at = ac.getAccessibleTable();
*** 3136,3146 ****
/*
* returns an AccessibleTable that represents the column header in an
* AccessibleTable
*/
private AccessibleTable getAccessibleTableColumnHeader(final AccessibleContext ac) {
! debugString("##### getAccessibleTableColumnHeader");
if (ac == null)
return null;
AccessibleTable at = InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() {
@Override
public AccessibleTable call() throws Exception {
--- 3136,3146 ----
/*
* returns an AccessibleTable that represents the column header in an
* AccessibleTable
*/
private AccessibleTable getAccessibleTableColumnHeader(final AccessibleContext ac) {
! debugString("[INFO]: ##### getAccessibleTableColumnHeader");
if (ac == null)
return null;
AccessibleTable at = InvocationUtils.invokeAndWait(new Callable<AccessibleTable>() {
@Override
public AccessibleTable call() throws Exception {
*** 3175,3185 ****
* returns the number of row headers in an AccessibleTable that represents
* the row header in an AccessibleTable
*/
private int getAccessibleTableRowHeaderRowCount(AccessibleContext ac) {
! debugString(" ##### getAccessibleTableRowHeaderRowCount called");
if (ac != null) {
final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac);
if (atRowHeader != null) {
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
--- 3175,3185 ----
* returns the number of row headers in an AccessibleTable that represents
* the row header in an AccessibleTable
*/
private int getAccessibleTableRowHeaderRowCount(AccessibleContext ac) {
! debugString("[INFO]: ##### getAccessibleTableRowHeaderRowCount called");
if (ac != null) {
final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac);
if (atRowHeader != null) {
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
*** 3198,3208 ****
/*
* returns the number of column headers in an AccessibleTable that represents
* the row header in an AccessibleTable
*/
private int getAccessibleTableRowHeaderColumnCount(AccessibleContext ac) {
! debugString(" ##### getAccessibleTableRowHeaderColumnCount called");
if (ac != null) {
final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac);
if (atRowHeader != null) {
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
--- 3198,3208 ----
/*
* returns the number of column headers in an AccessibleTable that represents
* the row header in an AccessibleTable
*/
private int getAccessibleTableRowHeaderColumnCount(AccessibleContext ac) {
! debugString("[INFO]: ##### getAccessibleTableRowHeaderColumnCount called");
if (ac != null) {
final AccessibleTable atRowHeader = getAccessibleTableRowHeader(ac);
if (atRowHeader != null) {
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
*** 3213,3233 ****
return -1;
}
}, ac);
}
}
! debugString(" ##### getAccessibleTableRowHeaderColumnCount FAILED");
return -1;
}
/*
* returns the number of row headers in an AccessibleTable that represents
* the column header in an AccessibleTable
*/
private int getAccessibleTableColumnHeaderRowCount(AccessibleContext ac) {
! debugString("##### getAccessibleTableColumnHeaderRowCount");
if (ac != null) {
final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac);
if (atColumnHeader != null) {
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
--- 3213,3233 ----
return -1;
}
}, ac);
}
}
! debugString("[ERROR]: ##### getAccessibleTableRowHeaderColumnCount FAILED");
return -1;
}
/*
* returns the number of row headers in an AccessibleTable that represents
* the column header in an AccessibleTable
*/
private int getAccessibleTableColumnHeaderRowCount(AccessibleContext ac) {
! debugString("[INFO]: ##### getAccessibleTableColumnHeaderRowCount");
if (ac != null) {
final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac);
if (atColumnHeader != null) {
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
*** 3238,3258 ****
return -1;
}
}, ac);
}
}
! debugString(" ##### getAccessibleTableColumnHeaderRowCount FAILED");
return -1;
}
/*
* returns the number of column headers in an AccessibleTable that represents
* the column header in an AccessibleTable
*/
private int getAccessibleTableColumnHeaderColumnCount(AccessibleContext ac) {
! debugString("##### getAccessibleTableColumnHeaderColumnCount");
if (ac != null) {
final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac);
if (atColumnHeader != null) {
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
--- 3238,3258 ----
return -1;
}
}, ac);
}
}
! debugString("[ERROR]: ##### getAccessibleTableColumnHeaderRowCount FAILED");
return -1;
}
/*
* returns the number of column headers in an AccessibleTable that represents
* the column header in an AccessibleTable
*/
private int getAccessibleTableColumnHeaderColumnCount(AccessibleContext ac) {
! debugString("[ERROR]: ##### getAccessibleTableColumnHeaderColumnCount");
if (ac != null) {
final AccessibleTable atColumnHeader = getAccessibleTableColumnHeader(ac);
if (atColumnHeader != null) {
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
*** 3263,3273 ****
return -1;
}
}, ac);
}
}
! debugString(" ##### getAccessibleTableColumnHeaderColumnCount FAILED");
return -1;
}
/*
* returns the description of a row header in an AccessibleTable
--- 3263,3273 ----
return -1;
}
}, ac);
}
}
! debugString("[ERROR]: ##### getAccessibleTableColumnHeaderColumnCount FAILED");
return -1;
}
/*
* returns the description of a row header in an AccessibleTable
*** 3530,3540 ****
* returns the jth target in the ith relation in the AccessibleContext's
* AccessibleRelationSet
*/
private AccessibleContext getAccessibleRelationTarget(final AccessibleContext ac,
final int i, final int j) {
! debugString("***** getAccessibleRelationTarget");
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
@Override
public AccessibleContext call() throws Exception {
if (ac != null) {
AccessibleRelationSet ars = ac.getAccessibleRelationSet();
--- 3530,3540 ----
* returns the jth target in the ith relation in the AccessibleContext's
* AccessibleRelationSet
*/
private AccessibleContext getAccessibleRelationTarget(final AccessibleContext ac,
final int i, final int j) {
! debugString("[INFO]: ***** getAccessibleRelationTarget");
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
@Override
public AccessibleContext call() throws Exception {
if (ac != null) {
AccessibleRelationSet ars = ac.getAccessibleRelationSet();
*** 3563,3573 ****
/*
* Returns the AccessibleHypertext
*/
private AccessibleHypertext getAccessibleHypertext(final AccessibleContext ac) {
! debugString("getAccessibleHyperlink");
if (ac==null)
return null;
AccessibleHypertext hypertext = InvocationUtils.invokeAndWait(new Callable<AccessibleHypertext>() {
@Override
public AccessibleHypertext call() throws Exception {
--- 3563,3573 ----
/*
* Returns the AccessibleHypertext
*/
private AccessibleHypertext getAccessibleHypertext(final AccessibleContext ac) {
! debugString("[INFO]: getAccessibleHyperlink");
if (ac==null)
return null;
AccessibleHypertext hypertext = InvocationUtils.invokeAndWait(new Callable<AccessibleHypertext>() {
@Override
public AccessibleHypertext call() throws Exception {
*** 3584,3594 ****
/*
* Returns the number of AccessibleHyperlinks
*/
private int getAccessibleHyperlinkCount(AccessibleContext ac) {
! debugString("getAccessibleHyperlinkCount");
if (ac == null) {
return 0;
}
final AccessibleHypertext hypertext = getAccessibleHypertext(ac);
if (hypertext == null) {
--- 3584,3594 ----
/*
* Returns the number of AccessibleHyperlinks
*/
private int getAccessibleHyperlinkCount(AccessibleContext ac) {
! debugString("[INFO]: getAccessibleHyperlinkCount");
if (ac == null) {
return 0;
}
final AccessibleHypertext hypertext = getAccessibleHypertext(ac);
if (hypertext == null) {
*** 3605,3615 ****
/*
* Returns the hyperlink at the specified index
*/
private AccessibleHyperlink getAccessibleHyperlink(final AccessibleHypertext hypertext, final int i) {
! debugString("getAccessibleHyperlink");
if (hypertext == null) {
return null;
}
AccessibleContext ac = hyperTextContextMap.get(hypertext);
if ( i < 0 || i >=
--- 3605,3615 ----
/*
* Returns the hyperlink at the specified index
*/
private AccessibleHyperlink getAccessibleHyperlink(final AccessibleHypertext hypertext, final int i) {
! debugString("[INFO]: getAccessibleHyperlink");
if (hypertext == null) {
return null;
}
AccessibleContext ac = hyperTextContextMap.get(hypertext);
if ( i < 0 || i >=
*** 3637,3647 ****
/*
* Returns the hyperlink object description
*/
private String getAccessibleHyperlinkText(final AccessibleHyperlink link) {
! debugString("getAccessibleHyperlinkText");
if (link == null) {
return null;
}
return InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
--- 3637,3647 ----
/*
* Returns the hyperlink object description
*/
private String getAccessibleHyperlinkText(final AccessibleHyperlink link) {
! debugString("[INFO]: getAccessibleHyperlinkText");
if (link == null) {
return null;
}
return InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
*** 3657,3667 ****
/*
* Returns the hyperlink URL
*/
private String getAccessibleHyperlinkURL(final AccessibleHyperlink link) {
! debugString("getAccessibleHyperlinkURL");
if (link == null) {
return null;
}
return InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
--- 3657,3667 ----
/*
* Returns the hyperlink URL
*/
private String getAccessibleHyperlinkURL(final AccessibleHyperlink link) {
! debugString("[INFO]: getAccessibleHyperlinkURL");
if (link == null) {
return null;
}
return InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
*** 3678,3688 ****
/*
* Returns the start index of the hyperlink text
*/
private int getAccessibleHyperlinkStartIndex(final AccessibleHyperlink link) {
! debugString("getAccessibleHyperlinkStartIndex");
if (link == null) {
return -1;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
--- 3678,3688 ----
/*
* Returns the start index of the hyperlink text
*/
private int getAccessibleHyperlinkStartIndex(final AccessibleHyperlink link) {
! debugString("[INFO]: getAccessibleHyperlinkStartIndex");
if (link == null) {
return -1;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
*** 3694,3704 ****
/*
* Returns the end index of the hyperlink text
*/
private int getAccessibleHyperlinkEndIndex(final AccessibleHyperlink link) {
! debugString("getAccessibleHyperlinkEndIndex");
if (link == null) {
return -1;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
--- 3694,3704 ----
/*
* Returns the end index of the hyperlink text
*/
private int getAccessibleHyperlinkEndIndex(final AccessibleHyperlink link) {
! debugString("[INFO]: getAccessibleHyperlinkEndIndex");
if (link == null) {
return -1;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
*** 3712,3732 ****
* Returns the index into an array of hyperlinks that
* is associated with this character index, or -1 if there
* is no hyperlink associated with this index.
*/
private int getAccessibleHypertextLinkIndex(final AccessibleHypertext hypertext, final int charIndex) {
! debugString("getAccessibleHypertextLinkIndex: charIndex = "+charIndex);
if (hypertext == null) {
return -1;
}
int linkIndex = InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return hypertext.getLinkIndex(charIndex);
}
}, hyperTextContextMap.get(hypertext));
! debugString("getAccessibleHypertextLinkIndex returning "+linkIndex);
return linkIndex;
}
/*
* Actives the hyperlink
--- 3712,3732 ----
* Returns the index into an array of hyperlinks that
* is associated with this character index, or -1 if there
* is no hyperlink associated with this index.
*/
private int getAccessibleHypertextLinkIndex(final AccessibleHypertext hypertext, final int charIndex) {
! debugString("[INFO]: getAccessibleHypertextLinkIndex: charIndex = "+charIndex);
if (hypertext == null) {
return -1;
}
int linkIndex = InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return hypertext.getLinkIndex(charIndex);
}
}, hyperTextContextMap.get(hypertext));
! debugString("[INFO]: getAccessibleHypertextLinkIndex returning "+linkIndex);
return linkIndex;
}
/*
* Actives the hyperlink
*** 3741,3751 ****
@Override
public Boolean call() throws Exception {
return link.doAccessibleAction(0);
}
}, ac);
! debugString("activateAccessibleHyperlink: returning = "+retval);
return retval;
}
// ============ AccessibleKeyBinding =============
--- 3741,3751 ----
@Override
public Boolean call() throws Exception {
return link.doAccessibleAction(0);
}
}, ac);
! debugString("[INFO]: activateAccessibleHyperlink: returning = "+retval);
return retval;
}
// ============ AccessibleKeyBinding =============
*** 3869,3889 ****
if (keyStroke == null)
return 0;
int fKey = fKeyNumber(keyStroke);
if (fKey != 0) {
// return 0x00000001 through 0x00000018
! debugString(" Shortcut is: F" + fKey);
return (char)fKey;
}
// If the accelerator is a control character, return it
int keyCode = controlCode(keyStroke);
if (keyCode != 0) {
! debugString(" Shortcut is control character: " + Integer.toHexString(keyCode));
return (char)keyCode;
}
String keyText = KeyEvent.getKeyText(keyStroke.getKeyCode());
! debugString(" Shortcut is: " + keyText);
if (keyText != null || keyText.length() > 0) {
CharSequence seq = keyText.subSequence(0, 1);
if (seq != null || seq.length() > 0) {
return seq.charAt(0);
}
--- 3869,3889 ----
if (keyStroke == null)
return 0;
int fKey = fKeyNumber(keyStroke);
if (fKey != 0) {
// return 0x00000001 through 0x00000018
! debugString("[INFO]: Shortcut is: F" + fKey);
return (char)fKey;
}
// If the accelerator is a control character, return it
int keyCode = controlCode(keyStroke);
if (keyCode != 0) {
! debugString("[INFO]: Shortcut is control character: " + Integer.toHexString(keyCode));
return (char)keyCode;
}
String keyText = KeyEvent.getKeyText(keyStroke.getKeyCode());
! debugString("[INFO]: Shortcut is: " + keyText);
if (keyText != null || keyText.length() > 0) {
CharSequence seq = keyText.subSequence(0, 1);
if (seq != null || seq.length() > 0) {
return seq.charAt(0);
}
*** 3895,3905 ****
* returns the KeyStroke modifiers as an int
*/
private int getModifiers(KeyStroke keyStroke) {
if (keyStroke == null)
return 0;
! debugString("In AccessBridge.getModifiers");
// modifiers is a bit strip where bits 0-7 indicate a traditional modifier
// such as Ctrl/Alt/Shift, bit 8 indicates an F key shortcut, and bit 9 indicates
// a control code shortcut such as the delete key.
int modifiers = 0;
--- 3895,3905 ----
* returns the KeyStroke modifiers as an int
*/
private int getModifiers(KeyStroke keyStroke) {
if (keyStroke == null)
return 0;
! debugString("[INFO]: In AccessBridge.getModifiers");
// modifiers is a bit strip where bits 0-7 indicate a traditional modifier
// such as Ctrl/Alt/Shift, bit 8 indicates an F key shortcut, and bit 9 indicates
// a control code shortcut such as the delete key.
int modifiers = 0;
*** 3922,3948 ****
String text = st.nextToken();
// Meta+Ctrl+Alt+Shift
// 0-3 are shift, ctrl, meta, alt
// 4-7 are for Solaris workstations (though not being used)
if (text.startsWith("met")) {
! debugString(" found meta");
modifiers |= ActionEvent.META_MASK;
}
if (text.startsWith("ctr")) {
! debugString(" found ctrl");
modifiers |= ActionEvent.CTRL_MASK;
}
if (text.startsWith("alt")) {
! debugString(" found alt");
modifiers |= ActionEvent.ALT_MASK;
}
if (text.startsWith("shi")) {
debugString(" found shift");
modifiers |= ActionEvent.SHIFT_MASK;
}
}
! debugString(" returning modifiers: 0x" + Integer.toHexString(modifiers));
return modifiers;
}
/*
* returns the number of key bindings associated with this context
--- 3922,3948 ----
String text = st.nextToken();
// Meta+Ctrl+Alt+Shift
// 0-3 are shift, ctrl, meta, alt
// 4-7 are for Solaris workstations (though not being used)
if (text.startsWith("met")) {
! debugString("[INFO]: found meta");
modifiers |= ActionEvent.META_MASK;
}
if (text.startsWith("ctr")) {
! debugString("[INFO]: found ctrl");
modifiers |= ActionEvent.CTRL_MASK;
}
if (text.startsWith("alt")) {
! debugString("[INFO]: found alt");
modifiers |= ActionEvent.ALT_MASK;
}
if (text.startsWith("shi")) {
debugString(" found shift");
modifiers |= ActionEvent.SHIFT_MASK;
}
}
! debugString("[INFO]: returning modifiers: 0x" + Integer.toHexString(modifiers));
return modifiers;
}
/*
* returns the number of key bindings associated with this context
*** 4017,4027 ****
/*
* return the number of icons associated with this context
*/
private int getAccessibleIconsCount(final AccessibleContext ac) {
! debugString("getAccessibleIconsCount");
if (ac == null) {
return 0;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
--- 4017,4027 ----
/*
* return the number of icons associated with this context
*/
private int getAccessibleIconsCount(final AccessibleContext ac) {
! debugString("[INFO]: getAccessibleIconsCount");
if (ac == null) {
return 0;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
*** 4037,4047 ****
/*
* return icon description at the specified index
*/
private String getAccessibleIconDescription(final AccessibleContext ac, final int index) {
! debugString("getAccessibleIconDescription: index = "+index);
if (ac == null) {
return null;
}
return InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
--- 4037,4047 ----
/*
* return icon description at the specified index
*/
private String getAccessibleIconDescription(final AccessibleContext ac, final int index) {
! debugString("[INFO]: getAccessibleIconDescription: index = "+index);
if (ac == null) {
return null;
}
return InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
*** 4057,4067 ****
/*
* return icon height at the specified index
*/
private int getAccessibleIconHeight(final AccessibleContext ac, final int index) {
! debugString("getAccessibleIconHeight: index = "+index);
if (ac == null) {
return 0;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
--- 4057,4067 ----
/*
* return icon height at the specified index
*/
private int getAccessibleIconHeight(final AccessibleContext ac, final int index) {
! debugString("[INFO]: getAccessibleIconHeight: index = "+index);
if (ac == null) {
return 0;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
*** 4077,4087 ****
/*
* return icon width at the specified index
*/
private int getAccessibleIconWidth(final AccessibleContext ac, final int index) {
! debugString("getAccessibleIconWidth: index = "+index);
if (ac == null) {
return 0;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
--- 4077,4087 ----
/*
* return icon width at the specified index
*/
private int getAccessibleIconWidth(final AccessibleContext ac, final int index) {
! debugString("[INFO]: getAccessibleIconWidth: index = "+index);
if (ac == null) {
return 0;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
*** 4099,4109 ****
/*
* return the number of icons associated with this context
*/
private int getAccessibleActionsCount(final AccessibleContext ac) {
! debugString("getAccessibleActionsCount");
if (ac == null) {
return 0;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
--- 4099,4109 ----
/*
* return the number of icons associated with this context
*/
private int getAccessibleActionsCount(final AccessibleContext ac) {
! debugString("[INFO]: getAccessibleActionsCount");
if (ac == null) {
return 0;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
@Override
*** 4118,4128 ****
/*
* return icon description at the specified index
*/
private String getAccessibleActionName(final AccessibleContext ac, final int index) {
! debugString("getAccessibleActionName: index = "+index);
if (ac == null) {
return null;
}
return InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
--- 4118,4128 ----
/*
* return icon description at the specified index
*/
private String getAccessibleActionName(final AccessibleContext ac, final int index) {
! debugString("[INFO]: getAccessibleActionName: index = "+index);
if (ac == null) {
return null;
}
return InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
*** 4137,4147 ****
}
/*
* return icon description at the specified index
*/
private boolean doAccessibleActions(final AccessibleContext ac, final String name) {
! debugString("doAccessibleActions: action name = "+name);
if (ac == null || name == null) {
return false;
}
return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
@Override
--- 4137,4147 ----
}
/*
* return icon description at the specified index
*/
private boolean doAccessibleActions(final AccessibleContext ac, final String name) {
! debugString("[INFO]: doAccessibleActions: action name = "+name);
if (ac == null || name == null) {
return false;
}
return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
@Override
*** 4175,4192 ****
* implements AccessibleEditableText with the
* specified text string.
* Returns whether successful.
*/
private boolean setTextContents(final AccessibleContext ac, final String text) {
! debugString("setTextContents: ac = "+ac+"; text = "+text);
if (! (ac instanceof AccessibleEditableText)) {
! debugString(" ac not instanceof AccessibleEditableText: "+ac);
return false;
}
if (text == null) {
! debugString(" text is null");
return false;
}
return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
@Override
--- 4175,4192 ----
* implements AccessibleEditableText with the
* specified text string.
* Returns whether successful.
*/
private boolean setTextContents(final AccessibleContext ac, final String text) {
! debugString("[INFO]: setTextContents: ac = "+ac+"; text = "+text);
if (! (ac instanceof AccessibleEditableText)) {
! debugString("[WARN]: ac not instanceof AccessibleEditableText: "+ac);
return false;
}
if (text == null) {
! debugString("[WARN]: text is null");
return false;
}
return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
@Override
*** 4219,4229 ****
* a Java Window. This is same Accessible Context that is obtained
* from GetAccessibleContextFromHWND for that window. Returns
* (AccessibleContext)0 on error.
*/
private AccessibleContext getTopLevelObject (final AccessibleContext ac) {
! debugString("getTopLevelObject; ac = "+ac);
if (ac == null) {
return null;
}
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
@Override
--- 4219,4229 ----
* a Java Window. This is same Accessible Context that is obtained
* from GetAccessibleContextFromHWND for that window. Returns
* (AccessibleContext)0 on error.
*/
private AccessibleContext getTopLevelObject (final AccessibleContext ac) {
! debugString("[INFO]: getTopLevelObject; ac = "+ac);
if (ac == null) {
return null;
}
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
@Override
*** 4256,4267 ****
* Returns the parent AccessibleContext that has the specified AccessibleRole.
* Returns null on error or if the AccessibleContext does not exist.
*/
private AccessibleContext getParentWithRole (final AccessibleContext ac,
final String roleName) {
! debugString("getParentWithRole; ac = "+ac);
! debugString("role = "+roleName);
if (ac == null || roleName == null) {
return null;
}
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
--- 4256,4266 ----
* Returns the parent AccessibleContext that has the specified AccessibleRole.
* Returns null on error or if the AccessibleContext does not exist.
*/
private AccessibleContext getParentWithRole (final AccessibleContext ac,
final String roleName) {
! debugString("[INFO]: getParentWithRole; ac = "+ac + "\n role = "+roleName);
if (ac == null || roleName == null) {
return null;
}
return InvocationUtils.invokeAndWait(new Callable<AccessibleContext>() {
*** 4313,4323 ****
* Returns how deep in the object hierarchy a given object is.
* The top most object in the object hierarchy has an object depth of 0.
* Returns -1 on error.
*/
private int getObjectDepth(final AccessibleContext ac) {
! debugString("getObjectDepth: ac = "+ac);
if (ac == null) {
return -1;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
--- 4312,4322 ----
* Returns how deep in the object hierarchy a given object is.
* The top most object in the object hierarchy has an object depth of 0.
* Returns -1 on error.
*/
private int getObjectDepth(final AccessibleContext ac) {
! debugString("[INFO]: getObjectDepth: ac = "+ac);
if (ac == null) {
return -1;
}
return InvocationUtils.invokeAndWait(new Callable<Integer>() {
*** 4342,4352 ****
/**
* Returns the Accessible Context of the current ActiveDescendent of an object.
* Returns (AccessibleContext)0 on error.
*/
private AccessibleContext getActiveDescendent (final AccessibleContext ac) {
! debugString("getActiveDescendent: ac = "+ac);
if (ac == null) {
return null;
}
// workaround for JTree bug where the only possible active
// descendent is the JTree root
--- 4341,4351 ----
/**
* Returns the Accessible Context of the current ActiveDescendent of an object.
* Returns (AccessibleContext)0 on error.
*/
private AccessibleContext getActiveDescendent (final AccessibleContext ac) {
! debugString("[INFO]: getActiveDescendent: ac = "+ac);
if (ac == null) {
return null;
}
// workaround for JTree bug where the only possible active
// descendent is the JTree root
*** 4410,4420 ****
* Returns whether successful.
*
* Bug ID 4916682 - Implement JAWS AccessibleName policy
*/
private String getJAWSAccessibleName(final AccessibleContext ac) {
! debugString("getJAWSAccessibleName");
if (ac == null) {
return null;
}
// placeholder
return InvocationUtils.invokeAndWait(new Callable<String>() {
--- 4409,4419 ----
* Returns whether successful.
*
* Bug ID 4916682 - Implement JAWS AccessibleName policy
*/
private String getJAWSAccessibleName(final AccessibleContext ac) {
! debugString("[INFO]: getJAWSAccessibleName");
if (ac == null) {
return null;
}
// placeholder
return InvocationUtils.invokeAndWait(new Callable<String>() {
*** 4429,4439 ****
* Request focus for a component. Returns whether successful;
*
* Bug ID 4944757 - requestFocus method needed
*/
private boolean requestFocus(final AccessibleContext ac) {
! debugString("requestFocus");
if (ac == null) {
return false;
}
return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
@Override
--- 4428,4438 ----
* Request focus for a component. Returns whether successful;
*
* Bug ID 4944757 - requestFocus method needed
*/
private boolean requestFocus(final AccessibleContext ac) {
! debugString("[INFO]: requestFocus");
if (ac == null) {
return false;
}
return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
@Override
*** 4454,4464 ****
* whether successful;
*
* Bug ID 4944758 - selectTextRange method needed
*/
private boolean selectTextRange(final AccessibleContext ac, final int startIndex, final int endIndex) {
! debugString("selectTextRange: start = "+startIndex+"; end = "+endIndex);
if (ac == null) {
return false;
}
return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
@Override
--- 4453,4463 ----
* whether successful;
*
* Bug ID 4944758 - selectTextRange method needed
*/
private boolean selectTextRange(final AccessibleContext ac, final int startIndex, final int endIndex) {
! debugString("[INFO]: selectTextRange: start = "+startIndex+"; end = "+endIndex);
if (ac == null) {
return false;
}
return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
@Override
*** 4480,4490 ****
* Set the caret to a text position. Returns whether successful;
*
* Bug ID 4944770 - setCaretPosition method needed
*/
private boolean setCaretPosition(final AccessibleContext ac, final int position) {
! debugString("setCaretPosition: position = "+position);
if (ac == null) {
return false;
}
return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
@Override
--- 4479,4489 ----
* Set the caret to a text position. Returns whether successful;
*
* Bug ID 4944770 - setCaretPosition method needed
*/
private boolean setCaretPosition(final AccessibleContext ac, final int position) {
! debugString("[INFO]: setCaretPosition: position = "+position);
if (ac == null) {
return false;
}
return InvocationUtils.invokeAndWait(new Callable<Boolean>() {
@Override
*** 4508,4524 ****
private AccessibleContext _visibleChild;
private int _currentVisibleIndex;
private boolean _foundVisibleChild;
private int getVisibleChildrenCount(AccessibleContext ac) {
! debugString("getVisibleChildrenCount");
if (ac == null) {
return -1;
}
_visibleChildrenCount = 0;
_getVisibleChildrenCount(ac);
! debugString(" _visibleChildrenCount = "+_visibleChildrenCount);
return _visibleChildrenCount;
}
/*
* Recursively descends AccessibleContext and gets the number
--- 4507,4523 ----
private AccessibleContext _visibleChild;
private int _currentVisibleIndex;
private boolean _foundVisibleChild;
private int getVisibleChildrenCount(AccessibleContext ac) {
! debugString("[INFO]: getVisibleChildrenCount");
if (ac == null) {
return -1;
}
_visibleChildrenCount = 0;
_getVisibleChildrenCount(ac);
! debugString("[INFO]: _visibleChildrenCount = "+_visibleChildrenCount);
return _visibleChildrenCount;
}
/*
* Recursively descends AccessibleContext and gets the number
*** 4654,4674 ****
* specified index
*
* Bug ID 4944762- getVisibleChildren for list-like components needed
*/
private AccessibleContext getVisibleChild(AccessibleContext ac, int index) {
! debugString("getVisibleChild: index = "+index);
if (ac == null) {
return null;
}
_visibleChild = null;
_currentVisibleIndex = 0;
_foundVisibleChild = false;
_getVisibleChild(ac, index);
if (_visibleChild != null) {
! debugString( " getVisibleChild: found child = " +
InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return AccessBridge.this._visibleChild.getAccessibleName();
}
--- 4653,4673 ----
* specified index
*
* Bug ID 4944762- getVisibleChildren for list-like components needed
*/
private AccessibleContext getVisibleChild(AccessibleContext ac, int index) {
! debugString("[INFO]: getVisibleChild: index = "+index);
if (ac == null) {
return null;
}
_visibleChild = null;
_currentVisibleIndex = 0;
_foundVisibleChild = false;
_getVisibleChild(ac, index);
if (_visibleChild != null) {
! debugString( "[INFO]: getVisibleChild: found child = " +
InvocationUtils.invokeAndWait(new Callable<String>() {
@Override
public String call() throws Exception {
return AccessBridge.this._visibleChild.getAccessibleName();
}
*** 4853,4863 ****
/**
* Increment ref count; set to 1 if we have no references for it
*/
void increment(Object o) {
if (o == null){
! debugString("ObjectReferences::increment - Passed in object is null");
return;
}
if (refs.containsKey(o)) {
(refs.get(o)).value++;
--- 4852,4862 ----
/**
* Increment ref count; set to 1 if we have no references for it
*/
void increment(Object o) {
if (o == null){
! debugString("[WARN]: ObjectReferences::increment - Passed in object is null");
return;
}
if (refs.containsKey(o)) {
(refs.get(o)).value++;
*** 4874,4887 ****
if (aRef != null) {
aRef.value--;
if (aRef.value == 0) {
refs.remove(o);
} else if (aRef.value < 0) {
! debugString("ERROR: decrementing reference count below 0");
}
} else {
! debugString("ERROR: object to decrement not in ObjectReferences table");
}
}
}
--- 4873,4886 ----
if (aRef != null) {
aRef.value--;
if (aRef.value == 0) {
refs.remove(o);
} else if (aRef.value < 0) {
! debugString("[ERROR]: decrementing reference count below 0");
}
} else {
! debugString("[ERROR]: object to decrement not in ObjectReferences table");
}
}
}
*** 5212,5222 ****
* ------- property change event glue
*/
// This is invoked on the EDT , as
public void propertyChange(PropertyChangeEvent e) {
! accessBridge.debugString("propertyChange(" + e.toString() + ") called");
if (e != null && (accessibilityEventMask & PROPERTY_EVENTS) != 0) {
Object o = e.getSource();
AccessibleContext ac;
--- 5211,5221 ----
* ------- property change event glue
*/
// This is invoked on the EDT , as
public void propertyChange(PropertyChangeEvent e) {
! accessBridge.debugString("[INFO]: propertyChange(" + e.toString() + ") called");
if (e != null && (accessibilityEventMask & PROPERTY_EVENTS) != 0) {
Object o = e.getSource();
AccessibleContext ac;
*** 5230,5240 ****
ac = a.getAccessibleContext();
}
if (ac != null) {
InvocationUtils.registerAccessibleContext(ac, AppContext.getAppContext());
! accessBridge.debugString("AccessibleContext: " + ac);
String propertyName = e.getPropertyName();
if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_CARET_PROPERTY) == 0) {
int oldValue = 0;
int newValue = 0;
--- 5229,5239 ----
ac = a.getAccessibleContext();
}
if (ac != null) {
InvocationUtils.registerAccessibleContext(ac, AppContext.getAppContext());
! accessBridge.debugString("[INFO]: AccessibleContext: " + ac);
String propertyName = e.getPropertyName();
if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_CARET_PROPERTY) == 0) {
int oldValue = 0;
int newValue = 0;
*** 5243,5254 ****
oldValue = ((Integer) e.getOldValue()).intValue();
}
if (e.getNewValue() instanceof Integer) {
newValue = ((Integer) e.getNewValue()).intValue();
}
! accessBridge.debugString(" - about to call propertyCaretChange()");
! accessBridge.debugString(" old value: " + oldValue + "new value: " + newValue);
accessBridge.propertyCaretChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY) == 0) {
String oldValue = null;
String newValue = null;
--- 5242,5252 ----
oldValue = ((Integer) e.getOldValue()).intValue();
}
if (e.getNewValue() instanceof Integer) {
newValue = ((Integer) e.getNewValue()).intValue();
}
! accessBridge.debugString("[INFO]: - about to call propertyCaretChange() old value: " + oldValue + "new value: " + newValue);
accessBridge.propertyCaretChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_DESCRIPTION_PROPERTY) == 0) {
String oldValue = null;
String newValue = null;
*** 5257,5268 ****
oldValue = e.getOldValue().toString();
}
if (e.getNewValue() != null) {
newValue = e.getNewValue().toString();
}
! accessBridge.debugString(" - about to call propertyDescriptionChange()");
! accessBridge.debugString(" old value: " + oldValue + "new value: " + newValue);
accessBridge.propertyDescriptionChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_NAME_PROPERTY) == 0) {
String oldValue = null;
String newValue = null;
--- 5255,5265 ----
oldValue = e.getOldValue().toString();
}
if (e.getNewValue() != null) {
newValue = e.getNewValue().toString();
}
! accessBridge.debugString("[INFO]: - about to call propertyDescriptionChange() old value: " + oldValue + "new value: " + newValue);
accessBridge.propertyDescriptionChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_NAME_PROPERTY) == 0) {
String oldValue = null;
String newValue = null;
*** 5271,5286 ****
oldValue = e.getOldValue().toString();
}
if (e.getNewValue() != null) {
newValue = e.getNewValue().toString();
}
! accessBridge.debugString(" - about to call propertyNameChange()");
! accessBridge.debugString(" old value: " + oldValue + " new value: " + newValue);
accessBridge.propertyNameChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY) == 0) {
! accessBridge.debugString(" - about to call propertySelectionChange() " + ac + " " + Thread.currentThread() + " " + e.getSource());
accessBridge.propertySelectionChange(e, ac);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_STATE_PROPERTY) == 0) {
String oldValue = null;
--- 5268,5282 ----
oldValue = e.getOldValue().toString();
}
if (e.getNewValue() != null) {
newValue = e.getNewValue().toString();
}
! accessBridge.debugString("[INFO]: - about to call propertyNameChange() old value: " + oldValue + " new value: " + newValue);
accessBridge.propertyNameChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY) == 0) {
! accessBridge.debugString("[INFO]: - about to call propertySelectionChange() " + ac + " " + Thread.currentThread() + " " + e.getSource());
accessBridge.propertySelectionChange(e, ac);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_STATE_PROPERTY) == 0) {
String oldValue = null;
*** 5294,5308 ****
if (e.getNewValue() != null) {
AccessibleState newState = (AccessibleState) e.getNewValue();
newValue = newState.toDisplayString(Locale.US);
}
! accessBridge.debugString(" - about to call propertyStateChange()");
accessBridge.propertyStateChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_TEXT_PROPERTY) == 0) {
! accessBridge.debugString(" - about to call propertyTextChange()");
accessBridge.propertyTextChange(e, ac);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY) == 0) { // strings 'cause of floating point, etc.
String oldValue = null;
String newValue = null;
--- 5290,5304 ----
if (e.getNewValue() != null) {
AccessibleState newState = (AccessibleState) e.getNewValue();
newValue = newState.toDisplayString(Locale.US);
}
! accessBridge.debugString("[INFO]: - about to call propertyStateChange()");
accessBridge.propertyStateChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_TEXT_PROPERTY) == 0) {
! accessBridge.debugString("[INFO]: - about to call propertyTextChange()");
accessBridge.propertyTextChange(e, ac);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY) == 0) { // strings 'cause of floating point, etc.
String oldValue = null;
String newValue = null;
*** 5311,5321 ****
oldValue = e.getOldValue().toString();
}
if (e.getNewValue() != null) {
newValue = e.getNewValue().toString();
}
! accessBridge.debugString(" - about to call propertyDescriptionChange()");
accessBridge.propertyValueChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY) == 0) {
accessBridge.propertyVisibleDataChange(e, ac);
--- 5307,5317 ----
oldValue = e.getOldValue().toString();
}
if (e.getNewValue() != null) {
newValue = e.getNewValue().toString();
}
! accessBridge.debugString("[INFO]: - about to call propertyDescriptionChange()");
accessBridge.propertyValueChange(e, ac, oldValue, newValue);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY) == 0) {
accessBridge.propertyVisibleDataChange(e, ac);
*** 5330,5341 ****
}
if (e.getNewValue() instanceof AccessibleContext) {
newAC = (AccessibleContext) e.getNewValue();
InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext());
}
! accessBridge.debugString(" - about to call propertyChildChange()");
! accessBridge.debugString(" old AC: " + oldAC + "new AC: " + newAC);
accessBridge.propertyChildChange(e, ac, oldAC, newAC);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY) == 0) {
handleActiveDescendentEvent(e, ac);
}
--- 5326,5336 ----
}
if (e.getNewValue() instanceof AccessibleContext) {
newAC = (AccessibleContext) e.getNewValue();
InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext());
}
! accessBridge.debugString("[INFO]: - about to call propertyChildChange() old AC: " + oldAC + "new AC: " + newAC);
accessBridge.propertyChildChange(e, ac, oldAC, newAC);
} else if (propertyName.compareTo(AccessibleContext.ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY) == 0) {
handleActiveDescendentEvent(e, ac);
}
*** 5394,5407 ****
null);
}
}
prevAC = newAC;
! accessBridge.debugString(" - about to call propertyActiveDescendentChange()");
! accessBridge.debugString(" AC: " + ac);
! accessBridge.debugString(" old AC: " + oldAC + "new AC: " + newAC);
!
InvocationUtils.registerAccessibleContext(oldAC, AppContext.getAppContext());
InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext());
accessBridge.propertyActiveDescendentChange(e, ac, oldAC, newAC);
}
--- 5389,5399 ----
null);
}
}
prevAC = newAC;
! accessBridge.debugString("[INFO]: - about to call propertyActiveDescendentChange() AC: " + ac + " old AC: " + oldAC + "new AC: " + newAC);
InvocationUtils.registerAccessibleContext(oldAC, AppContext.getAppContext());
InvocationUtils.registerAccessibleContext(newAC, AppContext.getAppContext());
accessBridge.propertyActiveDescendentChange(e, ac, oldAC, newAC);
}
*** 5442,5478 ****
accessBridge.focusGained(e, context);
} else if (penult instanceof JPopupMenu) {
// This is a popup with an item selected
FocusEvent e =
new FocusEvent(last, FocusEvent.FOCUS_GAINED);
- accessBridge.debugString(" - about to call focusGained()");
AccessibleContext focusedAC = last.getAccessibleContext();
InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(last));
! accessBridge.debugString(" AC: " + focusedAC);
accessBridge.focusGained(e, focusedAC);
}
}
} else {
// The focus owner has the selection.
if (focusOwner instanceof Accessible) {
FocusEvent e = new FocusEvent(focusOwner,
FocusEvent.FOCUS_GAINED);
- accessBridge.debugString(" - about to call focusGained()");
AccessibleContext focusedAC = focusOwner.getAccessibleContext();
InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(focusOwner));
! accessBridge.debugString(" AC: " + focusedAC);
accessBridge.focusGained(e, focusedAC);
}
}
}
public void focusLost(FocusEvent e) {
if (e != null && (javaEventMask & FOCUS_LOST_EVENTS) != 0) {
Accessible a = Translator.getAccessible(e.getSource());
if (a != null) {
! accessBridge.debugString(" - about to call focusLost()");
! accessBridge.debugString(" AC: " + a.getAccessibleContext());
AccessibleContext context = a.getAccessibleContext();
InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
accessBridge.focusLost(e, context);
}
}
--- 5434,5467 ----
accessBridge.focusGained(e, context);
} else if (penult instanceof JPopupMenu) {
// This is a popup with an item selected
FocusEvent e =
new FocusEvent(last, FocusEvent.FOCUS_GAINED);
AccessibleContext focusedAC = last.getAccessibleContext();
InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(last));
! accessBridge.debugString("[INFO]: - about to call focusGained() AC: " + focusedAC);
accessBridge.focusGained(e, focusedAC);
}
}
} else {
// The focus owner has the selection.
if (focusOwner instanceof Accessible) {
FocusEvent e = new FocusEvent(focusOwner,
FocusEvent.FOCUS_GAINED);
AccessibleContext focusedAC = focusOwner.getAccessibleContext();
InvocationUtils.registerAccessibleContext(focusedAC, SunToolkit.targetToAppContext(focusOwner));
! accessBridge.debugString("[INFO]: - about to call focusGained() AC: " + focusedAC);
accessBridge.focusGained(e, focusedAC);
}
}
}
public void focusLost(FocusEvent e) {
if (e != null && (javaEventMask & FOCUS_LOST_EVENTS) != 0) {
Accessible a = Translator.getAccessible(e.getSource());
if (a != null) {
! accessBridge.debugString("[INFO]: - about to call focusLost() AC: " + a.getAccessibleContext());
AccessibleContext context = a.getAccessibleContext();
InvocationUtils.registerAccessibleContext(context, AppContext.getAppContext());
accessBridge.focusLost(e, context);
}
}
*** 6171,6181 ****
obj = p.getLastPathComponent();
if (treeModel != null && obj != null) {
isLeaf = treeModel.isLeaf(obj);
}
}
! debugString("AccessibleJTreeNode: name = "+getAccessibleName()+"; TreePath = "+p+"; parent = "+ap);
}
private TreePath getChildTreePath(int i) {
// Tree nodes can't be so complex that they have
// two sets of children -> we're ignoring that case
--- 6160,6170 ----
obj = p.getLastPathComponent();
if (treeModel != null && obj != null) {
isLeaf = treeModel.isLeaf(obj);
}
}
! debugString("[INFO]: AccessibleJTreeNode: name = "+getAccessibleName()+"; TreePath = "+p+"; parent = "+ap);
}
private TreePath getChildTreePath(int i) {
// Tree nodes can't be so complex that they have
// two sets of children -> we're ignoring that case
*** 6211,6228 ****
return null;
}
}
private Component getCurrentComponent() {
! debugString("AccessibleJTreeNode: getCurrentComponent");
// is the object visible?
// if so, get row, selected, focus & leaf state,
// and then get the renderer component and return it
if (tree != null && tree.isVisible(path)) {
TreeCellRenderer r = tree.getCellRenderer();
if (r == null) {
! debugString(" returning null 1");
return null;
}
TreeUI ui = tree.getUI();
if (ui != null) {
int row = ui.getRowForPath(tree, path);
--- 6200,6217 ----
return null;
}
}
private Component getCurrentComponent() {
! debugString("[INFO]: AccessibleJTreeNode: getCurrentComponent");
// is the object visible?
// if so, get row, selected, focus & leaf state,
// and then get the renderer component and return it
if (tree != null && tree.isVisible(path)) {
TreeCellRenderer r = tree.getCellRenderer();
if (r == null) {
! debugString("[WARN]: returning null 1");
return null;
}
TreeUI ui = tree.getUI();
if (ui != null) {
int row = ui.getRowForPath(tree, path);
*** 6230,6244 ****
boolean expanded = tree.isExpanded(path);
boolean hasFocus = false; // how to tell?? -PK
Component retval = r.getTreeCellRendererComponent(tree, obj,
selected, expanded,
isLeaf, row, hasFocus);
! debugString(" returning = "+retval.getClass());
return retval;
}
}
! debugString(" returning null 2");
return null;
}
// AccessibleContext methods
--- 6219,6233 ----
boolean expanded = tree.isExpanded(path);
boolean hasFocus = false; // how to tell?? -PK
Component retval = r.getTreeCellRendererComponent(tree, obj,
selected, expanded,
isLeaf, row, hasFocus);
! debugString("[INFO]: returning = "+retval.getClass());
return retval;
}
}
! debugString("[WARN]: returning null 2");
return null;
}
// AccessibleContext methods
*** 6247,6263 ****
*
* @return the localized name of the object; null if this
* object does not have a name
*/
public String getAccessibleName() {
! debugString("AccessibleJTreeNode: getAccessibleName");
AccessibleContext ac = getCurrentAccessibleContext();
if (ac != null) {
String name = ac.getAccessibleName();
if ((name != null) && (!name.isEmpty())) {
String retval = ac.getAccessibleName();
! debugString(" returning "+retval);
return retval;
} else {
return null;
}
}
--- 6236,6252 ----
*
* @return the localized name of the object; null if this
* object does not have a name
*/
public String getAccessibleName() {
! debugString("[INFO]: AccessibleJTreeNode: getAccessibleName");
AccessibleContext ac = getCurrentAccessibleContext();
if (ac != null) {
String name = ac.getAccessibleName();
if ((name != null) && (!name.isEmpty())) {
String retval = ac.getAccessibleName();
! debugString("[INFO]: returning "+retval);
return retval;
} else {
return null;
}
}
< prev index next >