public class PaintEvent extends ComponentEvent
未指定的行为将如果任何特定的PaintEvent实例的id参数不在PAINT_FIRST到PAINT_LAST范围造成的。
| Modifier and Type | Field and Description |
|---|---|
static int |
PAINT
油漆事件类型。
|
static int |
PAINT_FIRST
标记绘制事件标识范围的第一个整数标识。
|
static int |
PAINT_LAST
标记绘制事件标识的范围的最后一个整数标识。
|
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对象类型。
|
| 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.