| |
|
| java.awt.event.ComponentEvent java.awt.event.PaintEvent
PaintEvent | public class PaintEvent extends ComponentEvent (Code) | | The component-level paint event.
This event is a special type which is used to ensure that
paint/update method calls are serialized along with the other
events delivered from the event queue. This event is not
designed to be used with the Event Listener model; programs
should continue to override paint/update methods in order
render themselves properly.
author: Amy Fowler version: 1.29, 06/05/07 since: 1.1 |
Field Summary | |
final public static int | PAINT The paint event type. | final public static int | PAINT_FIRST Marks the first integer id for the range of paint event ids. | final public static int | PAINT_LAST Marks the last integer id for the range of paint event ids. | final public static int | UPDATE The update event type. | Rectangle | updateRect This is the rectangle that represents the area on the source
component that requires a repaint. |
Constructor Summary | |
public | PaintEvent(Component source, int id, Rectangle updateRect) Constructs a PaintEvent object with the specified
source component and type.
Note that passing in an invalid id results in
unspecified behavior. |
Method Summary | |
public Rectangle | getUpdateRect() Returns the rectangle representing the area which needs to be
repainted in response to this event. | public String | paramString() | public void | setUpdateRect(Rectangle updateRect) Sets the rectangle representing the area which needs to be
repainted in response to this event. |
PAINT | final public static int PAINT(Code) | | The paint event type.
|
PAINT_FIRST | final public static int PAINT_FIRST(Code) | | Marks the first integer id for the range of paint event ids.
|
PAINT_LAST | final public static int PAINT_LAST(Code) | | Marks the last integer id for the range of paint event ids.
|
UPDATE | final public static int UPDATE(Code) | | The update event type.
|
PaintEvent | public PaintEvent(Component source, int id, Rectangle updateRect)(Code) | | Constructs a PaintEvent object with the specified
source component and type.
Note that passing in an invalid id results in
unspecified behavior. This method throws an
IllegalArgumentException if source
is null .
Parameters: source - the object where the event originated Parameters: id - the event type Parameters: updateRect - the rectangle area which needs to be repainted throws: IllegalArgumentException - if source is null |
getUpdateRect | public Rectangle getUpdateRect()(Code) | | Returns the rectangle representing the area which needs to be
repainted in response to this event.
|
setUpdateRect | public void setUpdateRect(Rectangle updateRect)(Code) | | Sets the rectangle representing the area which needs to be
repainted in response to this event.
Parameters: updateRect - the rectangle area which needs to be repainted |
|
|
|