類的paintEvent使用,以確保paint/update方法的呼叫序列與其他事件從事件佇列傳遞
以下是宣告的java.awt.event.PaintEvent類:
public class PaintEvent extends ComponentEvent
以下是java.awt.Component 類的欄位:
static int PAINT -- 事件型別。
static int PAINT_FIRST -- 標誌著第一個整數識別符號paint 的事件ID的範圍
static int PAINT_LAST -- 標記paint 事件的id範圍的最後一個整數ID。
static int UPDATE -- 更新事件型別。
S.N. | 建構函式&說明 |
---|---|
1 |
PaintEvent(Component source, int id, Rectangle updateRect) Constructs a PaintEvent object with the specified source component and type. |
S.N. | 方法&說明 |
---|---|
1 |
Rectangle getUpdateRect() Returns the rectangle representing the area which needs to be repainted in response to this event. |
2 |
String paramString() Returns a parameter string identifying this event. |
3 |
void setUpdateRect(Rectangle updateRect) Sets the rectangle representing the area which needs to be repainted in response to this event. |
這個類繼承的方法從以下類:
java.awt.ComponentEvent
java.awt.AWTEvent
java.util.EventObject
java.lang.Object