java.awt.event
public class PaintEvent extends ComponentEvent
Modifier and Type | Field and Description |
---|---|
static int |
PAINT
This id is for paint event types.
|
static int |
PAINT_FIRST
This is the first id in the range of event ids used by this class.
|
static int |
PAINT_LAST
This is the last id in the range of event ids used by this class.
|
static int |
UPDATE
This id is for update event types.
|
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_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 |
---|
PaintEvent(Component source,
int id,
Rectangle updateRect)
Initializes a new instance of
PaintEvent with the specified
source, id, and update region. |
Modifier and Type | Method and Description |
---|---|
Rectangle |
getUpdateRect()
Returns the rectange to be updated for this event.
|
String |
paramString()
Returns a string identifying this event.
|
void |
setUpdateRect(Rectangle updateRect)
Sets the rectangle to be updated for this event.
|
getComponent
getSource
public static final int PAINT_FIRST
public static final int PAINT_LAST
public static final int PAINT
public static final int UPDATE
public PaintEvent(Component source, int id, Rectangle updateRect)
PaintEvent
with the specified
source, id, and update region. Note that an invalid id leads to
unspecified results.source
- the event sourceid
- the event idupdateRect
- the rectangle to repaintIllegalArgumentException
- if source is nullpublic Rectangle getUpdateRect()
public void setUpdateRect(Rectangle updateRect)
updateRect
- the new update rectangle for this eventpublic String paramString()
paramString
in class ComponentEvent