summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-06-12 07:02:49 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-06-12 07:02:49 +0000
commit129e21082a5a5a964f7a8a261525524ec8ba7f12 (patch)
tree933f60017f6f680fa0a826c26931dac34f7af5d4 /accessibility
parent6bba2ad488056d52e2d92a1bec84bef0c6ed2945 (diff)
INTEGRATION: CWS uaa04 (1.3.12); FILE MERGED
2003/06/02 12:49:59 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/ToolTip.java113
1 files changed, 52 insertions, 61 deletions
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java b/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java
index ba8d95c08200..fecbcae37b3d 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/ToolTip.java
@@ -54,40 +54,29 @@
*
*
************************************************************************/
-
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 ToolTip extends Component implements javax.accessibility.Accessible {
-
protected ToolTip(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
super(xAccessible, xAccessibleContext);
}
- /** Returns the AccessibleContext associated with this object */
- public javax.accessibility.AccessibleContext getAccessibleContext() {
- if (accessibleContext == null) {
- accessibleContext = new AccessibleToolTip();
- }
- return accessibleContext;
+ /** Creates the AccessibleContext associated with this object */
+ public javax.accessibility.AccessibleContext createAccessibleContext() {
+ return new AccessibleToolTip();
}
protected class AccessibleToolTip extends AccessibleUNOComponent {
- /**
- * Though the class is abstract, this should be called by all sub-classes
- */
- protected AccessibleToolTip() {
- super();
- }
-
/*
* AccessibleContext
*/
@@ -100,8 +89,9 @@ public class ToolTip extends Component implements javax.accessibility.Accessible
/** Gets the AccessibleText associated with this object presenting text on the display */
public javax.accessibility.AccessibleText getAccessibleText() {
try {
- XAccessibleText unoAccessibleText = (XAccessibleText)
- UnoRuntime.queryInterface(XAccessibleText.class,unoAccessibleComponent);
+ XAccessibleText unoAccessibleText = (XAccessibleText) UnoRuntime.queryInterface(XAccessibleText.class,
+ unoAccessibleComponent);
+
if (unoAccessibleText != null) {
return new AccessibleTextImpl(unoAccessibleText);
} else {
@@ -119,49 +109,50 @@ public class ToolTip 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;
+ }
+ */
+
/** Returns the relation set of this object */
-/*
- public javax.accessibility.AccessibleRelationSet getAccessibleRelationSet() {
- try {
- XAccessibleRelationSet unoAccessibleRelationSet = unoAccessibleContext.getAccessibleRelationSet();
- if (unoAccessibleRelationSet == null) {
- return null;
- }
- javax.accessibility.AccessibleRelationSet relationSet = new javax.accessibility.AccessibleRelationSet();
- int count = unoAccessibleRelationSet.getRelationCount();
- for (int i = 0; i < count; i++) {
- AccessibleRelation unoAccessibleRelation = unoAccessibleRelationSet.getRelation(i);
- switch (unoAccessibleRelation.RelationType) {
- case AccessibleRelationType.LABEL_FOR:
- relationSet.add(new javax.accessibility.AccessibleRelation(
- javax.accessibility.AccessibleRelation.LABEL_FOR,
- getAccessibleComponents(unoAccessibleRelation.TargetSet)));
- break;
- case AccessibleRelationType.MEMBER_OF:
- relationSet.add(new javax.accessibility.AccessibleRelation(
- javax.accessibility.AccessibleRelation.MEMBER_OF,
- getAccessibleComponents(unoAccessibleRelation.TargetSet)));
- break;
- default:
- break;
- }
- }
- return relationSet;
- } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- return null;
- } catch (com.sun.star.uno.RuntimeException e) {
- return null;
- }
- }
-*/
+ /*
+ public javax.accessibility.AccessibleRelationSet getAccessibleRelationSet() {
+ try {
+ XAccessibleRelationSet unoAccessibleRelationSet = unoAccessibleContext.getAccessibleRelationSet();
+ if (unoAccessibleRelationSet == null) {
+ return null;
+ }
+
+ javax.accessibility.AccessibleRelationSet relationSet = new javax.accessibility.AccessibleRelationSet();
+ int count = unoAccessibleRelationSet.getRelationCount();
+ for (int i = 0; i < count; i++) {
+ AccessibleRelation unoAccessibleRelation = unoAccessibleRelationSet.getRelation(i);
+ switch (unoAccessibleRelation.RelationType) {
+ case AccessibleRelationType.LABEL_FOR:
+ relationSet.add(new javax.accessibility.AccessibleRelation(
+ javax.accessibility.AccessibleRelation.LABEL_FOR,
+ getAccessibleComponents(unoAccessibleRelation.TargetSet)));
+ break;
+ case AccessibleRelationType.MEMBER_OF:
+ relationSet.add(new javax.accessibility.AccessibleRelation(
+ javax.accessibility.AccessibleRelation.MEMBER_OF,
+ getAccessibleComponents(unoAccessibleRelation.TargetSet)));
+ break;
+ default:
+ break;
+ }
+ }
+ return relationSet;
+ } catch (com.sun.star.lang.IndexOutOfBoundsException e) {
+ return null;
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+ */
}
}
-
-