Community
Participate
Working Groups
Test snippet: Button button = new Button( shell, SWT.PUSH ); button.addMouseListener( new MouseAdapter() { public void mouseDown( MouseEvent event ) { assertEquals( 4711, event.time ); } } ); Event event = new Event(); event.time = 4711; button.notifyListeners( SWT.MouseDown, event );
Just a note... In RAP time field is a field in MouseEvent class, but in SWT it is a TypedEvent filed. Maybe we can consider to move this field in TypedEvent class like in SWT and fix the bug in TypedEvent ctor for all events like: public TypedEvent(Event e) { super(e.widget); this.display = e.display; this.widget = e.widget; this.time = e.time; this.data = e.data; }
(In reply to comment #1) > Just a note... In RAP time field is a field in MouseEvent class, but in SWT it > is a TypedEvent filed. Maybe we can consider to move this field in TypedEvent > class like in SWT and fix the bug in TypedEvent ctor for all events like: Right, there's already a bug for this: bug 332976
Fixed in CVS HEAD. See MouseEvent ctor.