Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.awt.event

Class PaintEvent

java.lang.Object
|
+--java.util.EventObject
   |
   +--java.awt.AWTEvent
      |
      +--java.awt.event.ComponentEvent
         |
         +--java.awt.event.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:Author:

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(java.awt.Component source, int id, java.awt.Rectangle updateRect)

Initializes a new instance of PaintEvent with the specified source, id, and update region.

Method Summary

java.awt.RectanglegetUpdateRect()

Returns the rectange to be updated for this event.
java.lang.StringparamString()

Returns a string identifying this event.
voidsetUpdateRect(java.awt.Rectangle updateRect)

Sets the rectangle to be updated for this event.

Field Details

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 Details

PaintEvent

public PaintEvent(java.awt.Component source, int id, java.awt.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:

Throws:


Method Details

getUpdateRect

public Rectangle getUpdateRect()

Returns the rectange to be updated for this event.

Returns:


paramString

public String paramString()

Returns a string identifying this event.

Returns:


setUpdateRect

public void setUpdateRect(java.awt.Rectangle updateRect)

Sets the rectangle to be updated for this event.

Parameters: