This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 22088 - Events are not created with proper timestamp
Summary: Events are not created with proper timestamp
Status: CLOSED FIXED
Alias: None
Product: qa
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P1 blocker (vote)
Assignee: issues@qa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-04 10:25 UTC by Jiri Skrivanek
Modified: 2011-02-17 09:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2002-04-04 10:25:24 UTC
EventDispatcher now creates events like this:

MouseEvent event = new MouseEvent(component, id,
0, mods, x, y, clickCount, popup);

KeyEvent event = new KeyEvent(component, id, 0,
mods, keyCode);

0 stands for timestamp. But IDE has its own
double-click detection where it checks time
difference between single clicks and if time
difference is less than a constant, it assumes it
is a double-click. It makes some tests to fail.
It would be better to create events with proper
timestamp:

390: MouseEvent event = new MouseEvent(component,
id, System.currentTimeMillis(), mods, x, y,
clickCount, popup);
427:	KeyEvent event = new KeyEvent(component, id,
System.currentTimeMillis(), mods, keyCode);
440:	KeyEvent event = new KeyEvent(component, id,
System.currentTimeMillis(), mods, keyCode,
keyChar);
Comment 1 Alexandre Iline 2002-04-15 05:36:21 UTC
Just like Jiri said:

System.currentTimeMillis() instead of 0 as 
timestamp.
Comment 2 Alexandre Iline 2002-04-15 08:32:58 UTC
390c390,391
< 	MouseEvent event = new MouseEvent(component, id, 0, mods, x, y,
clickCount, popup);
---
> 	MouseEvent event = new MouseEvent(component, id,
System.currentTimeMillis(), 
> 					  mods, x, y, clickCount, popup);
427c428,429
< 	KeyEvent event = new KeyEvent(component, id, 0, mods, keyCode);
---
> 	KeyEvent event = new KeyEvent(component, id,
System.currentTimeMillis()
> 				      , mods, keyCode);
440c442,443
< 	KeyEvent event = new KeyEvent(component, id, 0, mods, keyCode,
keyChar);
---
> 	KeyEvent event = new KeyEvent(component, id,
System.currentTimeMillis(), 
> 				      mods, keyCode, keyChar);
Comment 3 Jiri Skrivanek 2002-04-15 17:29:53 UTC
Verified.