Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Cornu2004-12-14 18:15:00 +0000
committerChristophe Cornu2004-12-14 18:15:00 +0000
commitb217f58400fd9273ad1965e53dac621daff260ee (patch)
tree02d55c950266801ff631de5763a8db2b581b4497 /examples
parentc355b953ab2c87a2c5f23c742ae883e47425eef0 (diff)
downloadeclipse.platform.swt-b217f58400fd9273ad1965e53dac621daff260ee.tar.gz
eclipse.platform.swt-b217f58400fd9273ad1965e53dac621daff260ee.tar.xz
eclipse.platform.swt-b217f58400fd9273ad1965e53dac621daff260ee.zip
correct event indexing
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java
index 02c6b4c3fc..ee96ac60d3 100755
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java
@@ -715,7 +715,7 @@ abstract class Tab {
}
};
for (int i = 0; i < EVENT_NAMES.length; i++) {
- if (eventsFilter [i]) widget.addListener (i + 1, listener);
+ if (eventsFilter [i]) widget.addListener (i, listener);
}
}
}
@@ -724,7 +724,7 @@ abstract class Tab {
* Logs an untyped event to the event console.
*/
void log(Event event) {
- String toString = EVENT_NAMES[event.type - 1] + ": ";
+ String toString = EVENT_NAMES[event.type] + " ["+event.type+"]: ";
switch (event.type) {
case SWT.KeyDown:
case SWT.KeyUp: toString += new KeyEvent (event).toString (); break;
@@ -734,6 +734,7 @@ abstract class Tab {
case SWT.MouseEnter:
case SWT.MouseExit:
case SWT.MouseDoubleClick:
+ case SWT.MouseWheel:
case SWT.MouseHover: toString += new MouseEvent (event).toString (); break;
case SWT.Paint: toString += new PaintEvent (event).toString (); break;
case SWT.Move:

Back to the top