1 18 19 package swingwt.awt.event; 20 21 import swingwt.awt.Component; 22 23 public class FocusEvent extends ComponentEvent implements java.io.Serializable 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 |