ComponentEvent.java [plain text]
package java.awt.event;
import java.awt.*;
public class ComponentEvent extends AWTEvent
{
public static final int COMPONENT_FIRST = 100;
public static final int COMPONENT_HIDDEN = 103;
public static final int COMPONENT_LAST = 103;
public static final int COMPONENT_MOVED = 100;
public static final int COMPONENT_RESIZED = 101;
public static final int COMPONENT_SHOWN = 102;
public ComponentEvent (Component source, int id)
{
super(source, id);
}
public Component getComponent ()
{
return (Component) source;
}
public String paramString ()
{
String r;
switch (id)
{
case COMPONENT_HIDDEN:
r = "COMPONENT_HIDDEN";
break;
case COMPONENT_MOVED:
r = "COMPONENT_MOVED";
break;
case COMPONENT_RESIZED:
r = "COMPONENT_RESIZED";
break;
case COMPONENT_SHOWN:
r = "COMPONENT_SHOWN";
break;
default:
r = "unknown id";
break;
}
return r;
}
}