public class

PaintEventDispatcher

extends Object
java.lang.Object
   ↳ sun.awt.PaintEventDispatcher

Class Overview

PaintEventDispatcher is responsible for dispatching PaintEvents. There can be only one PaintEventDispatcher active at a particular time.

Summary

Public Constructors
PaintEventDispatcher()
Public Methods
PaintEvent createPaintEvent(Component target, int x, int y, int w, int h)
Creates and returns the PaintEvent that should be dispatched for the specified component.
static PaintEventDispatcher getPaintEventDispatcher()
Returns the currently active PaintEventDispatcher.
boolean queueSurfaceDataReplacing(Component c, Runnable r)
This method is invoked from the toolkit thread when the surface data of the component needs to be replaced.
static void setPaintEventDispatcher(PaintEventDispatcher dispatcher)
Sets the current PaintEventDispatcher.
boolean shouldDoNativeBackgroundErase(Component c)
Returns true if a native background erase should be done for the specified Component.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PaintEventDispatcher ()

Public Methods

public PaintEvent createPaintEvent (Component target, int x, int y, int w, int h)

Creates and returns the PaintEvent that should be dispatched for the specified component. If this returns null no PaintEvent is dispatched.

WARNING: This is invoked from the native thread, be careful what methods you end up invoking here.

public static PaintEventDispatcher getPaintEventDispatcher ()

Returns the currently active PaintEventDispatcher. This will never return null.

Returns
  • PaintEventDispatcher

public boolean queueSurfaceDataReplacing (Component c, Runnable r)

This method is invoked from the toolkit thread when the surface data of the component needs to be replaced. The method run() of the Runnable argument performs surface data replacing, run() should be invoked on the EDT of this component's AppContext. Returns true if the Runnable has been enqueued to be invoked on the EDT. (Fix 6255371.)

public static void setPaintEventDispatcher (PaintEventDispatcher dispatcher)

Sets the current PaintEventDispatcher.

Parameters
dispatcher PaintEventDispatcher

public boolean shouldDoNativeBackgroundErase (Component c)

Returns true if a native background erase should be done for the specified Component.