
- SWING 教程
- SWING - 主頁
- SWING - 概述
- SWING - 環境
- SWING - 控制元件
- SWING - 事件處理
- SWING - 事件類
- SWING - 事件偵聽器
- SWING - 事件介面卡
- SWING - 佈局
- SWING - 選單
- SWING - 容器
- SWING 有用資源
- SWING - 快速指南
- SWING - 有用資源
- SWING - 討論
SWING - 容器事件類
簡介
ContainerEvent 類表示容器的內容已發生更改,這是由於新增或刪除了元件。
類宣告
以下是 java.awt.event.ContainerEvent 類的宣告 -
public class ContainerEvent extends ComponentEvent
欄位
以下是 java.awt.Component 類的欄位 -
static int COMPONENT_ADDED - 此事件表示已向容器添加了元件。
static int COMPONENT_REMOVED - 此事件表示已從容器中刪除了元件。
static int CONTAINER_FIRST - 用於容器事件的 ID 範圍內的第一個數字。
static int CONTAINER_LAST - 用於容器事件的 ID 範圍內的最後一個數字。
類建構函式
序列號 | 建構函式和說明 |
---|---|
1 |
ContainerEvent(Component source, int id, Component child) 構造 ContainerEvent 物件。 |
類方法
序號 | 方法和說明 |
---|---|
1 |
Component getChild() 返回受事件影響的元件。 |
2 |
Container getContainer() 返回事件的引發者。 |
3 |
String paramString() 返回標識此事件的引數字串。 |
繼承的方法
此類繼承了以下類的以下方法 -
- java.awt.ComponentEvent
- java.awt.AWTEvent
- java.util.EventObject
- java.lang.Object
swing_event_classes.htm
廣告