summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorOliver Braun <obr@openoffice.org>2003-01-13 10:00:34 +0000
committerOliver Braun <obr@openoffice.org>2003-01-13 10:00:34 +0000
commit6b355810b72d26a5bbd691d5bc5c70bf8f8fdbc6 (patch)
tree9cad02c65018428ffa1c5ce69a2a2cf0dc09f088 /accessibility
parentd389e175df5cfe318d75ab16da94f43ba1e6fceb (diff)
#106220#,#106226# various deadlocks etc. fixed
Diffstat (limited to 'accessibility')
-rwxr-xr-xaccessibility/bridge/org/openoffice/accessibility/AccessBridge.java25
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java11
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java13
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java150
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java62
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Component.java319
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Dialog.java227
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Frame.java210
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java5
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java66
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Window.java219
11 files changed, 882 insertions, 425 deletions
diff --git a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
index 98c506188ca2..39647d7a8406 100755
--- a/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
+++ b/accessibility/bridge/org/openoffice/accessibility/AccessBridge.java
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessBridge.java,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: obr $ $Date: 2002-12-06 12:54:43 $
+ * last change: $Author: obr $ $Date: 2003-01-13 11:00:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -314,10 +314,10 @@ public class AccessBridge {
try {
// The office sometimes registers frames more than once, so check here if already done
Integer handle = new Integer(AnyConverter.toInt(any));
- if( ! frameMap.containsKey(handle) ) {
+ if (! frameMap.containsKey(handle)) {
java.awt.Window w = factory.getTopWindow(xAccessible);
- if( Build.DEBUG ) {
+ if (Build.DEBUG) {
System.out.println("register native frame: " + handle);
}
@@ -351,7 +351,24 @@ public class AccessBridge {
System.out.println("revoke native frame: " + handle);
}
+ // It seems that we have to do this synchronously, because otherwise on exit
+ // the main thread of the office terminates before AWT has shut down and the
+ // process will hang ..
w.dispose();
+
+/*
+ class DisposeAction implements Runnable {
+ java.awt.Window window;
+ DisposeAction(java.awt.Window w) {
+ window = w;
+ }
+ public void run() {
+ window.dispose();
+ }
+ }
+
+ java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().invokeLater(new DisposeAction(w));
+*/
}
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java b/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java
index 890c45fd1a89..7629fae82197 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AbstractButton.java
@@ -2,9 +2,9 @@
*
* $RCSfile: AbstractButton.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: obr $ $Date: 2002-12-06 11:25:30 $
+ * last change: $Author: obr $ $Date: 2003-01-13 11:00:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -132,6 +132,13 @@ public abstract class AbstractButton extends Component {
*/
public AccessibleStateSet getAccessibleStateSet() {
AccessibleStateSet states = super.getAccessibleStateSet();
+ // FIXME: quick hack to avoid dead lock in Window.dispose ..
+ if (java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().isDispatchThread()) {
+ return states;
+ }
+ if (!isShowing()) {
+ return states;
+ }
try {
XAccessibleStateSet unoAccessibleStateSet =
unoAccessible.getAccessibleContext().getAccessibleStateSet();
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java
index 538695132916..8dd6d7453ffe 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl.java
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessibleComponentImpl.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: obr $ $Date: 2002-12-06 11:25:31 $
+ * last change: $Author: obr $ $Date: 2003-01-13 11:00:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -96,6 +96,7 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo
* XAccessibleComponent
*/
+ /** Returns the background color of the object */
public java.awt.Color getBackground() {
try {
return new java.awt.Color(unoObject.getBackground());
@@ -108,6 +109,7 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo
// Not supported by UNO accessibility API
}
+ /** Returns the foreground color of the object */
public java.awt.Color getForeground() {
try {
return new java.awt.Color(unoObject.getForeground());
@@ -171,6 +173,7 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo
}
}
+ /** Returns the location of the object on the screen. */
public java.awt.Point getLocationOnScreen() {
try {
com.sun.star.awt.Point unoPoint = unoObject.getLocationOnScreen();
@@ -180,6 +183,7 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo
}
}
+ /** Gets the location of this component in the form of a point specifying the component's top-left corner */
public java.awt.Point getLocation() {
try {
com.sun.star.awt.Point unoPoint = unoObject.getLocation();
@@ -189,10 +193,12 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo
}
}
+ /** Moves this component to a new location */
public void setLocation(java.awt.Point p) {
// Not supported by UNO accessibility API
}
+ /** Gets the bounds of this component in the form of a Rectangle object */
public java.awt.Rectangle getBounds() {
try {
com.sun.star.awt.Rectangle unoRect = unoObject.getBounds();
@@ -202,10 +208,12 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo
}
}
+ /** Moves and resizes this component to conform to the new bounding rectangle r */
public void setBounds(java.awt.Rectangle r) {
// Not supported by UNO accessibility API
}
+ /** Returns the size of this component in the form of a Dimension object */
public java.awt.Dimension getSize() {
try {
com.sun.star.awt.Size unoSize = unoObject.getSize();
@@ -215,6 +223,7 @@ public class AccessibleComponentImpl implements javax.accessibility.AccessibleCo
}
}
+ /** Resizes this component so that it has width d.width and height d.height */
public void setSize(java.awt.Dimension d) {
// Not supported by UNO accessibility API
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java
index 260a09287253..9b737e4f8240 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory.java
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessibleObjectFactory.java,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: obr $ $Date: 2002-12-06 11:25:32 $
+ * last change: $Author: obr $ $Date: 2003-01-13 11:00:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -126,119 +126,6 @@ public class AccessibleObjectFactory extends java.awt.FocusTraversalPolicy {
return null;
}
-/*
- public AccessibleUNOComponent createAccessibleContext(XAccessibleContext xAccessibleContext) {
- AccessibleUNOComponent ac = null;
-
- // Ensure that we really got an UNO accessible context
- if( xAccessibleContext != null ) {
- try {
- short role = xAccessibleContext.getAccessibleRole();
- XAccessibleStateSet xStateSet = null;
-
- switch(role) {
- case AccessibleRole.LIST:
- ac = new AccessibleList(xAccessibleContext);
- break;
- case AccessibleRole.MENUBAR:
- case AccessibleRole.POPUPMENU:
- ac = new AccessibleContainer(
- AccessibleRoleMap.toAccessibleRole(role),
- xAccessibleContext
- );
- break;
- case AccessibleRole.LABEL:
- case AccessibleRole.TABLE_CELL:
- xStateSet = xAccessibleContext.getAccessibleStateSet();
- if( xStateSet != null && ! xStateSet.contains(AccessibleStateType.TRANSIENT)) {
- ac = new AccessibleLabel(xAccessibleContext);
- } else {
- ac = new AccessibleFixedText(
- javax.accessibility.AccessibleRole.LABEL,
- xAccessibleContext
- );
- }
- break;
- case AccessibleRole.COLUMNHEADER:
- case AccessibleRole.ROWHEADER:
- ac = new AccessibleFixedText(
- AccessibleRoleMap.toAccessibleRole(role),
- xAccessibleContext
- );
- break;
- case AccessibleRole.DIALOG:
- case AccessibleRole.FRAME:
- ac = new AccessibleFrame(
- AccessibleRoleMap.toAccessibleRole(role),
- xAccessibleContext
- );
- break;
- case AccessibleRole.ICON:
- case AccessibleRole.GRAPHIC:
- case AccessibleRole.SHAPE:
- case AccessibleRole.EMBEDDED_OBJECT:
- ac = new AccessibleImage(xAccessibleContext);
- break;
- case AccessibleRole.LISTITEM:
- ac = new AccessibleListItem(xAccessibleContext);
- break;
- case AccessibleRole.MENU:
- ac = new AccessibleMenu(xAccessibleContext);
- break;
- case AccessibleRole.MENUITEM:
- ac = new AccessibleMenuItem(xAccessibleContext);
- break;
- case AccessibleRole.PARAGRAPH:
- ac = new AccessibleParagraph(xAccessibleContext);
- break;
- case AccessibleRole.SCROLLBAR:
- ac = new AccessibleScrollBar(xAccessibleContext);
- break;
- case AccessibleRole.TABLE:
- xStateSet = xAccessibleContext.getAccessibleStateSet();
- if(xStateSet != null && ! xStateSet.contains(AccessibleStateType.CHILDREN_TRANSIENT)) {
- ac = new AccessibleTextTable(xAccessibleContext);
- } else {
- ac = new AccessibleSpreadsheet(xAccessibleContext);
- }
- break;
- case AccessibleRole.TEXT:
- ac = new AccessibleEditLine(xAccessibleContext);
- break;
- case AccessibleRole.TREE:
- ac = new AccessibleTreeList(xAccessibleContext);
- break;
- case AccessibleRole.CANVAS:
- case AccessibleRole.DOCUMENT:
- case AccessibleRole.ENDNOTE:
- case AccessibleRole.FILLER:
- case AccessibleRole.FOOTER:
- case AccessibleRole.FOOTNOTE:
- case AccessibleRole.HEADER:
- case AccessibleRole.PAGETABLIST:
- case AccessibleRole.PANEL:
- case AccessibleRole.TOOLBAR:
- ac = new AccessibleWindow(
- AccessibleRoleMap.toAccessibleRole(role),
- xAccessibleContext
- );
- break;
- default:
- if( Build.DEBUG) {
- System.out.println("Unmapped role: " + AccessibleRoleMap.toAccessibleRole(role)
- + " (id = " + role + ")");
- }
- break;
- }
-
- // Register as event listener if possible
- AccessibleEventListener listener = null;
- if( ac instanceof AccessibleEventListener ) {
- listener = (AccessibleEventListener) ac;
- }
-
- }
-*/
private java.awt.EventQueue eventQueue = java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue();
public java.awt.EventQueue getEventQueue() {
@@ -449,7 +336,7 @@ public class AccessibleObjectFactory extends java.awt.FocusTraversalPolicy {
break;
case AccessibleRole.PARAGRAPH:
case AccessibleRole.HEADING:
- c = new TextComponent(xAccessible, xAccessibleComponent, true);
+ c = new TextComponent(xAccessible, xAccessibleComponent, xAccessibleStateSet);
break;
case AccessibleRole.PANEL:
c = new Container(javax.accessibility.AccessibleRole.PANEL,
@@ -498,12 +385,20 @@ public class AccessibleObjectFactory extends java.awt.FocusTraversalPolicy {
xAccessible, xAccessibleComponent);
break;
case AccessibleRole.TABLE:
- c = new Table(xAccessible, xAccessibleComponent,
- xAccessibleStateSet.contains(AccessibleStateType.MULTISELECTABLE));
+ if (xAccessibleStateSet.contains(AccessibleStateType.MANAGES_DESCENDANT)) {
+ c = new Table(xAccessible, xAccessibleComponent,
+ xAccessibleStateSet.contains(AccessibleStateType.MULTISELECTABLE));
+ } else {
+ c = new Container(javax.accessibility.AccessibleRole.TABLE,
+ xAccessible, xAccessibleComponent);
+ }
+ break;
+ case AccessibleRole.TABLE_CELL:
+ c = new Container(javax.accessibility.AccessibleRole.PANEL,
+ xAccessible, xAccessibleComponent);
break;
case AccessibleRole.TEXT:
- c = new TextComponent(xAccessible, xAccessibleComponent,
- xAccessibleStateSet.contains(AccessibleStateType.MULTILINE));
+ c = new TextComponent(xAccessible, xAccessibleComponent, xAccessibleStateSet);
break;
case AccessibleRole.TEXT_FRAME:
c = new Container(javax.accessibility.AccessibleRole.PANEL,
@@ -539,13 +434,10 @@ public class AccessibleObjectFactory extends java.awt.FocusTraversalPolicy {
}
}
// Set the boundings of the component if it is visible ..
- if (xAccessibleStateSet.contains(AccessibleStateType.VISIBLE)) {
- com.sun.star.awt.Rectangle r = xAccessibleComponent.getBounds();
- c.setBounds(r.X, r.Y, r.Width, r.Height);
- } else {
+ if (!xAccessibleStateSet.contains(AccessibleStateType.VISIBLE)) {
c.setVisible(false);
}
- // Set the components' enabled enabled..
+ // Set the components' enabled state ..
if (!xAccessibleStateSet.contains(AccessibleStateType.ENABLED)) {
c.setEnabled(false);
}
@@ -554,6 +446,14 @@ public class AccessibleObjectFactory extends java.awt.FocusTraversalPolicy {
return c;
}
+ protected void disposing(java.awt.Component c) {
+ if (c != null) {
+ synchronized (objectList) {
+ objectList.remove(c.toString());
+ }
+ }
+ }
+
/*
protected java.? createTransientObject()
*/
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java
index 174c1e5025be..9d4b9b77215d 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java
@@ -2,9 +2,9 @@
*
* $RCSfile: AccessibleTextImpl.java,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: obr $ $Date: 2002-12-06 11:25:33 $
+ * last change: $Author: obr $ $Date: 2003-01-13 11:00:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -150,15 +150,21 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
if (property.Name.equals("ParaAdjust")) {
ParagraphAdjust adjust = (ParagraphAdjust)
AnyConverter.toObject(new Type(ParagraphAdjust.class), property.Value);
-
- if (adjust.equals(ParagraphAdjust.LEFT)) {
- StyleConstants.setAlignment(as, StyleConstants.ALIGN_LEFT);
- } else if (adjust.equals(ParagraphAdjust.RIGHT)) {
- StyleConstants.setAlignment(as, StyleConstants.ALIGN_RIGHT);
- } else if (adjust.equals(ParagraphAdjust.CENTER)) {
- StyleConstants.setAlignment(as, StyleConstants.ALIGN_CENTER);
- } else if (adjust.equals(ParagraphAdjust.BLOCK) || adjust.equals(ParagraphAdjust.STRETCH)) {
- StyleConstants.setAlignment(as, StyleConstants.ALIGN_JUSTIFIED);
+ if (adjust == null) {
+ adjust = ParagraphAdjust.fromInt(AnyConverter.toInt(property.Value));
+ }
+ if (adjust != null) {
+ if (adjust.equals(ParagraphAdjust.LEFT)) {
+ StyleConstants.setAlignment(as, StyleConstants.ALIGN_LEFT);
+ } else if (adjust.equals(ParagraphAdjust.RIGHT)) {
+ StyleConstants.setAlignment(as, StyleConstants.ALIGN_RIGHT);
+ } else if (adjust.equals(ParagraphAdjust.CENTER)) {
+ StyleConstants.setAlignment(as, StyleConstants.ALIGN_CENTER);
+ } else if (adjust.equals(ParagraphAdjust.BLOCK) || adjust.equals(ParagraphAdjust.STRETCH)) {
+ StyleConstants.setAlignment(as, StyleConstants.ALIGN_JUSTIFIED);
+ }
+ } else if (Build.DEBUG) {
+ System.err.println("Invalid property value for key ParaAdjust: " + property.Value.getClass().getName());
}
// Map background color
@@ -243,41 +249,37 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
// Set tabset attribute
} else if (property.Name.equals("ParaTabStops")) {
TabStop[] unoTabStops = (TabStop[]) AnyConverter.toArray(property.Value);
- java.util.ArrayList tabStops = new java.util.ArrayList(unoTabStops.length);
+ javax.swing.text.TabStop[] tabStops = new javax.swing.text.TabStop[unoTabStops.length];
for (int index2 = 0; index2 < unoTabStops.length; index2++) {
float pos = (float) (toPointFactor * unoTabStops[index2].Position);
if (unoTabStops[index2].Alignment.equals(TabAlign.LEFT)) {
- tabStops.add(new javax.swing.text.TabStop(pos,
+ tabStops[index2] = new javax.swing.text.TabStop(pos,
javax.swing.text.TabStop.ALIGN_LEFT,
- javax.swing.text.TabStop.LEAD_NONE)
- );
+ javax.swing.text.TabStop.LEAD_NONE);
}
else if (unoTabStops[index2].Alignment.equals(TabAlign.CENTER)) {
- tabStops.add(new javax.swing.text.TabStop(pos,
+ tabStops[index2] = new javax.swing.text.TabStop(pos,
javax.swing.text.TabStop.ALIGN_CENTER,
- javax.swing.text.TabStop.LEAD_NONE)
- );
+ javax.swing.text.TabStop.LEAD_NONE);
}
else if (unoTabStops[index2].Alignment.equals(TabAlign.RIGHT)) {
- tabStops.add(new javax.swing.text.TabStop(pos,
+ tabStops[index2] = new javax.swing.text.TabStop(pos,
javax.swing.text.TabStop.ALIGN_RIGHT,
- javax.swing.text.TabStop.LEAD_NONE)
- );
+ javax.swing.text.TabStop.LEAD_NONE);
}
else if (unoTabStops[index2].Alignment.equals(TabAlign.DECIMAL)) {
- tabStops.add(new javax.swing.text.TabStop(pos,
+ tabStops[index2] = new javax.swing.text.TabStop(pos,
javax.swing.text.TabStop.ALIGN_DECIMAL,
- javax.swing.text.TabStop.LEAD_NONE)
- );
+ javax.swing.text.TabStop.LEAD_NONE);
}
else {
- tabStops.add(new javax.swing.text.TabStop(pos));
+ tabStops[index2] = new javax.swing.text.TabStop(pos);
}
}
- StyleConstants.setTabSet(as, new javax.swing.text.TabSet((javax.swing.text.TabStop[]) tabStops.toArray()));
+ StyleConstants.setTabSet(as, new javax.swing.text.TabSet(tabStops));
// Set underline attribute
} else if (property.Name.equals("CharUnderline")) {
@@ -313,10 +315,10 @@ public class AccessibleTextImpl implements javax.accessibility.AccessibleText {
/** Given a point in local coordinates, return the zero-based index of the character under that point */
public int getIndexAtPoint(java.awt.Point point) {
try {
-// if (Build.DEBUG) {
-// System.err.println(this + "getIndexAtPoint(" + point.x + ", " + point.y + ") returns " +
-// unoObject.getIndexAtPoint(new Point(point.x, point.y)));
-// }
+ if (Build.DEBUG) {
+ System.err.println(this + "getIndexAtPoint(" + point.x + ", " + point.y + ") returns " +
+ unoObject.getIndexAtPoint(new Point(point.x, point.y)));
+ }
return unoObject.getIndexAtPoint(new Point(point.x, point.y));
} catch (com.sun.star.uno.RuntimeException e) {
if (Build.DEBUG) {
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Component.java b/accessibility/bridge/org/openoffice/java/accessibility/Component.java
index cac63f231787..6ce0aa8ebd8e 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Component.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Component.java
@@ -2,9 +2,9 @@
*
* $RCSfile: Component.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: obr $ $Date: 2002-12-06 11:25:34 $
+ * last change: $Author: obr $ $Date: 2003-01-13 11:00:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,6 +83,8 @@ public abstract class Component extends java.awt.Component {
protected XAccessible unoAccessible = null;
protected XAccessibleComponent unoAccessibleComponent = null;
+ protected boolean disposed = false;
+
protected Component() {
super();
// enableEvents(java.awt.AWTEvent.FOCUS_EVENT_MASK);
@@ -130,60 +132,24 @@ public abstract class Component extends java.awt.Component {
/** Requests focus for this object */
public void requestFocus() {
- if (isShowing()) {
- try {
- unoAccessibleComponent.grabFocus();
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
}
+
/** Requests focus for this object */
- protected boolean requestFocus(boolean temporary) {
+ public boolean requestFocus(boolean temporary) {
// Must be a no-op to make focus handling work
return true;
}
- /** Returns the location of the object on the screen. */
- public java.awt.Point getLocationOnScreen() {
- java.awt.Container parent = getParent();
- if (parent != null) {
- // Retrieve location of the parent object
- java.awt.Point p = parent.getLocationOnScreen();
-
- // Add relative coordinates of the object
- if (p != null) {
- p.translate(getX(), getY());
- return p;
- }
- }
-
- return null;
+ public boolean requestFocusInWindow() {
+ return requestFocusInWindow(false);
}
- /** Returns the foreground color of the object */
- public java.awt.Color getForeground() {
- if (isShowing()) {
- try {
- return new java.awt.Color(unoAccessibleComponent.getForeground());
- } catch (com.sun.star.uno.RuntimeException e) {
- return null;
- }
- } else {
- return null;
- }
- }
-
- /** Returns the background color of the object */
- public java.awt.Color getBackground() {
- if (isShowing()) {
- try {
- return new java.awt.Color(unoAccessibleComponent.getBackground());
- } catch (com.sun.star.uno.RuntimeException e) {
- return null;
- }
- } else {
- return null;
+ protected boolean requestFocusInWindow(boolean temporary) {
+ if (isFocusable() && isVisible()) {
+ getEventQueue().postEvent(new java.awt.event.FocusEvent(this, java.awt.event.FocusEvent.FOCUS_GAINED, temporary));
+ return true;
}
+ return false;
}
public Object[] getAccessibleComponents(Object[] targetSet) {
@@ -229,14 +195,23 @@ public abstract class Component extends java.awt.Component {
}
public void run() {
- AccessibleContext ac = accessibleContext;
- if (ac != null) {
- ac.firePropertyChange(propertyName, oldValue, newValue);
- } else if (Build.DEBUG) {
- XAccessibleContext xac = unoAccessible.getAccessibleContext();
- System.err.println("Ignoring event: " + propertyName + " for " +
- AccessibleRoleAdapter.getAccessibleRole(xac.getAccessibleRole()) +
- " " + xac.getAccessibleName());
+ // Because this code is executed in the DispatchThread, it is better to catch every
+ // exception that might occur
+ try {
+ AccessibleContext ac = accessibleContext;
+ if (ac != null) {
+ ac.firePropertyChange(propertyName, oldValue, newValue);
+ } else if (Build.DEBUG) {
+ XAccessibleContext xac = unoAccessible.getAccessibleContext();
+ System.err.println("Ignoring event: " + propertyName + " for " +
+ AccessibleRoleAdapter.getAccessibleRole(xac.getAccessibleRole()) +
+ " " + xac.getAccessibleName());
+ }
+ } catch (java.lang.Exception e) {
+ if (Build.DEBUG) {
+ System.err.println(e.getClass().getName() + " caught propagating " + propertyName + " event: " + e.getMessage());
+ e.printStackTrace();
+ }
}
}
}
@@ -285,19 +260,9 @@ public abstract class Component extends java.awt.Component {
fireStatePropertyChange(AccessibleState.SELECTED, enable);
break;
case AccessibleStateType.SHOWING:
- if (enable) {
- // Query bounding boxes if component becomes visible
- com.sun.star.awt.Rectangle r = unoAccessibleComponent.getBounds();
- Component.this.setBounds(r.X, r.Y, r.Width, r.Height);
- }
// fireStatePropertyChange(AccessibleState.SHOWING, enable);
break;
case AccessibleStateType.VISIBLE:
- if (enable) {
- // Query bounding boxes if component becomes visible
- com.sun.star.awt.Rectangle r = unoAccessibleComponent.getBounds();
- Component.this.setBounds(r.X, r.Y, r.Width, r.Height);
- }
Component.this.setVisible(enable);
break;
default:
@@ -348,24 +313,6 @@ public abstract class Component extends java.awt.Component {
}
}
- /** Fires a visible data property change event */
- protected void handleVisibleDataEvent() {
- try {
- com.sun.star.awt.Rectangle r = unoAccessibleComponent.getBounds();
- Component.this.setBounds(r.X, r.Y, r.Width, r.Height);
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-
- /** Updates internal bounding box cache */
- protected void handleBoundRectEvent() {
- try {
- com.sun.star.awt.Rectangle r = unoAccessibleComponent.getBounds();
- Component.this.setBounds(r.X, r.Y, r.Width, r.Height);
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
switch (event.EventId) {
@@ -384,11 +331,8 @@ public abstract class Component extends java.awt.Component {
handleStateChangedEvent(event.OldValue, event.NewValue);
break;
case AccessibleEventId.ACCESSIBLE_VISIBLE_DATA_EVENT:
- handleVisibleDataEvent();
- firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null);
- break;
case AccessibleEventId.ACCESSIBLE_BOUNDRECT_EVENT:
- handleBoundRectEvent();
+ firePropertyChange(AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null);
break;
case AccessibleEventId.ACCESSIBLE_TEXT_EVENT:
// FIXME: enhance text information ..
@@ -404,6 +348,8 @@ public abstract class Component extends java.awt.Component {
/** Called by OpenOffice process to notify that the UNO component is disposing */
public void disposing(com.sun.star.lang.EventObject eventObject) {
+ disposed = true;
+ AccessibleObjectFactory.getDefault().disposing(Component.this);
}
}
@@ -515,6 +461,205 @@ public abstract class Component extends java.awt.Component {
}
super.removePropertyChangeListener(listener);
}
+
+ /**
+ * Gets the current state set of this object.
+ *
+ * @return an instance of <code>AccessibleStateSet</code>
+ * containing the current state set of the object
+ * @see AccessibleState
+ */
+ public javax.accessibility.AccessibleStateSet getAccessibleStateSet() {
+ javax.accessibility.AccessibleStateSet states = new javax.accessibility.AccessibleStateSet();
+ if (Component.this.isEnabled()) {
+ states.add(AccessibleState.ENABLED);
+ }
+ if (Component.this.isFocusTraversable()) {
+ states.add(AccessibleState.FOCUSABLE);
+ }
+ if (Component.this.isVisible()) {
+ states.add(AccessibleState.VISIBLE);
+ }
+ if (Component.this.isShowing()) {
+ states.add(AccessibleState.SHOWING);
+ }
+ if (Component.this.isFocusOwner()) {
+ states.add(AccessibleState.FOCUSED);
+ }
+
+ /**
+ * Never hold the tree lock when calling back into the office !!
+ * This may cause deadlocks when new native frames are registered
+ * with the Solar-Mutex acquired ..
+ */
+
+ javax.accessibility.Accessible ap = getAccessibleParent();
+ if (ap != null) {
+ javax.accessibility.AccessibleContext pac = ap.getAccessibleContext();
+ if (pac != null) {
+ javax.accessibility.AccessibleSelection as = pac.getAccessibleSelection();
+ if (as != null) {
+ states.add(AccessibleState.SELECTABLE);
+ int i = getAccessibleIndexInParent();
+ if (i >= 0) {
+ if (as.isAccessibleChildSelected(i)) {
+ states.add(AccessibleState.SELECTED);
+ }
+ }
+ }
+ }
+ }
+ return states;
+ }
+
+ /*
+ * AccessibleComponent
+ */
+
+ /** Returns the background color of the object */
+ public java.awt.Color getBackground() {
+ try {
+ return new java.awt.Color(unoAccessibleComponent.getBackground());
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ public void setBackground(java.awt.Color c) {
+ // Not supported by UNO accessibility API
+ }
+
+ /** Returns the foreground color of the object */
+ public java.awt.Color getForeground() {
+ try {
+ return new java.awt.Color(unoAccessibleComponent.getForeground());
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ public void setForeground(java.awt.Color c) {
+ // Not supported by UNO accessibility API
+ }
+
+ public java.awt.Cursor getCursor() {
+ // Not supported by UNO accessibility API
+ return null;
+ }
+
+ public void setCursor(java.awt.Cursor cursor) {
+ // Not supported by UNO accessibility API
+ }
+
+ public java.awt.Font getFont() {
+ // FIXME
+ return null;
+ }
+
+ public void setFont(java.awt.Font f) {
+ // Not supported by UNO accessibility API
+ }
+
+ public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
+ // FIXME
+ return null;
+ }
+
+ public boolean isEnabled() {
+ return Component.this.isEnabled();
+ }
+
+ public void setEnabled(boolean b) {
+ // Not supported by UNO accessibility API
+ }
+
+ public boolean isVisible() {
+ return Component.this.isVisible();
+ }
+
+ public void setVisible(boolean b) {
+ // Not supported by UNO accessibility API
+ }
+
+ public boolean isShowing() {
+ return Component.this.isShowing();
+ }
+
+ public boolean contains(java.awt.Point p) {
+ try {
+ return unoAccessibleComponent.contains(new com.sun.star.awt.Point(p.x, p.y));
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return false;
+ }
+ }
+
+ /** Returns the location of the object on the screen. */
+ public java.awt.Point getLocationOnScreen() {
+ try {
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
+ return new java.awt.Point(unoPoint.X, unoPoint.Y);
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Gets the location of this component in the form of a point specifying the component's top-left corner */
+ public java.awt.Point getLocation() {
+ try {
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation();
+ return new java.awt.Point( unoPoint.X, unoPoint.Y );
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Moves this component to a new location */
+ public void setLocation(java.awt.Point p) {
+ // Not supported by UNO accessibility API
+ }
+
+ /** Gets the bounds of this component in the form of a Rectangle object */
+ public java.awt.Rectangle getBounds() {
+ try {
+ com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
+ return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height);
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Moves and resizes this component to conform to the new bounding rectangle r */
+ public void setBounds(java.awt.Rectangle r) {
+ // Not supported by UNO accessibility API
+ }
+
+ /** Returns the size of this component in the form of a Dimension object */
+ public java.awt.Dimension getSize() {
+ try {
+ com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
+ return new java.awt.Dimension(unoSize.Width, unoSize.Height);
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Resizes this component so that it has width d.width and height d.height */
+ public void setSize(java.awt.Dimension d) {
+ // Not supported by UNO accessibility API
+ }
+
+ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
+ // Not supported by this implementation
+ return null;
+ }
+
+ public boolean isFocusTraversable() {
+ return Component.this.isFocusable();
+ }
+
+ public void requestFocus() {
+ unoAccessibleComponent.grabFocus();
+ }
}
// Extract a number from a UNO any
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java b/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java
index 9d1a5d318c9c..e6e160a72125 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Dialog.java
@@ -2,9 +2,9 @@
*
* $RCSfile: Dialog.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: obr $ $Date: 2002-12-06 11:25:35 $
+ * last change: $Author: obr $ $Date: 2003-01-13 11:00:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,8 +61,6 @@
package org.openoffice.java.accessibility;
-import java.awt.event.WindowEvent;
-
import javax.accessibility.AccessibleState;
import com.sun.star.uno.*;
@@ -71,9 +69,6 @@ import drafts.com.sun.star.accessibility.*;
public class Dialog extends java.awt.Dialog implements javax.accessibility.Accessible, NativeFrame {
protected XAccessibleComponent unoAccessibleComponent;
- // The coordinates of this frame on screen
- java.awt.Point location = null;
-
boolean opened = false;
boolean visible = false;
@@ -108,6 +103,9 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
java.awt.Component initialComponent = null;
public java.awt.Component getInitialComponent() {
+ if (Build.DEBUG) {
+ System.err.println("returning initial component object of class: " + initialComponent.getClass().getName());
+ }
return initialComponent;
}
@@ -188,31 +186,29 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
if (visible != b){
visible = b;
if (b) {
- com.sun.star.awt.Point p = unoAccessibleComponent.getLocationOnScreen();
- location = new java.awt.Point(p.X, p.Y);
-
// If it is the first show, fire WINDOW_OPENED event
if (!opened) {
- System.err.println("Posting Window opened");
- postWindowEvent(WindowEvent.WINDOW_OPENED);
+ postWindowEvent(java.awt.event.WindowEvent.WINDOW_OPENED);
opened = true;
}
+ postComponentEvent(java.awt.event.ComponentEvent.COMPONENT_SHOWN);
} else {
- location = null;
+ postComponentEvent(java.awt.event.ComponentEvent.COMPONENT_HIDDEN);
}
}
}
+ public void dispose() {
+ setVisible(false);
+ postWindowEvent(java.awt.event.WindowEvent.WINDOW_CLOSED);
+ }
+
protected void postWindowEvent(int i) {
- eventQueue.postEvent(new WindowEvent(this, i));
+ eventQueue.postEvent(new java.awt.event.WindowEvent(this, i));
}
- /** Returns the location of the object on the screen. */
- public java.awt.Point getLocationOnScreen() {
- if (visible) {
- return new java.awt.Point(location);
- }
- return null;
+ protected void postComponentEvent(int i) {
+ eventQueue.postEvent(new java.awt.event.ComponentEvent(this, i));
}
/**
@@ -264,8 +260,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
if (accessibleContext != null) {
accessibleContext.setAccessibleDescription(AnyConverter.toString(any));
}
- }
- catch (com.sun.star.lang.IllegalArgumentException e) {
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
@@ -279,9 +274,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
if (AnyConverter.isShort(any2)) {
setComponentState(AnyConverter.toShort(any2), true);
}
- }
-
- catch (com.sun.star.lang.IllegalArgumentException e) {
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
/** Updates the internal child list and fires the appropriate PropertyChangeEvent */
@@ -292,9 +285,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
if (c != null) {
Dialog.this.remove(c);
}
- }
-
- catch (com.sun.star.uno.Exception e) {
+ } catch (com.sun.star.uno.Exception e) {
// FIXME: output
}
}
@@ -308,7 +299,7 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
java.awt.Component c = factory.getAccessibleComponent(xAccessible);
if (c != null) {
// Seems to be already in child list
- if (c.getParent().equals(this))
+ if (this.equals(c.getParent()))
return;
} else {
c = factory.createAccessibleComponent(xAccessible);
@@ -317,33 +308,16 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
Dialog.this.add(c, xAccessible.getAccessibleContext().
getAccessibleIndexInParent());
}
- }
-
- catch (com.sun.star.uno.Exception e) {
+ } catch (com.sun.star.uno.Exception e) {
// FIXME: output
}
}
-
/** Fires a visible data property change event */
protected void handleVisibleDataEvent() {
- try {
- com.sun.star.awt.Rectangle r = unoAccessibleComponent.getBounds();
- Dialog.this.setBounds(r.X, r.Y, r.Width, r.Height);
- com.sun.star.awt.Point p = unoAccessibleComponent.getLocationOnScreen();
- location = new java.awt.Point(p.X, p.Y);
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-
- /** Updates internal bounding box cache */
- protected void handleBoundRectEvent() {
- try {
- com.sun.star.awt.Rectangle r = unoAccessibleComponent.getBounds();
- Dialog.this.setBounds(r.X, r.Y, r.Width, r.Height);
- com.sun.star.awt.Point p = unoAccessibleComponent.getLocationOnScreen();
- location = new java.awt.Point(p.X, p.Y);
- } catch (com.sun.star.uno.RuntimeException e) {
+ javax.accessibility.AccessibleContext ac = accessibleContext;
+ if (ac != null) {
+ ac.firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null);
}
}
@@ -372,10 +346,8 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
}
break;
case AccessibleEventId.ACCESSIBLE_VISIBLE_DATA_EVENT:
- handleVisibleDataEvent();
- break;
case AccessibleEventId.ACCESSIBLE_BOUNDRECT_EVENT:
- handleBoundRectEvent();
+ handleVisibleDataEvent();
break;
default:
// Warn about unhandled events
@@ -524,6 +496,155 @@ public class Dialog extends java.awt.Dialog implements javax.accessibility.Acces
}
super.removePropertyChangeListener(listener);
}
+
+ /*
+ * AccessibleComponent
+ */
+
+ /** Returns the background color of the object */
+ public java.awt.Color getBackground() {
+ try {
+ return new java.awt.Color(unoAccessibleComponent.getBackground());
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ public void setBackground(java.awt.Color c) {
+ // Not supported by UNO accessibility API
+ }
+
+ /** Returns the foreground color of the object */
+ public java.awt.Color getForeground() {
+ try {
+ return new java.awt.Color(unoAccessibleComponent.getForeground());
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ public void setForeground(java.awt.Color c) {
+ // Not supported by UNO accessibility API
+ }
+
+ public java.awt.Cursor getCursor() {
+ // Not supported by UNO accessibility API
+ return null;
+ }
+
+ public void setCursor(java.awt.Cursor cursor) {
+ // Not supported by UNO accessibility API
+ }
+
+ public java.awt.Font getFont() {
+ // FIXME
+ return null;
+ }
+
+ public void setFont(java.awt.Font f) {
+ // Not supported by UNO accessibility API
+ }
+
+ public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
+ // FIXME
+ return null;
+ }
+
+ public boolean isEnabled() {
+ return Dialog.this.isEnabled();
+ }
+
+ public void setEnabled(boolean b) {
+ // Not supported by UNO accessibility API
+ }
+
+ public boolean isVisible() {
+ return Dialog.this.isVisible();
+ }
+
+ public void setVisible(boolean b) {
+ // Not supported by UNO accessibility API
+ }
+
+ public boolean isShowing() {
+ return Dialog.this.isShowing();
+ }
+
+ public boolean contains(java.awt.Point p) {
+ try {
+ return unoAccessibleComponent.contains(new com.sun.star.awt.Point(p.x, p.y));
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return false;
+ }
+ }
+
+ /** Returns the location of the object on the screen. */
+ public java.awt.Point getLocationOnScreen() {
+ try {
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
+ return new java.awt.Point(unoPoint.X, unoPoint.Y);
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Gets the location of this component in the form of a point specifying the component's top-left corner */
+ public java.awt.Point getLocation() {
+ try {
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation();
+ return new java.awt.Point( unoPoint.X, unoPoint.Y );
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Moves this component to a new location */
+ public void setLocation(java.awt.Point p) {
+ // Not supported by UNO accessibility API
+ }
+
+ /** Gets the bounds of this component in the form of a Rectangle object */
+ public java.awt.Rectangle getBounds() {
+ try {
+ com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
+ return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height);
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Moves and resizes this component to conform to the new bounding rectangle r */
+ public void setBounds(java.awt.Rectangle r) {
+ // Not supported by UNO accessibility API
+ }
+
+ /** Returns the size of this component in the form of a Dimension object */
+ public java.awt.Dimension getSize() {
+ try {
+ com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
+ return new java.awt.Dimension(unoSize.Width, unoSize.Height);
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Resizes this component so that it has width d.width and height d.height */
+ public void setSize(java.awt.Dimension d) {
+ // Not supported by UNO accessibility API
+ }
+
+ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
+ // Not supported by this implementation
+ return null;
+ }
+
+ public boolean isFocusTraversable() {
+ return Dialog.this.isFocusable();
+ }
+
+ public void requestFocus() {
+ unoAccessibleComponent.grabFocus();
+ }
}
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Frame.java b/accessibility/bridge/org/openoffice/java/accessibility/Frame.java
index 7071b8e4a9d1..d98b7da27199 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Frame.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Frame.java
@@ -2,9 +2,9 @@
*
* $RCSfile: Frame.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: obr $ $Date: 2002-12-06 11:25:36 $
+ * last change: $Author: obr $ $Date: 2003-01-13 11:00:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,16 +67,12 @@ import drafts.com.sun.star.accessibility.*;
public class Frame extends java.awt.Frame implements javax.accessibility.Accessible, NativeFrame {
protected XAccessibleComponent unoAccessibleComponent;
- // The coordinates of this frame on screen
- java.awt.Point location = null;
-
boolean opened = false;
boolean visible = false;
java.awt.EventQueue eventQueue = null;
protected Frame(XAccessibleComponent xAccessibleComponent) {
- super();
initialize(xAccessibleComponent);
}
@@ -179,30 +175,29 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
if (visible != b){
visible = b;
if (b) {
- com.sun.star.awt.Point p = unoAccessibleComponent.getLocationOnScreen();
- location = new java.awt.Point(p.X, p.Y);
-
// If it is the first show, fire WINDOW_OPENED event
if (!opened) {
postWindowEvent(java.awt.event.WindowEvent.WINDOW_OPENED);
opened = true;
}
+ postComponentEvent(java.awt.event.ComponentEvent.COMPONENT_SHOWN);
} else {
- location = null;
+ postComponentEvent(java.awt.event.ComponentEvent.COMPONENT_HIDDEN);
}
}
}
+ public void dispose() {
+ setVisible(false);
+ postWindowEvent(java.awt.event.WindowEvent.WINDOW_CLOSED);
+ }
+
protected void postWindowEvent(int i) {
eventQueue.postEvent(new java.awt.event.WindowEvent(this, i));
}
- /** Returns the location of the object on the screen. */
- public java.awt.Point getLocationOnScreen() {
- if (visible) {
- return new java.awt.Point(location);
- }
- return null;
+ protected void postComponentEvent(int i) {
+ eventQueue.postEvent(new java.awt.event.ComponentEvent(this, i));
}
/**
@@ -284,9 +279,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
if (c != null) {
Frame.this.remove(c);
}
- }
-
- catch (com.sun.star.uno.Exception e) {
+ } catch (com.sun.star.uno.Exception e) {
// FIXME: output
}
}
@@ -299,7 +292,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
java.awt.Component c = factory.getAccessibleComponent(xAccessible);
if (c != null) {
// Seems to be already in child list
- if (c.getParent().equals(this))
+ if (this.equals(c.getParent()))
return;
} else {
c = factory.createAccessibleComponent(xAccessible);
@@ -308,32 +301,16 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
Frame.this.add(c, xAccessible.getAccessibleContext().
getAccessibleIndexInParent());
}
- }
-
- catch (com.sun.star.uno.Exception e) {
+ } catch (com.sun.star.uno.Exception e) {
// FIXME: output
}
}
/** Fires a visible data property change event */
protected void handleVisibleDataEvent() {
- try {
- com.sun.star.awt.Rectangle r = unoAccessibleComponent.getBounds();
- Frame.this.setBounds(r.X, r.Y, r.Width, r.Height);
- com.sun.star.awt.Point p = unoAccessibleComponent.getLocationOnScreen();
- location = new java.awt.Point(p.X, p.Y);
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-
- /** Updates internal bounding box cache */
- protected void handleBoundRectEvent() {
- try {
- com.sun.star.awt.Rectangle r = unoAccessibleComponent.getBounds();
- Frame.this.setBounds(r.X, r.Y, r.Width, r.Height);
- com.sun.star.awt.Point p = unoAccessibleComponent.getLocationOnScreen();
- location = new java.awt.Point(p.X, p.Y);
- } catch (com.sun.star.uno.RuntimeException e) {
+ javax.accessibility.AccessibleContext ac = accessibleContext;
+ if (ac != null) {
+ ac.firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null);
}
}
@@ -362,10 +339,8 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
}
break;
case AccessibleEventId.ACCESSIBLE_VISIBLE_DATA_EVENT:
- handleVisibleDataEvent();
- break;
case AccessibleEventId.ACCESSIBLE_BOUNDRECT_EVENT:
- handleBoundRectEvent();
+ handleVisibleDataEvent();
break;
default:
// Warn about unhandled events
@@ -529,6 +504,155 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
}
return states;
}
+
+ /*
+ * AccessibleComponent
+ */
+
+ /** Returns the background color of the object */
+ public java.awt.Color getBackground() {
+ try {
+ return new java.awt.Color(unoAccessibleComponent.getBackground());
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ public void setBackground(java.awt.Color c) {
+ // Not supported by UNO accessibility API
+ }
+
+ /** Returns the foreground color of the object */
+ public java.awt.Color getForeground() {
+ try {
+ return new java.awt.Color(unoAccessibleComponent.getForeground());
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ public void setForeground(java.awt.Color c) {
+ // Not supported by UNO accessibility API
+ }
+
+ public java.awt.Cursor getCursor() {
+ // Not supported by UNO accessibility API
+ return null;
+ }
+
+ public void setCursor(java.awt.Cursor cursor) {
+ // Not supported by UNO accessibility API
+ }
+
+ public java.awt.Font getFont() {
+ // FIXME
+ return null;
+ }
+
+ public void setFont(java.awt.Font f) {
+ // Not supported by UNO accessibility API
+ }
+
+ public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
+ // FIXME
+ return null;
+ }
+
+ public boolean isEnabled() {
+ return Frame.this.isEnabled();
+ }
+
+ public void setEnabled(boolean b) {
+ // Not supported by UNO accessibility API
+ }
+
+ public boolean isVisible() {
+ return Frame.this.isVisible();
+ }
+
+ public void setVisible(boolean b) {
+ // Not supported by UNO accessibility API
+ }
+
+ public boolean isShowing() {
+ return Frame.this.isShowing();
+ }
+
+ public boolean contains(java.awt.Point p) {
+ try {
+ return unoAccessibleComponent.contains(new com.sun.star.awt.Point(p.x, p.y));
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return false;
+ }
+ }
+
+ /** Returns the location of the object on the screen. */
+ public java.awt.Point getLocationOnScreen() {
+ try {
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
+ return new java.awt.Point(unoPoint.X, unoPoint.Y);
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Gets the location of this component in the form of a point specifying the component's top-left corner */
+ public java.awt.Point getLocation() {
+ try {
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation();
+ return new java.awt.Point( unoPoint.X, unoPoint.Y );
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Moves this component to a new location */
+ public void setLocation(java.awt.Point p) {
+ // Not supported by UNO accessibility API
+ }
+
+ /** Gets the bounds of this component in the form of a Rectangle object */
+ public java.awt.Rectangle getBounds() {
+ try {
+ com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
+ return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height);
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Moves and resizes this component to conform to the new bounding rectangle r */
+ public void setBounds(java.awt.Rectangle r) {
+ // Not supported by UNO accessibility API
+ }
+
+ /** Returns the size of this component in the form of a Dimension object */
+ public java.awt.Dimension getSize() {
+ try {
+ com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
+ return new java.awt.Dimension(unoSize.Width, unoSize.Height);
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Resizes this component so that it has width d.width and height d.height */
+ public void setSize(java.awt.Dimension d) {
+ // Not supported by UNO accessibility API
+ }
+
+ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
+ // Not supported by this implementation
+ return null;
+ }
+
+ public boolean isFocusTraversable() {
+ return Frame.this.isFocusable();
+ }
+
+ public void requestFocus() {
+ unoAccessibleComponent.grabFocus();
+ }
}
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java b/accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java
index 18ca352a8160..42da06adb995 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/RadioButton.java
@@ -2,9 +2,9 @@
*
* $RCSfile: RadioButton.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: obr $ $Date: 2002-12-06 11:25:39 $
+ * last change: $Author: obr $ $Date: 2003-01-13 11:00:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,6 +74,7 @@ class RadioButton extends ToggleButton {
public javax.accessibility.AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
accessibleContext = new AccessibleRadioButton();
+ System.err.println("RadioButton created");
}
return accessibleContext;
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java b/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java
index 444bfe42e9f4..94a88b591ffa 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/TextComponent.java
@@ -2,9 +2,9 @@
*
* $RCSfile: TextComponent.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: obr $ $Date: 2002-12-06 11:25:40 $
+ * last change: $Author: obr $ $Date: 2003-01-13 11:00:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,19 +68,15 @@ import drafts.com.sun.star.accessibility.*;
*/
public class TextComponent extends Component implements javax.accessibility.Accessible {
- protected TextComponent(XAccessible accessible, XAccessibleComponent xAccessibleComponent, boolean multiLine) {
- super();
- initialize(accessible, xAccessibleComponent);
- }
+ boolean multiLine = false;
+ boolean editable = false;
- protected TextComponent(XAccessible accessible, XAccessibleComponent xAccessibleComponent) {
+ protected TextComponent(XAccessible accessible, XAccessibleComponent xAccessibleComponent, XAccessibleStateSet xAccessibleStateSet) {
super();
- initialize(accessible, xAccessibleComponent);
- }
-
- protected void initialize(XAccessible accessible, XAccessibleComponent xAccessibleComponent) {
unoAccessible = accessible;
unoAccessibleComponent = xAccessibleComponent;
+ editable = xAccessibleStateSet.contains(AccessibleStateType.EDITABLE);
+ multiLine = xAccessibleStateSet.contains(AccessibleStateType.MULTILINE);
// To reflect focus and other component state changes, the accessibility
// event listener must already be added here
addAccessibleEventListener(new AccessibleTextComponentListener());
@@ -92,6 +88,24 @@ public class TextComponent extends Component implements javax.accessibility.Acce
super();
}
+ protected void setComponentState(short state, boolean enable) {
+ switch (state) {
+ case AccessibleStateType.EDITABLE:
+ editable = enable;
+ fireStatePropertyChange(javax.accessibility.AccessibleState.EDITABLE, enable);
+ break;
+ case AccessibleStateType.MULTILINE:
+ multiLine = enable;
+ fireStatePropertyChange(javax.accessibility.AccessibleState.MULTI_LINE, enable);
+ break;
+ case AccessibleStateType.SINGLE_LINE:
+ break;
+ default:
+ super.setComponentState(state, enable);
+ break;
+ }
+ }
+
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
switch (event.EventId) {
@@ -100,6 +114,9 @@ public class TextComponent extends Component implements javax.accessibility.Acce
null, new Integer(0));
break;
case AccessibleEventId.ACCESSIBLE_CARET_EVENT:
+ if (Build.DEBUG) {
+ System.err.println("Caret event");
+ }
firePropertyChange(accessibleContext.ACCESSIBLE_CARET_PROPERTY,
toNumber(event.OldValue), toNumber(event.NewValue));
break;
@@ -187,20 +204,13 @@ public class TextComponent extends Component implements javax.accessibility.Acce
public javax.accessibility.AccessibleStateSet getAccessibleStateSet() {
javax.accessibility.AccessibleStateSet states = super.getAccessibleStateSet();
- try {
- XAccessibleStateSet unoAccessibleStateSet =
- unoAccessible.getAccessibleContext().getAccessibleStateSet();
-
- if (unoAccessibleStateSet.contains(AccessibleStateType.EDITABLE)) {
- states.add(javax.accessibility.AccessibleState.EDITABLE);
- }
- if (unoAccessibleStateSet.contains(AccessibleStateType.MULTILINE)) {
- states.add(javax.accessibility.AccessibleState.MULTI_LINE);
- } else {
- states.add(javax.accessibility.AccessibleState.SINGLE_LINE);
- }
- } catch (NullPointerException e) {
- } catch (com.sun.star.uno.RuntimeException e) {
+ if (editable) {
+ states.add(javax.accessibility.AccessibleState.EDITABLE);
+ }
+ if (multiLine) {
+ states.add(javax.accessibility.AccessibleState.MULTI_LINE);
+ } else {
+ states.add(javax.accessibility.AccessibleState.SINGLE_LINE);
}
return states;
}
@@ -211,7 +221,7 @@ public class TextComponent extends Component implements javax.accessibility.Acce
XAccessibleRelationSet unoAccessibleRelationSet =
unoAccessible.getAccessibleContext().getAccessibleRelationSet();
if (unoAccessibleRelationSet == null) {
- return null;
+ return super.getAccessibleRelationSet();
}
javax.accessibility.AccessibleRelationSet relationSet = new javax.accessibility.AccessibleRelationSet();
@@ -245,9 +255,9 @@ public class TextComponent extends Component implements javax.accessibility.Acce
}
return relationSet;
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
- return null;
+ return super.getAccessibleRelationSet();
} catch (com.sun.star.uno.RuntimeException e) {
- return null;
+ return super.getAccessibleRelationSet();
}
}
}
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Window.java b/accessibility/bridge/org/openoffice/java/accessibility/Window.java
index b8f6fb6258ec..de6822595f3e 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Window.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Window.java
@@ -2,9 +2,9 @@
*
* $RCSfile: Window.java,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: obr $ $Date: 2002-12-06 11:25:41 $
+ * last change: $Author: obr $ $Date: 2003-01-13 11:00:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,9 +67,6 @@ import drafts.com.sun.star.accessibility.*;
public class Window extends java.awt.Window implements javax.accessibility.Accessible, NativeFrame {
protected XAccessibleComponent unoAccessibleComponent;
- // The coordinates of this frame on screen
- java.awt.Point location = null;
-
boolean opened = false;
boolean visible = false;
@@ -171,30 +168,29 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
if (visible != b){
visible = b;
if (b) {
- com.sun.star.awt.Point p = unoAccessibleComponent.getLocationOnScreen();
- location = new java.awt.Point(p.X, p.Y);
-
// If it is the first show, fire WINDOW_OPENED event
if (!opened) {
postWindowEvent(java.awt.event.WindowEvent.WINDOW_OPENED);
opened = true;
}
+ postComponentEvent(java.awt.event.ComponentEvent.COMPONENT_SHOWN);
} else {
- location = null;
+ postComponentEvent(java.awt.event.ComponentEvent.COMPONENT_HIDDEN);
}
}
}
+ public void dispose() {
+ setVisible(false);
+ postWindowEvent(java.awt.event.WindowEvent.WINDOW_CLOSED);
+ }
+
protected void postWindowEvent(int i) {
eventQueue.postEvent(new java.awt.event.WindowEvent(this, i));
}
- /** Returns the location of the object on the screen. */
- public java.awt.Point getLocationOnScreen() {
- if (visible) {
- return new java.awt.Point(location);
- }
- return null;
+ protected void postComponentEvent(int i) {
+ eventQueue.postEvent(new java.awt.event.ComponentEvent(this, i));
}
/**
@@ -235,8 +231,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
try {
// Window.this.setTitle(AnyConverter.toString(any));
AnyConverter.toString(any);
- }
- catch (com.sun.star.lang.IllegalArgumentException e) {
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
@@ -249,8 +244,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
if (accessibleContext != null) {
accessibleContext.setAccessibleDescription(AnyConverter.toString(any));
}
- }
- catch (com.sun.star.lang.IllegalArgumentException e) {
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
@@ -264,9 +258,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
if (AnyConverter.isShort(any2)) {
setComponentState(AnyConverter.toShort(any2), true);
}
- }
-
- catch (com.sun.star.lang.IllegalArgumentException e) {
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
}
}
@@ -278,9 +270,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
if (c != null) {
Window.this.remove(c);
}
- }
-
- catch (com.sun.star.uno.Exception e) {
+ } catch (com.sun.star.uno.Exception e) {
// FIXME: output
}
}
@@ -293,7 +283,7 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
java.awt.Component c = factory.getAccessibleComponent(xAccessible);
if (c != null) {
// Seems to be already in child list
- if (c.getParent().equals(this))
+ if (this.equals(c.getParent()))
return;
} else {
c = factory.createAccessibleComponent(xAccessible);
@@ -302,32 +292,16 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
Window.this.add(c, xAccessible.getAccessibleContext().
getAccessibleIndexInParent());
}
- }
-
- catch (com.sun.star.uno.Exception e) {
+ } catch (com.sun.star.uno.Exception e) {
// FIXME: output
}
}
/** Fires a visible data property change event */
protected void handleVisibleDataEvent() {
- try {
- com.sun.star.awt.Rectangle r = unoAccessibleComponent.getBounds();
- Window.this.setBounds(r.X, r.Y, r.Width, r.Height);
- com.sun.star.awt.Point p = unoAccessibleComponent.getLocationOnScreen();
- location = new java.awt.Point(p.X, p.Y);
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
-
- /** Updates internal bounding box cache */
- protected void handleBoundRectEvent() {
- try {
- com.sun.star.awt.Rectangle r = unoAccessibleComponent.getBounds();
- Window.this.setBounds(r.X, r.Y, r.Width, r.Height);
- com.sun.star.awt.Point p = unoAccessibleComponent.getLocationOnScreen();
- location = new java.awt.Point(p.X, p.Y);
- } catch (com.sun.star.uno.RuntimeException e) {
+ javax.accessibility.AccessibleContext ac = accessibleContext;
+ if (ac != null) {
+ ac.firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_VISIBLE_DATA_PROPERTY, null, null);
}
}
@@ -356,10 +330,8 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
}
break;
case AccessibleEventId.ACCESSIBLE_VISIBLE_DATA_EVENT:
- handleVisibleDataEvent();
- break;
case AccessibleEventId.ACCESSIBLE_BOUNDRECT_EVENT:
- handleBoundRectEvent();
+ handleVisibleDataEvent();
break;
default:
// Warn about unhandled events
@@ -502,6 +474,155 @@ public class Window extends java.awt.Window implements javax.accessibility.Acces
}
super.removePropertyChangeListener(listener);
}
+
+ /*
+ * AccessibleComponent
+ */
+
+ /** Returns the background color of the object */
+ public java.awt.Color getBackground() {
+ try {
+ return new java.awt.Color(unoAccessibleComponent.getBackground());
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ public void setBackground(java.awt.Color c) {
+ // Not supported by UNO accessibility API
+ }
+
+ /** Returns the foreground color of the object */
+ public java.awt.Color getForeground() {
+ try {
+ return new java.awt.Color(unoAccessibleComponent.getForeground());
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ public void setForeground(java.awt.Color c) {
+ // Not supported by UNO accessibility API
+ }
+
+ public java.awt.Cursor getCursor() {
+ // Not supported by UNO accessibility API
+ return null;
+ }
+
+ public void setCursor(java.awt.Cursor cursor) {
+ // Not supported by UNO accessibility API
+ }
+
+ public java.awt.Font getFont() {
+ // FIXME
+ return null;
+ }
+
+ public void setFont(java.awt.Font f) {
+ // Not supported by UNO accessibility API
+ }
+
+ public java.awt.FontMetrics getFontMetrics(java.awt.Font f) {
+ // FIXME
+ return null;
+ }
+
+ public boolean isEnabled() {
+ return Window.this.isEnabled();
+ }
+
+ public void setEnabled(boolean b) {
+ // Not supported by UNO accessibility API
+ }
+
+ public boolean isVisible() {
+ return Window.this.isVisible();
+ }
+
+ public void setVisible(boolean b) {
+ // Not supported by UNO accessibility API
+ }
+
+ public boolean isShowing() {
+ return Window.this.isShowing();
+ }
+
+ public boolean contains(java.awt.Point p) {
+ try {
+ return unoAccessibleComponent.contains(new com.sun.star.awt.Point(p.x, p.y));
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return false;
+ }
+ }
+
+ /** Returns the location of the object on the screen. */
+ public java.awt.Point getLocationOnScreen() {
+ try {
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocationOnScreen();
+ return new java.awt.Point(unoPoint.X, unoPoint.Y);
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Gets the location of this component in the form of a point specifying the component's top-left corner */
+ public java.awt.Point getLocation() {
+ try {
+ com.sun.star.awt.Point unoPoint = unoAccessibleComponent.getLocation();
+ return new java.awt.Point( unoPoint.X, unoPoint.Y );
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Moves this component to a new location */
+ public void setLocation(java.awt.Point p) {
+ // Not supported by UNO accessibility API
+ }
+
+ /** Gets the bounds of this component in the form of a Rectangle object */
+ public java.awt.Rectangle getBounds() {
+ try {
+ com.sun.star.awt.Rectangle unoRect = unoAccessibleComponent.getBounds();
+ return new java.awt.Rectangle(unoRect.X, unoRect.Y, unoRect.Width, unoRect.Height);
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Moves and resizes this component to conform to the new bounding rectangle r */
+ public void setBounds(java.awt.Rectangle r) {
+ // Not supported by UNO accessibility API
+ }
+
+ /** Returns the size of this component in the form of a Dimension object */
+ public java.awt.Dimension getSize() {
+ try {
+ com.sun.star.awt.Size unoSize = unoAccessibleComponent.getSize();
+ return new java.awt.Dimension(unoSize.Width, unoSize.Height);
+ } catch (com.sun.star.uno.RuntimeException e) {
+ return null;
+ }
+ }
+
+ /** Resizes this component so that it has width d.width and height d.height */
+ public void setSize(java.awt.Dimension d) {
+ // Not supported by UNO accessibility API
+ }
+
+ public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
+ // Not supported by this implementation
+ return null;
+ }
+
+ public boolean isFocusTraversable() {
+ return Window.this.isFocusable();
+ }
+
+ public void requestFocus() {
+ unoAccessibleComponent.grabFocus();
+ }
}
}