38 |
|
|
39 |
package java.awt; |
package java.awt; |
40 |
|
|
|
import java.awt.event.PaintEvent; |
|
41 |
import javax.accessibility.Accessible; |
import javax.accessibility.Accessible; |
42 |
import javax.accessibility.AccessibleContext; |
import javax.accessibility.AccessibleContext; |
43 |
import javax.accessibility.AccessibleRole; |
import javax.accessibility.AccessibleRole; |
97 |
} |
} |
98 |
|
|
99 |
/** |
/** |
|
* Consume initial application-requested paint event if it has not |
|
|
* already been consumed, and if the initial system-requested paint |
|
|
* event has not already been handled. Otherwise, call |
|
|
* super.dispatchEventImpl. These extra steps are required to |
|
|
* prevent a Panel from being painted twice when it is initially |
|
|
* shown. |
|
|
* |
|
|
* @param e the event to dispatch |
|
|
*/ |
|
|
void dispatchEventImpl (AWTEvent e) |
|
|
{ |
|
|
if (e instanceof PaintEvent) |
|
|
{ |
|
|
if (e.id == PaintEvent.UPDATE) |
|
|
{ |
|
|
if (!initialUpdateConsumed |
|
|
&& !initialSystemUpdateDone) |
|
|
{ |
|
|
e.consume (); |
|
|
initialUpdateConsumed = true; |
|
|
} |
|
|
} |
|
|
else if (e.id == PaintEvent.PAINT) |
|
|
initialSystemUpdateDone = true; |
|
|
} |
|
|
else |
|
|
super.dispatchEventImpl (e); |
|
|
} |
|
|
|
|
|
/** |
|
100 |
* Notifies this object to create its native peer. |
* Notifies this object to create its native peer. |
101 |
* |
* |
102 |
* @see #isDisplayable() |
* @see #isDisplayable() |