*** empty log message ***
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAdapter.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAdapter.java
new file mode 100644
index 0000000..fb3330d
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleAdapter.java
@@ -0,0 +1,42 @@
+package org.eclipse.swt.accessibility;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved
+ */
+
+/**
+ * This adapter class provides default implementations for the
+ * methods described by the <code>AccessibleListener</code> interface.
+ * <p>
+ * Classes that wish to deal with <code>AccessibleEvent</code>s can
+ * extend this class and override only the methods that they are
+ * interested in.
+ * </p>
+ *
+ * @see AccessibleListener
+ * @see AccessibleEvent
+ */
+public abstract class AccessibleAdapter implements AccessibleListener {
+
+ /**
+ * Sent when an accessibility client requests the name
+ * of a control, or the specified child of a control.
+ * The default behavior is to do nothing.
+ *
+ * @param e an event object containing the following fields:
+ * childID [IN] - the specified child identifier, or CHILDID_SELF
+ * result [OUT] - the string representing the requested name
+ */
+ public void get_accName(AccessibleEvent e) {
+ }
+
+ public void get_accHelp(AccessibleEvent e) {
+ }
+
+ public void get_accKeyboardShortcut(AccessibleEvent e) {
+ }
+
+ public void get_accDescription(AccessibleEvent e) {
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlAdapter.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlAdapter.java
new file mode 100644
index 0000000..db07c89
--- /dev/null
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlAdapter.java
@@ -0,0 +1,71 @@
+package org.eclipse.swt.accessibility;
+
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved
+ */
+
+/**
+ * This adapter class provides default implementations for the
+ * methods described by the <code>AccessibleControlListener</code> interface.
+ * <p>
+ * Classes that wish to deal with <code>AccessibleControlEvent</code>s can
+ * extend this class and override only the methods that they are
+ * interested in.
+ * </p>
+ *
+ * @see AccessibleControlListener
+ * @see AccessibleControlEvent
+ */
+public abstract class AccessibleControlAdapter implements AccessibleControlListener {
+
+ /**
+ * Sent when an accessibility client requests the identifier
+ * of the control child at the specified display coordinates.
+ * The default behavior is to do nothing.
+ *
+ * @param e an event object containing the following fields:
+ * x, y [IN] - the specified point in display coordinates
+ * childID [OUT] - the ID of the child at point, or CHILDID_SELF, or CHILDID_NONE
+ */
+ public void accHitTest(AccessibleControlEvent e) {
+ }
+
+ public void accLocation(AccessibleControlEvent e) {
+ }
+
+ public void accNavigate(AccessibleControlEvent e) {
+ }
+
+ public void get_accChild(AccessibleControlEvent e) {
+ }
+
+ public void get_accChildCount(AccessibleControlEvent e) {
+ }
+
+ public void get_accDefaultAction(AccessibleControlEvent e) {
+ }
+
+ public void get_accFocus(AccessibleControlEvent e) {
+ }
+
+ public void get_accRole(AccessibleControlEvent e) {
+ }
+
+ public void get_accSelection(AccessibleControlEvent e) {
+ }
+
+ public void get_accState(AccessibleControlEvent e) {
+ }
+
+ public void get_accValue(AccessibleControlEvent e) {
+ }
+
+ // May not implement
+ public void accDoDefaultAction(AccessibleControlEvent e) {
+ }
+ public void accSelect(AccessibleControlEvent e) {
+ }
+ public void get_accParent(AccessibleControlEvent e) {
+ }
+}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java
index 834a4d5..688ab99 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleControlListener.java
@@ -36,7 +36,6 @@
public void get_accChildCount(AccessibleControlEvent e);
public void get_accDefaultAction(AccessibleControlEvent e);
public void get_accFocus(AccessibleControlEvent e);
- public void get_accParent(AccessibleControlEvent e);
public void get_accRole(AccessibleControlEvent e);
public void get_accSelection(AccessibleControlEvent e);
public void get_accState(AccessibleControlEvent e);
@@ -45,6 +44,7 @@
// May not implement
public void accDoDefaultAction(AccessibleControlEvent e);
public void accSelect(AccessibleControlEvent e);
+ public void get_accParent(AccessibleControlEvent e);
// Will not implement
//public void put_accName(AccessibleControlEvent e);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleEvent.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleEvent.java
index 26fae48..8450cc9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleEvent.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/common/org/eclipse/swt/accessibility/AccessibleEvent.java
@@ -19,8 +19,8 @@
* @see AccessibleListener
*/
public class AccessibleEvent extends SWTEventObject {
- public int childID; // IN
- public String result; // OUT
+ public int childID; // IN - can be CHILDID_SELF or a positive integer
+ public String result; // OUT - result depends on the listener method called
public AccessibleEvent(Object source) {
super(source);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
index d9ff716..adc7314 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java
@@ -218,10 +218,10 @@
/* Start ACCESSIBILITY */
accessible = new Accessible(this);
- accessible.addAccessibleListener(new AccessibleListener() {
+ accessible.addAccessibleListener(new AccessibleAdapter() {
public void get_accDescription(AccessibleEvent e) {
int childID = e.childID;
- if (childID > items.length) return; // sigh - probably need to have an error code in the event object
+ if (childID > items.length) return;
if (childID == ACC.CHILDID_SELF) {
e.result = "This is a CTabFolder";
} else {
@@ -231,7 +231,7 @@
public void get_accHelp(AccessibleEvent e) {
int childID = e.childID;
- if (childID > items.length) return; // sigh - probably need to have an error code in the event object
+ if (childID > items.length) return;
if (childID == ACC.CHILDID_SELF) {
e.result = getToolTipText();
} else {
@@ -242,7 +242,7 @@
public void get_accKeyboardShortcut(AccessibleEvent e) {
int childID = e.childID;
- if (childID > items.length) return; // sigh - probably need to have an error code in the event object
+ if (childID > items.length) return;
if (childID != ACC.CHILDID_SELF) {
e.result = "Ctrl+TAB";
}
@@ -250,7 +250,7 @@
public void get_accName(AccessibleEvent e) {
int childID = e.childID;
- if (childID > items.length) return; // sigh - probably need to have an error code in the event object
+ if (childID > items.length) return;
if (childID == ACC.CHILDID_SELF) {
e.result = "CTabFolder";
} else {
@@ -260,10 +260,7 @@
}
});
- accessible.addAccessibleControlListener(new AccessibleControlListener() {
- public void accDoDefaultAction(AccessibleControlEvent e) {
- // do nothing... (need an adapter for stuff like this)
- }
+ accessible.addAccessibleControlListener(new AccessibleControlAdapter() {
public void accHitTest(AccessibleControlEvent e) {
Point testPoint = toControl(new Point(e.x, e.y));
int childID = ACC.CHILDID_SELF;
@@ -326,14 +323,9 @@
}
}
- public void accSelect(AccessibleControlEvent e) {
- // must implement for the items because they support selection
- return;
- }
-
public void get_accChild(AccessibleControlEvent e) {
int childID = e.childID;
- if (childID > items.length) return; // sigh - probably need to have an error code in the event object
+ if (childID > items.length) return;
if (childID == ACC.CHILDID_SELF) {
e.accessible = accessible;
}
@@ -345,23 +337,15 @@
public void get_accDefaultAction(AccessibleControlEvent e) {
int childID = e.childID;
- if (childID > items.length) return; // sigh - probably need to have an error code in the event object
+ if (childID > items.length) return;
if (childID != ACC.CHILDID_SELF) {
e.result = "Switch";
}
}
-
- public void get_accFocus(AccessibleControlEvent e) {
- // not yet implemented - probably return the same as selected, but only if the tab folder has focus
- }
-
- public void get_accParent(AccessibleControlEvent e) {
- e.accessible = accessible; // not sure about this...
- }
-
+
public void get_accRole(AccessibleControlEvent e) {
int childID = e.childID;
- if (childID > items.length) return; // sigh - probably need to have an error code in the event object
+ if (childID > items.length) return;
if (childID == ACC.CHILDID_SELF) {
e.code = ACC.ROLE_SYSTEM_PAGETABLIST;
} else {
@@ -379,7 +363,7 @@
public void get_accState(AccessibleControlEvent e) {
int childID = e.childID;
- if (childID > items.length) return; // sigh - probably need to have an error code in the event object
+ if (childID > items.length) return;
int state;
if (childID == ACC.CHILDID_SELF) {
state = ACC.STATE_SYSTEM_NORMAL;
@@ -391,10 +375,6 @@
}
e.code = state;
}
-
- public void get_accValue(AccessibleControlEvent e) {
- // not yet implemented... none of the tabs has a value... should really do nothing... need an adapter...
- }
});
/* End ACCESSIBILITY */
}