summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-06-12 07:02:37 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-06-12 07:02:37 +0000
commit6bba2ad488056d52e2d92a1bec84bef0c6ed2945 (patch)
tree1ca4939b044a2113f6343476081eeddbfe1907e8 /accessibility
parente3e2c8eb2d66c1dd53a5edfb861aaebcfa8d2484 (diff)
INTEGRATION: CWS uaa04 (1.3.12); FILE MERGED
2003/06/02 12:49:58 obr 1.3.12.1: #109747# implement getAccessibleContext in a failsafe way, so that it can't kill the dispatch thread of the Java AccessBridge for Windows
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java25
1 files changed, 10 insertions, 15 deletions
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java b/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java
index bc4ce3f0a1ad..e2865b848591 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/ToggleButton.java
@@ -54,28 +54,23 @@
*
*
************************************************************************/
-
package org.openoffice.java.accessibility;
-import com.sun.star.uno.*;
import com.sun.star.accessibility.*;
+import com.sun.star.uno.*;
-class ToggleButton extends AbstractButton implements javax.accessibility.Accessible {
+class ToggleButton extends AbstractButton implements javax.accessibility.Accessible {
public ToggleButton(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
super(xAccessible, xAccessibleContext);
}
- /** Returns the AccessibleContext associated with this object */
- public javax.accessibility.AccessibleContext getAccessibleContext() {
- if (accessibleContext == null) {
- accessibleContext = new AccessibleToggleButton();
- }
- return accessibleContext;
+ /** Creates the AccessibleContext associated with this object */
+ public javax.accessibility.AccessibleContext createAccessibleContext() {
+ return new AccessibleToggleButton();
}
protected class AccessibleToggleButton extends AccessibleAbstractButton {
-
/** Gets the role of this object */
public javax.accessibility.AccessibleRole getAccessibleRole() {
return javax.accessibility.AccessibleRole.TOGGLE_BUTTON;
@@ -84,14 +79,14 @@ class ToggleButton extends AbstractButton implements javax.accessibility.Accessi
/** Gets the AccessibleValue associated with this object that has a graphical representation */
public javax.accessibility.AccessibleValue getAccessibleValue() {
try {
- XAccessibleValue unoAccessibleValue = (XAccessibleValue)
- UnoRuntime.queryInterface(XAccessibleValue.class, unoAccessibleContext);
- return (unoAccessibleValue != null) ?
- new AccessibleValueImpl(unoAccessibleValue) : null;
+ XAccessibleValue unoAccessibleValue = (XAccessibleValue) UnoRuntime.queryInterface(XAccessibleValue.class,
+ unoAccessibleContext);
+
+ return (unoAccessibleValue != null)
+ ? new AccessibleValueImpl(unoAccessibleValue) : null;
} catch (com.sun.star.uno.RuntimeException e) {
return null;
}
}
}
}
-