java.awt.event
Class PaintEvent
- java.lang.Object
-
- java.util.EventObject
-
- java.awt.AWTEvent
-
- java.awt.event.ComponentEvent
-
- java.awt.event.PaintEvent
-
- All Implemented Interfaces:
- java.io.Serializable
public class PaintEvent extends ComponentEventThe 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.An unspecified behavior will be caused if the
id
parameter of any particularPaintEvent
instance is not in the range fromPAINT_FIRST
toPAINT_LAST
.- Since:
- 1.1
- See Also:
- Serialized Form
-
-
Fields Modifier and Type Field and Description ACTION_EVENT_MASK The event mask for selecting action events.ADJUSTMENT_EVENT_MASK The event mask for selecting adjustment events.COMPONENT_EVENT_MASK The event mask for selecting component events.COMPONENT_FIRST The first number in the range of ids used for component events.COMPONENT_HIDDEN This event indicates that the component was rendered invisible.COMPONENT_LAST The last number in the range of ids used for component events.COMPONENT_MOVED This event indicates that the component's position changed.COMPONENT_RESIZED This event indicates that the component's size changed.COMPONENT_SHOWN This event indicates that the component was made visible.consumed Controls whether or not the event is sent back down to the peer once the source has processed it - false means it's sent to the peer; true means it's not.CONTAINER_EVENT_MASK The event mask for selecting container events.FOCUS_EVENT_MASK The event mask for selecting focus events.HIERARCHY_BOUNDS_EVENT_MASK The event mask for selecting hierarchy bounds events.HIERARCHY_EVENT_MASK The event mask for selecting hierarchy events.id The event's id.INPUT_METHOD_EVENT_MASK The event mask for selecting input method events.INVOCATION_EVENT_MASK The event mask for selecting invocation events.ITEM_EVENT_MASK The event mask for selecting item events.KEY_EVENT_MASK The event mask for selecting key events.MOUSE_EVENT_MASK The event mask for selecting mouse events.MOUSE_MOTION_EVENT_MASK The event mask for selecting mouse motion events.MOUSE_WHEEL_EVENT_MASK The event mask for selecting mouse wheel events.PAINT The paint event type.PAINT_EVENT_MASK The event mask for selecting paint events.PAINT_FIRST Marks the first integer id for the range of paint event ids.PAINT_LAST Marks the last integer id for the range of paint event ids.RESERVED_ID_MAX The maximum value for reserved AWT event IDs.source The object on which the Event initially occurred.TEXT_EVENT_MASK The event mask for selecting text events.UPDATE The update event type.WINDOW_EVENT_MASK The event mask for selecting window events.WINDOW_FOCUS_EVENT_MASK The event mask for selecting window focus events.WINDOW_STATE_EVENT_MASK The event mask for selecting window state events.
-
Constructors Constructor and Description PaintEvent Constructs aPaintEvent
object with the specified source component and type.
-
Methods Modifier and Type Method and Description consume Consumes this event, if this event can be consumed.getComponent Returns the originator of the event.getID Returns the event type.getSource The object on which the Event initially occurred.getUpdateRect Returns the rectangle representing the area which needs to be repainted in response to this event.isConsumed Returns whether this event has been consumed.paramString Returns a parameter string identifying this event.setSource Retargets an event to a new source.setUpdateRect Sets the rectangle representing the area which needs to be repainted in response to this event.toString Returns a String representation of this object.
-