KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwt > awt > event > FocusEvent


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file..
7
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9
10    $Log: FocusEvent.java,v $
11    Revision 1.6 2004/04/16 10:19:06 dannaab
12    Misc bug fixes, InputMap implementation, preliminary undo support
13
14    Revision 1.5 2003/12/14 09:13:38 bobintetley
15    Added CVS log to source headers
16
17 */

18
19 package swingwt.awt.event;
20
21 import swingwt.awt.Component;
22
23 public class FocusEvent extends ComponentEvent implements java.io.Serializable JavaDoc
24 {
25     public static final int FOCUS_FIRST = 1004;
26     public static final int FOCUS_LAST = 1005;
27     public static final int FOCUS_GAINED = FOCUS_FIRST;
28     public static final int FOCUS_LOST = 1 + FOCUS_FIRST;
29
30     private boolean temporary;
31     private Component opposite;
32
33     public FocusEvent(Component source, int id, boolean temporary) { this(source, id, temporary, null); }
34     public FocusEvent(Component source, int id) { this(source, id, false); }
35     public FocusEvent(Component source, int id, boolean temporary, Component opposite)
36     {
37         super(source, id);
38         this.temporary = temporary;
39         this.opposite = opposite;
40     }
41
42     public boolean isTemporary() { return temporary; }
43     public Component getOppositeComponent() { return opposite; }
44 }
45
Popular Tags