diff options
author | Felipe Heidrich <fheidric> | 2010-04-13 19:15:25 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2010-04-13 19:15:25 +0000 |
commit | 11df801be6516cc0a18c18513213505db3b143ff (patch) | |
tree | e61cc81ff0d0456679271e6990b44e99626a5c92 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java | |
parent | 1aab190d0ff60824dbea6c6c086d9999f10fa2d7 (diff) | |
download | eclipse.platform.swt-11df801be6516cc0a18c18513213505db3b143ff.tar.gz eclipse.platform.swt-11df801be6516cc0a18c18513213505db3b143ff.tar.xz eclipse.platform.swt-11df801be6516cc0a18c18513213505db3b143ff.zip |
fix TODO for Bug 129703
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java index f555d95fd8..c59d93f2d8 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java @@ -445,6 +445,20 @@ public void addTraverseListener (TraverseListener listener) { addListener (SWT.Traverse,typedListener); } +int binarySearch (int [] indices, int start, int end, int index) { + int low = start, high = end - 1; + while (low <= high) { + int mid = (low + high) >>> 1; + if (indices [mid] == index) return mid; + if (indices [mid] < index) { + low = mid + 1; + } else { + high = mid - 1; + } + } + return -low - 1; +} + int /*long*/ borderHandle () { return handle; } |