INTEGRATION: CWS uaa02 (1.3.6); FILE MERGED

2003/04/11 11:01:05 obr 1.3.6.1: #108656# accessibility API moved from drafts to final
This commit is contained in:
Vladimir Glazounov 2003-04-24 17:15:07 +00:00
parent d96e5a7dea
commit 87957113d4

View file

@ -58,7 +58,7 @@
package org.openoffice.java.accessibility;
import com.sun.star.uno.*;
import drafts.com.sun.star.accessibility.*;
import com.sun.star.accessibility.*;
public class Frame extends java.awt.Frame implements javax.accessibility.Accessible, NativeFrame {
protected XAccessibleComponent unoAccessibleComponent;
@ -287,29 +287,29 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
switch (event.EventId) {
case AccessibleEventId.ACCESSIBLE_NAME_EVENT:
case AccessibleEventId.NAME_CHANGED:
// Set the accessible name for the corresponding context, which will fire a property
// change event itself
handleNameChangedEvent(event.NewValue);
break;
case AccessibleEventId.ACCESSIBLE_DESCRIPTION_EVENT:
case AccessibleEventId.DESCRIPTION_CHANGED:
// Set the accessible description for the corresponding context, which will fire a property
// change event itself - so do not set propertyName !
handleDescriptionChangedEvent(event.NewValue);
break;
case AccessibleEventId.ACCESSIBLE_STATE_EVENT:
case AccessibleEventId.STATE_CHANGED:
// Update the internal state set and fire the appropriate PropertyChangedEvent
handleStateChangedEvent(event.OldValue, event.NewValue);
break;
case AccessibleEventId.ACCESSIBLE_CHILD_EVENT:
case AccessibleEventId.CHILD:
if (AnyConverter.isObject(event.OldValue)) {
AccessibleObjectFactory.removeChild(Frame.this, event.OldValue);
} else if (AnyConverter.isObject(event.NewValue)) {
AccessibleObjectFactory.addChild(Frame.this, event.NewValue);
}
break;
case AccessibleEventId.ACCESSIBLE_VISIBLE_DATA_EVENT:
case AccessibleEventId.ACCESSIBLE_BOUNDRECT_EVENT:
case AccessibleEventId.VISIBLE_DATA_CHANGED:
case AccessibleEventId.BOUNDRECT_CHANGED:
handleVisibleDataEvent();
break;
default:
@ -589,7 +589,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
public boolean contains(java.awt.Point p) {
try {
return unoAccessibleComponent.contains(new com.sun.star.awt.Point(p.x, p.y));
return unoAccessibleComponent.containsPoint(new com.sun.star.awt.Point(p.x, p.y));
} catch (com.sun.star.uno.RuntimeException e) {
return false;
}
@ -654,7 +654,7 @@ public class Frame extends java.awt.Frame implements javax.accessibility.Accessi
public javax.accessibility.Accessible getAccessibleAt(java.awt.Point p) {
try {
java.awt.Component c = AccessibleObjectFactory.getAccessibleComponent(
unoAccessibleComponent.getAccessibleAt(new com.sun.star.awt.Point(p.x, p.y)));
unoAccessibleComponent.getAccessibleAtPoint(new com.sun.star.awt.Point(p.x, p.y)));
return (javax.accessibility.Accessible) c;
} catch (com.sun.star.uno.RuntimeException e) {