public class ComponentEvent extends AWTEvent
ComponentAdapter
,
ComponentListener
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
COMPONENT_FIRST
This is the first id in the range of ids used by this class.
|
static int |
COMPONENT_HIDDEN
This id indicates that a component was hidden.
|
static int |
COMPONENT_LAST
This is the last id in the range of ids used by this class.
|
static int |
COMPONENT_MOVED
This id indicates that a component was moved.
|
static int |
COMPONENT_RESIZED
This id indicates that a component was resized.
|
static int |
COMPONENT_SHOWN
This id indicates that a component was shown.
|
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
source
Constructor and Description |
---|
ComponentEvent(Component source,
int id)
Initializes a new instance of
ComponentEvent with the
specified source and id. |
Modifier and Type | Method and Description |
---|---|
Component |
getComponent()
This method returns the event source as a
Component . |
String |
paramString()
This method returns a string identifying this event.
|
getSource
public static final int COMPONENT_FIRST
public static final int COMPONENT_LAST
public static final int COMPONENT_MOVED
public static final int COMPONENT_RESIZED
public static final int COMPONENT_SHOWN
public static final int COMPONENT_HIDDEN
public ComponentEvent(Component source, int id)
ComponentEvent
with the
specified source and id. Note that an invalid id leads to unspecified
results.source
- the source of the eventid
- the event idIllegalArgumentException
- if source is nullpublic Component getComponent()
Component
. If the
source has subsequently been modified to a non-Component, this returns
null.Component
, or nullpublic String paramString()
paramString
in class AWTEvent