java.awt.event

Class PaintEvent

public class PaintEvent extends ComponentEvent

This event is generated when an area of the screen needs to be painted. This event is not meant for users, but exists to allow proper serialization behavior in the EventQueue with user-accessible events.

Since: 1.1

UNKNOWN: updated to 1.4

Field Summary
static intPAINT
This id is for paint event types.
static intPAINT_FIRST
This is the first id in the range of event ids used by this class.
static intPAINT_LAST
This is the last id in the range of event ids used by this class.
static intUPDATE
This id is for update event types.
Constructor Summary
PaintEvent(Component source, int id, Rectangle updateRect)
Initializes a new instance of PaintEvent with the specified source, id, and update region.
Method Summary
RectanglegetUpdateRect()
Returns the rectange to be updated for this event.
StringparamString()
Returns a string identifying this event.
voidsetUpdateRect(Rectangle updateRect)
Sets the rectangle to be updated for this event.

Field Detail

PAINT

public static final int PAINT
This id is for paint event types.

PAINT_FIRST

public static final int PAINT_FIRST
This is the first id in the range of event ids used by this class.

PAINT_LAST

public static final int PAINT_LAST
This is the last id in the range of event ids used by this class.

UPDATE

public static final int UPDATE
This id is for update event types.

Constructor Detail

PaintEvent

public PaintEvent(Component source, int id, Rectangle updateRect)
Initializes a new instance of PaintEvent with the specified source, id, and update region. Note that an invalid id leads to unspecified results.

Parameters: source the event source id the event id updateRect the rectangle to repaint

Throws: IllegalArgumentException if source is null

Method Detail

getUpdateRect

public Rectangle getUpdateRect()
Returns the rectange to be updated for this event.

Returns: the rectangle to update

paramString

public String paramString()
Returns a string identifying this event.

Returns: a string identifying this event

setUpdateRect

public void setUpdateRect(Rectangle updateRect)
Sets the rectangle to be updated for this event.

Parameters: updateRect the new update rectangle for this event