Home » openjdk-7 » java » awt » event » [javadoc | source]
java.awt.event
public class: PaintEvent [javadoc | source]
java.lang.Object
   java.util.EventObject
      java.awt.AWTEvent
         java.awt.event.ComponentEvent
            java.awt.event.PaintEvent

All Implemented Interfaces:
    Serializable

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.

An unspecified behavior will be caused if the {@code id} parameter of any particular {@code PaintEvent} instance is not in the range from {@code PAINT_FIRST} to {@code PAINT_LAST}.

Field Summary
public static final  int PAINT_FIRST    Marks the first integer id for the range of paint event ids. 
public static final  int PAINT_LAST    Marks the last integer id for the range of paint event ids. 
public static final  int PAINT    The paint event type. 
public static final  int UPDATE    The update event type. 
 Rectangle updateRect    This is the rectangle that represents the area on the source component that requires a repaint. This rectangle should be non null. 
Fields inherited from java.awt.event.ComponentEvent:
COMPONENT_FIRST,  COMPONENT_LAST,  COMPONENT_MOVED,  COMPONENT_RESIZED,  COMPONENT_SHOWN,  COMPONENT_HIDDEN
Fields inherited from java.awt.AWTEvent:
id,  consumed,  focusManagerIsDispatching,  isPosted,  COMPONENT_EVENT_MASK,  CONTAINER_EVENT_MASK,  FOCUS_EVENT_MASK,  KEY_EVENT_MASK,  MOUSE_EVENT_MASK,  MOUSE_MOTION_EVENT_MASK,  WINDOW_EVENT_MASK,  ACTION_EVENT_MASK,  ADJUSTMENT_EVENT_MASK,  ITEM_EVENT_MASK,  TEXT_EVENT_MASK,  INPUT_METHOD_EVENT_MASK,  INPUT_METHODS_ENABLED_MASK,  PAINT_EVENT_MASK,  INVOCATION_EVENT_MASK,  HIERARCHY_EVENT_MASK,  HIERARCHY_BOUNDS_EVENT_MASK,  MOUSE_WHEEL_EVENT_MASK,  WINDOW_STATE_EVENT_MASK,  WINDOW_FOCUS_EVENT_MASK,  RESERVED_ID_MAX
Fields inherited from java.util.EventObject:
source
Constructor:
 public PaintEvent(Component source,
    int id,
    Rectangle updateRect) 
    Constructs a PaintEvent object with the specified source component and type.

    This method throws an IllegalArgumentException if source is null.

    Parameters:
    source - The object where the event originated
    id - The integer that identifies the event type. For information on allowable values, see the class description for PaintEvent
    updateRect - The rectangle area which needs to be repainted
    Throws:
    IllegalArgumentException - if source is null
    Also see:
    getSource()
    getID()
    getUpdateRect()
Method from java.awt.event.PaintEvent Summary:
getUpdateRect,   paramString,   setUpdateRect
Methods from java.awt.event.ComponentEvent:
getComponent,   paramString
Methods from java.awt.AWTEvent:
consume,   convertToOld,   copyPrivateDataInto,   dispatched,   getAccessControlContext,   getID,   isConsumed,   paramString,   setSource,   toString
Methods from java.util.EventObject:
getSource,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.awt.event.PaintEvent Detail:
 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.