summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-06-12 07:00:28 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-06-12 07:00:28 +0000
commit2941fe05831805694dfbf85e314bfd9a8728bef9 (patch)
treee898a12925bcbc41753fc7b5d58c44f03da38066 /accessibility
parentf43c9903d4961bbd96ef0091e7627339b7162559 (diff)
INTEGRATION: CWS uaa04 (1.3.12); FILE MERGED
2003/06/02 12:49:54 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/Icon.java44
1 files changed, 21 insertions, 23 deletions
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Icon.java b/accessibility/bridge/org/openoffice/java/accessibility/Icon.java
index 388ce4006d69..44022e76ecb4 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Icon.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Icon.java
@@ -54,34 +54,28 @@
*
*
************************************************************************/
-
package org.openoffice.java.accessibility;
+import com.sun.star.accessibility.*;
+import com.sun.star.uno.*;
+
import javax.accessibility.AccessibleState;
import javax.accessibility.AccessibleStateSet;
-import com.sun.star.uno.*;
-import com.sun.star.accessibility.*;
-
/**
*/
public class Icon extends Component implements javax.accessibility.Accessible {
-
protected Icon(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
super(xAccessible, xAccessibleContext);
}
- /** Returns the AccessibleContext associated with this object */
- public javax.accessibility.AccessibleContext getAccessibleContext() {
- if (accessibleContext == null) {
- accessibleContext = new AccessibleIcon();
- }
- return accessibleContext;
+ /** Creates the AccessibleContext associated with this object */
+ public javax.accessibility.AccessibleContext createAccessibleContext() {
+ return new AccessibleIcon();
}
protected class AccessibleIcon extends AccessibleUNOComponent {
-
/**
* Though the class is abstract, this should be called by all sub-classes
*/
@@ -92,14 +86,19 @@ public class Icon extends Component implements javax.accessibility.Accessible {
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleIcon[] getAccessibleIcon() {
try {
- XAccessibleImage unoAccessibleImage = (XAccessibleImage)
- UnoRuntime.queryInterface(XAccessibleImage.class, unoAccessibleComponent);
+ XAccessibleImage unoAccessibleImage = (XAccessibleImage) UnoRuntime.queryInterface(XAccessibleImage.class,
+ unoAccessibleComponent);
+
if (unoAccessibleImage != null) {
- javax.accessibility.AccessibleIcon[] icons = { new AccessibleIconImpl(unoAccessibleImage) };
+ javax.accessibility.AccessibleIcon[] icons = {
+ new AccessibleIconImpl(unoAccessibleImage)
+ };
+
return icons;
}
} catch (com.sun.star.uno.RuntimeException e) {
}
+
return null;
}
@@ -110,13 +109,12 @@ public class Icon extends Component implements javax.accessibility.Accessible {
* of the object
* @see AccessibleState
*/
-/*
- public AccessibleStateSet getAccessibleStateSet() {
- AccessibleStateSet states = super.getAccessibleStateSet();
- return states;
- }
-*/
+
+ /*
+ public AccessibleStateSet getAccessibleStateSet() {
+ AccessibleStateSet states = super.getAccessibleStateSet();
+ return states;
+ }
+ */
}
}
-
-