public class PaintEvent extends ComponentEvent
 如果未指定的行为将引起id任何特定的参数PaintEvent实例不在范围从PAINT_FIRST到PAINT_LAST 。 
| Modifier and Type | Field and Description | 
|---|---|
| static int | PAINT
              油漆事件类型。 
             | 
| static int | PAINT_FIRST
              标记paint事件id的范围的第一个整数id。 
             | 
| static int | PAINT_LAST
              标记paint事件ID范围的最后一个整数id。 
             | 
| static int | UPDATE
              更新事件类型。 
             | 
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWNACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASKsource| Constructor and Description | 
|---|
| PaintEvent(Component source, int id, Rectangle updateRect)
              构造具有 
              PaintEvent源组件和类型的PaintEvent对象。 | 
| Modifier and Type | Method and Description | 
|---|---|
| Rectangle | getUpdateRect()
              返回表示需要重绘的区域的矩形,以响应此事件。 
             | 
| String | paramString()
              返回标识此事件的参数字符串。 
             | 
| void | setUpdateRect(Rectangle updateRect)
              设置表示需要重新绘制的区域的矩形以响应此事件。 
             | 
getComponentgetSourcepublic static final int PAINT_FIRST
public static final int PAINT_LAST
public static final int PAINT
public static final int UPDATE
public PaintEvent(Component source, int id, Rectangle updateRect)
PaintEvent对象。 
            此方法抛出IllegalArgumentException如果source是null 。 
source - 事件发生的对象 
           id - 标识事件类型的整数。 
            有关允许值的信息,请参阅PaintEvent的类说明 
           updateRect - 需要重新绘制的矩形区域 
           IllegalArgumentException - 如果 
            source为空 
           EventObject.getSource() , 
            AWTEvent.getID() , 
            getUpdateRect() 
           public Rectangle getUpdateRect()
public void setUpdateRect(Rectangle updateRect)
updateRect - 需要重新绘制的矩形区域 
           public String paramString()
ComponentEvent复制 
          paramString在类别 
            ComponentEvent 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.