1 19 package swingwt.awt.event; 20 21 import swingwt.awt.AWTEvent; 22 import swingwt.awt.Component; 23 24 30 public class ComponentEvent extends AWTEvent { 31 public static final int COMPONENT_FIRST=100; 32 public static final int COMPONENT_LAST=103; 33 public static final int COMPONENT_MOVED=COMPONENT_FIRST; 34 public static final int COMPONENT_RESIZED=1+COMPONENT_FIRST; 35 public static final int COMPONENT_SHOWN=2+COMPONENT_FIRST; 36 public static final int COMPONENT_HIDDEN=3+COMPONENT_FIRST; 37 38 public ComponentEvent(Component source) { 39 super(source); 40 } 41 42 47 public ComponentEvent(Component source, int id) { 48 super(source, id); 49 } 50 51 55 public Component getComponent() { 56 return (source instanceof Component) ? (Component)source : null; 57 } 58 59 } 60 | Popular Tags |