summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2009-04-27 18:27:21 +0000
committerFelipe Heidrich <fheidric>2009-04-27 18:27:21 +0000
commit2597e78c6f8cd2287e06e8df541d9c78d8c54c3d (patch)
tree69d4b3402a4154a0b4ba39e0f4d479a5415e043a /bundles/org.eclipse.swt
parent98160a579c9df21bc3906776844181c243e86f63 (diff)
downloadeclipse.platform.swt-2597e78c6f8cd2287e06e8df541d9c78d8c54c3d.tar.gz
eclipse.platform.swt-2597e78c6f8cd2287e06e8df541d9c78d8c54c3d.tar.xz
eclipse.platform.swt-2597e78c6f8cd2287e06e8df541d9c78d8c54c3d.zip
Bug 159465: Accessibilities: Improve traverse order for SWT ToolBar
code consistency
Diffstat (limited to 'bundles/org.eclipse.swt')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java8
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java20
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java8
4 files changed, 21 insertions, 17 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
index ab8e9b2259..0bb0a70777 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
@@ -235,15 +235,15 @@ protected void checkSubclass () {
/* Do nothing - Subclassing is allowed */
}
-Control [] computeTabList () {
- Control result [] = super.computeTabList ();
+Widget [] computeTabList () {
+ Widget result [] = super.computeTabList ();
if (result.length == 0) return result;
Control [] list = tabList != null ? _getTabList () : _getChildren ();
for (int i=0; i<list.length; i++) {
Control child = list [i];
- Control [] childList = child.computeTabList ();
+ Widget [] childList = child.computeTabList ();
if (childList.length != 0) {
- Control [] newResult = new Control [result.length + childList.length];
+ Widget [] newResult = new Widget [result.length + childList.length];
System.arraycopy (result, 0, newResult, 0, result.length);
System.arraycopy (childList, 0, newResult, result.length, childList.length);
result = newResult;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
index aca4b58853..e6366f7e42 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
@@ -790,18 +790,18 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
return new Point (width, height);
}
-Control computeTabGroup () {
+Widget computeTabGroup () {
if (isTabGroup()) return this;
return parent.computeTabGroup ();
}
-Control[] computeTabList() {
+Widget[] computeTabList() {
if (isTabGroup()) {
if (getVisible() && getEnabled()) {
- return new Control[] {this};
+ return new Widget[] {this};
}
}
- return new Control[0];
+ return new Widget[0];
}
Control computeTabRoot () {
@@ -3610,10 +3610,6 @@ void setSmallSize () {
}
}
-boolean setTabGroupFocus () {
- return setTabItemFocus ();
-}
-
boolean setTabItemFocus () {
if (!isShowing ()) return false;
return forceFocus ();
@@ -4014,8 +4010,8 @@ boolean traverseEscape () {
boolean traverseGroup (boolean next) {
Control root = computeTabRoot ();
- Control group = computeTabGroup ();
- Control [] list = root.computeTabList ();
+ Widget group = computeTabGroup ();
+ Widget [] list = root.computeTabList ();
int length = list.length;
int index = 0;
while (index < length) {
@@ -4031,8 +4027,8 @@ boolean traverseGroup (boolean next) {
if (index == length) return false;
int start = index, offset = (next) ? 1 : -1;
while ((index = ((index + offset + length) % length)) != start) {
- Control control = list [index];
- if (!control.isDisposed () && control.setTabGroupFocus ()) {
+ Widget widget = list [index];
+ if (!widget.isDisposed () && widget.setTabGroupFocus ()) {
return true;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java
index 21cac30390..2c6703a869 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Decorations.java
@@ -181,7 +181,7 @@ int compare (ImageData data1, ImageData data2) {
return data1.width > data2.width || data1.height > data2.height ? -1 : 1;
}
-Control computeTabGroup () {
+Widget computeTabGroup () {
return this;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
index 57261f9eb2..fa7ca59ed2 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
@@ -1609,6 +1609,14 @@ void setObjectValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
callSuper(id, sel, arg0);
}
+boolean setTabGroupFocus () {
+ return setTabItemFocus ();
+}
+
+boolean setTabItemFocus () {
+ return false;
+}
+
boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
return true;
}