1
2 package hep.wired.util;
3
4 import java.awt.*;
5 import java.awt.event.*;
6
7 /***
8 * NullEvent which can be sent as substitute for KeyEvent or MouseEvent.
9 * We would have inherited from InputEvent, but there is not public/protected
10 * constructor available to do so. So, we inherit from MouseEvent, and set
11 * the ID to outside the reserved AWT numbers.
12 *
13 * @author Mark Donszelmann
14 * @version $Id: NullEvent.java 256 2004-06-07 23:31:10Z duns $
15 */
16 public class NullEvent extends MouseEvent {
17
18 /***
19 * Creates a null event with given component.
20 */
21 public NullEvent(Component source) {
22 super(source, AWTEvent.RESERVED_ID_MAX+100, System.currentTimeMillis(), 0, 0, 0, 0, false);
23 }
24
25 public String toString() {
26 return "NullEvent: id="+getID();
27 }
28 }