|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
java.lang.Objectjava.awt.AWTEventMulticaster
public class AWTEventMulticaster
AWTEventMulticaster 實作對 java.awt.event 套件中定義的 AWT 事件的指派,該指派是有效的、執行緒安全的多路廣播事件指派。
以下實例闡釋了如何使用此類別:
public myComponent extends Component {
ActionListener actionListener = null;
public synchronized void addActionListener(ActionListener l) {
actionListener = AWTEventMulticaster.add(actionListener, l);
}
public synchronized void removeActionListener(ActionListener l) {
actionListener = AWTEventMulticaster.remove(actionListener, l);
}
public void processEvent(AWTEvent e) {
// when event occurs which causes "action" semantic
ActionListener listener = actionListener;
if (listener != null) {
listener.actionPerformed(new ActionEvent());
}
}
}
需要重點注意的是 add 和 remove 方法的第一個參數,它是維護偵聽器的欄位。此外,必須將 add 和 remove 方法的結果分派給維護偵聽器的欄位。
AWTEventMulticaster 是作為一對 EventListeners 實作的,它們在建構時被設置。AWTEventMulticaster 是不可變的。add 和 remove 方法不得以任何方式改變 AWTEventMulticaster。如有必要,可以創建一個新的 AWTEventMulticaster。以這種方式在指派事件的過程中添加和移除偵聽器是安全的。但是,不會向目前正指派的事件通知事件指派操作過程中添加的事件偵聽器。
允許所有 add 方法使用 null 參數。如果第一個參數是 null,則返回第二個參數。如果第一個參數不是 null,而第二個參數是 null,則返回第一個參數。如果兩個參數都是 non-null,則使用這兩個參數創建一個新的 AWTEventMulticaster 並返回它。
對於使用兩個參數的 remove 方法,返回以下內容:
null,如果第一個參數是 null,或者參數相等(==)。
AWTEventMulticaster 實例。
remove(EventListener) 方法的情況下,對第一個參數調用 remove(EventListener) 的結果。
Swing 基於類似的邏輯使用 EventListenerList。有關細節,請參見 EventListenerList。
EventListenerList| 欄位摘要 | |
|---|---|
protected EventListener |
a
|
protected EventListener |
b
|
| 建構子摘要 | |
|---|---|
protected |
AWTEventMulticaster(EventListener a,
EventListener b)
創建一個將偵聽器 a 和偵聽器 b 連接起來的事件多路廣播器實例。 |
| 方法摘要 | ||
|---|---|---|
void |
actionPerformed(ActionEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 actionPerformed 方法處理 actionPerformed 事件。 |
|
static ActionListener |
add(ActionListener a,
ActionListener b)
添加操作偵聽器 a 和操作偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static AdjustmentListener |
add(AdjustmentListener a,
AdjustmentListener b)
添加調整偵聽器 a 和調整偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static ComponentListener |
add(ComponentListener a,
ComponentListener b)
添加元件偵聽器 a 和元件偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static ContainerListener |
add(ContainerListener a,
ContainerListener b)
添加容器偵聽器 a 和容器偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static FocusListener |
add(FocusListener a,
FocusListener b)
添加焦點偵聽器 a 和焦點偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static HierarchyBoundsListener |
add(HierarchyBoundsListener a,
HierarchyBoundsListener b)
添加層次結構邊界偵聽器 a 和層次結構邊界偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static HierarchyListener |
add(HierarchyListener a,
HierarchyListener b)
添加層次結構偵聽器 a 和層次結構偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static InputMethodListener |
add(InputMethodListener a,
InputMethodListener b)
添加輸入方法偵聽器 a 和輸入方法偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static ItemListener |
add(ItemListener a,
ItemListener b)
添加項偵聽器 a 和項偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static KeyListener |
add(KeyListener a,
KeyListener b)
添加鍵偵聽器 a 和鍵偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static MouseListener |
add(MouseListener a,
MouseListener b)
添加鼠標偵聽器 a 和鼠標偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static MouseMotionListener |
add(MouseMotionListener a,
MouseMotionListener b)
添加鼠標移動偵聽器 a 和鼠標移動偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static MouseWheelListener |
add(MouseWheelListener a,
MouseWheelListener b)
添加鼠標滾輪偵聽器 a 和鼠標滾輪偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static TextListener |
add(TextListener a,
TextListener b)
|
|
static WindowFocusListener |
add(WindowFocusListener a,
WindowFocusListener b)
添加視窗焦點偵聽器 a 和視窗焦點偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static WindowListener |
add(WindowListener a,
WindowListener b)
添加視窗偵聽器 a 和視窗偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
static WindowStateListener |
add(WindowStateListener a,
WindowStateListener b)
添加視窗狀態偵聽器 a 和視窗狀態偵聽器 b,並返回得到的多路廣播偵聽器。 |
|
protected static EventListener |
addInternal(EventListener a,
EventListener b)
從正添加的偵聽器 a 和偵聽器 b 中一起返回得到的多路廣播偵聽器。 |
|
void |
adjustmentValueChanged(AdjustmentEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 adjustmentValueChanged 方法處理 adjustmentValueChanged 事件。 |
|
void |
ancestorMoved(HierarchyEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 ancestorMoved 方法處理 ancestorMoved 事件。 |
|
void |
ancestorResized(HierarchyEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 ancestorResized 方法處理 ancestorResized 事件。 |
|
void |
caretPositionChanged(InputMethodEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 caretPositionChanged 方法處理 caretPositionChanged 事件。 |
|
void |
componentAdded(ContainerEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 componentAdded 方法處理 componentAdded 容器事件。 |
|
void |
componentHidden(ComponentEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 componentHidden 方法處理 componentHidden 事件。 |
|
void |
componentMoved(ComponentEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 componentMoved 方法處理 componentMoved 事件。 |
|
void |
componentRemoved(ContainerEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 componentRemoved 方法處理 componentRemoved 容器事件。 |
|
void |
componentResized(ComponentEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 componentResized 方法處理 componentResized 事件。 |
|
void |
componentShown(ComponentEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 componentShown 方法處理 componentShown 事件。 |
|
void |
focusGained(FocusEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 focusGained 方法處理 focusGained 事件。 |
|
void |
focusLost(FocusEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 focusLost 方法處理 focusLost 事件。 |
|
static
|
getListeners(EventListener l,
Class<T> listenerType)
返回通過指定的 java.util.EventListener 連接為 FooListener 的所有物件的陣列。 |
|
void |
hierarchyChanged(HierarchyEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 hierarchyChanged 方法處理 hierarchyChanged 事件。 |
|
void |
inputMethodTextChanged(InputMethodEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 inputMethodTextChanged 方法處理 inputMethodTextChanged 事件。 |
|
void |
itemStateChanged(ItemEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 itemStateChanged 方法處理 itemStateChanged 事件。 |
|
void |
keyPressed(KeyEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 keyPressed 方法處理 keyPressed 事件。 |
|
void |
keyReleased(KeyEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 keyReleased 方法處理 keyReleased 事件。 |
|
void |
keyTyped(KeyEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 keyTyped 方法處理 keyTyped 事件。 |
|
void |
mouseClicked(MouseEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 mouseClicked 方法處理 mouseClicked 事件。 |
|
void |
mouseDragged(MouseEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 mouseDragged 方法處理 mouseDragged 事件。 |
|
void |
mouseEntered(MouseEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 mouseEntered 方法處理 mouseEntered 事件。 |
|
void |
mouseExited(MouseEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 mouseExited 方法處理 mouseExited 事件。 |
|
void |
mouseMoved(MouseEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 mouseMoved 方法處理 mouseMoved 事件。 |
|
void |
mousePressed(MouseEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 mousePressed 方法處理 mousePressed 事件。 |
|
void |
mouseReleased(MouseEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 mouseReleased 方法處理 mouseReleased 事件。 |
|
void |
mouseWheelMoved(MouseWheelEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 mouseWheelMoved 方法處理 mouseWheelMoved 事件。 |
|
static ActionListener |
remove(ActionListener l,
ActionListener oldl)
從操作偵聽器 l 中移除舊的操作偵聽器,並返回得到的多路廣播偵聽器。 |
|
static AdjustmentListener |
remove(AdjustmentListener l,
AdjustmentListener oldl)
從調整偵聽器 l 中移除舊的調整偵聽器,並返回得到的多路廣播偵聽器。 |
|
static ComponentListener |
remove(ComponentListener l,
ComponentListener oldl)
從元件偵聽器 l 中移除舊的元件偵聽器,並返回得到的多路廣播偵聽器。 |
|
static ContainerListener |
remove(ContainerListener l,
ContainerListener oldl)
從容器偵聽器 l 中移除舊的容器偵聽器,並返回得到的多路廣播偵聽器。 |
|
protected EventListener |
remove(EventListener oldl)
從此多路廣播器中移除一個偵聽器。 |
|
static FocusListener |
remove(FocusListener l,
FocusListener oldl)
從焦點偵聽器 l 中移除舊的焦點偵聽器,並返回得到的多路廣播偵聽器。 |
|
static HierarchyBoundsListener |
remove(HierarchyBoundsListener l,
HierarchyBoundsListener oldl)
從層次結構邊界偵聽器 l 中移除舊的層次結構邊界偵聽器,並返回得到的多路廣播偵聽器。 |
|
static HierarchyListener |
remove(HierarchyListener l,
HierarchyListener oldl)
從層次結構偵聽器 l 中移除舊的層次結構偵聽器,並返回得到的多路廣播偵聽器。 |
|
static InputMethodListener |
remove(InputMethodListener l,
InputMethodListener oldl)
從輸入方法偵聽器 l 中移除舊的輸入方法偵聽器,並返回得到的多路廣播偵聽器。 |
|
static ItemListener |
remove(ItemListener l,
ItemListener oldl)
從項偵聽器 l 中移除舊的項偵聽器,並返回得到的多路廣播偵聽器。 |
|
static KeyListener |
remove(KeyListener l,
KeyListener oldl)
從鍵偵聽器 l 中移除舊的鍵偵聽器,並返回得到的多路廣播偵聽器。 |
|
static MouseListener |
remove(MouseListener l,
MouseListener oldl)
從鼠標偵聽器 l 中移除舊的鼠標偵聽器,並返回得到的多路廣播偵聽器。 |
|
static MouseMotionListener |
remove(MouseMotionListener l,
MouseMotionListener oldl)
從鼠標移動偵聽器 l 中移除舊的鼠標移動偵聽器,並返回得到的多路廣播偵聽器。 |
|
static MouseWheelListener |
remove(MouseWheelListener l,
MouseWheelListener oldl)
從鼠標滾輪偵聽器 l 中移除舊的鼠標滾輪偵聽器,並返回得到的多路廣播偵聽器。 |
|
static TextListener |
remove(TextListener l,
TextListener oldl)
|
|
static WindowFocusListener |
remove(WindowFocusListener l,
WindowFocusListener oldl)
從視窗焦點偵聽器 l 中移除舊的視窗焦點偵聽器,並返回得到的多路廣播偵聽器。 |
|
static WindowListener |
remove(WindowListener l,
WindowListener oldl)
從視窗偵聽器 l 中移除舊的視窗偵聽器,並返回得到的多路廣播偵聽器。 |
|
static WindowStateListener |
remove(WindowStateListener l,
WindowStateListener oldl)
從視窗狀態偵聽器 l 中移除舊的視窗狀態偵聽器,並返回得到的多路廣播偵聽器。 |
|
protected static EventListener |
removeInternal(EventListener l,
EventListener oldl)
在從偵聽器 l 中移除舊的偵聽器之後,返回得到的多路廣播偵聽器。 |
|
protected static void |
save(ObjectOutputStream s,
String k,
EventListener l)
|
|
protected void |
saveInternal(ObjectOutputStream s,
String k)
|
|
void |
textValueChanged(TextEvent e)
文本的值已改變時調用。 |
|
void |
windowActivated(WindowEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 windowActivated 方法處理 windowActivated 事件。 |
|
void |
windowClosed(WindowEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 windowClosed 方法處理 windowClosed 事件。 |
|
void |
windowClosing(WindowEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 windowClosing 方法處理 windowClosing 事件。 |
|
void |
windowDeactivated(WindowEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 windowDeactivated 方法處理 windowDeactivated 事件。 |
|
void |
windowDeiconified(WindowEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 windowDeiconified 方法處理 windowDeiconified 事件。 |
|
void |
windowGainedFocus(WindowEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 windowGainedFocus 方法處理 windowGainedFocus 事件。 |
|
void |
windowIconified(WindowEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 windowIconified 方法處理 windowIconified 事件。 |
|
void |
windowLostFocus(WindowEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 windowLostFocus 方法處理 windowLostFocus 事件。 |
|
void |
windowOpened(WindowEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 windowOpened 方法處理 windowOpened 事件。 |
|
void |
windowStateChanged(WindowEvent e)
通過在偵聽器 a 和偵聽器 b 上調用 windowStateChanged 方法處理 windowStateChanged 事件。 |
|
| 從類別 java.lang.Object 繼承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 欄位詳細資訊 |
|---|
protected final EventListener a
protected final EventListener b
| 建構子詳細資訊 |
|---|
protected AWTEventMulticaster(EventListener a,
EventListener b)
a 和 b 不應為 null,對於是否選擇在這種情況下拋出 NullPointerException,因實作不同而各不相同。
a - 偵聽器 ab - 偵聽器 b| 方法詳細資訊 |
|---|
protected EventListener remove(EventListener oldl)
除了所有出現的 oldl 之外,返回的多路廣播器包含此多路廣播器中的所有偵聽器。如果得到的多路廣播器只包含可能返回的常規偵聽器。如果得到的多路廣播器為空,則可能返回 null。
如果 oldl 為 null,不會有異常拋出。
oldl - 要移除的偵聽器
public void componentResized(ComponentEvent e)
ComponentListener 中的 componentResizede - 元件事件public void componentMoved(ComponentEvent e)
ComponentListener 中的 componentMovede - 元件事件public void componentShown(ComponentEvent e)
ComponentListener 中的 componentShowne - 元件事件public void componentHidden(ComponentEvent e)
ComponentListener 中的 componentHiddene - 元件事件public void componentAdded(ContainerEvent e)
ContainerListener 中的 componentAddede - 元件事件public void componentRemoved(ContainerEvent e)
ContainerListener 中的 componentRemovede - 元件事件public void focusGained(FocusEvent e)
FocusListener 中的 focusGainede - 焦點事件public void focusLost(FocusEvent e)
FocusListener 中的 focusLoste - 焦點事件public void keyTyped(KeyEvent e)
KeyListener 中的 keyTypede - 鍵事件public void keyPressed(KeyEvent e)
KeyListener 中的 keyPressede - 鍵事件public void keyReleased(KeyEvent e)
KeyListener 中的 keyReleasede - 鍵事件public void mouseClicked(MouseEvent e)
MouseListener 中的 mouseClickede - 鼠標事件public void mousePressed(MouseEvent e)
MouseListener 中的 mousePressede - 鼠標事件public void mouseReleased(MouseEvent e)
MouseListener 中的 mouseReleasede - 鼠標事件public void mouseEntered(MouseEvent e)
MouseListener 中的 mouseEnterede - 鼠標事件public void mouseExited(MouseEvent e)
MouseListener 中的 mouseExitede - 鼠標事件public void mouseDragged(MouseEvent e)
MouseMotionListener 中的 mouseDraggede - 鼠標事件public void mouseMoved(MouseEvent e)
MouseMotionListener 中的 mouseMovede - 鼠標事件public void windowOpened(WindowEvent e)
WindowListener 中的 windowOpenede - 視窗事件public void windowClosing(WindowEvent e)
WindowListener 中的 windowClosinge - 視窗事件public void windowClosed(WindowEvent e)
WindowListener 中的 windowClosede - 視窗事件public void windowIconified(WindowEvent e)
WindowListener 中的 windowIconifiede - 視窗事件Frame.setIconImage(java.awt.Image)public void windowDeiconified(WindowEvent e)
WindowListener 中的 windowDeiconifiede - 視窗事件public void windowActivated(WindowEvent e)
WindowListener 中的 windowActivatede - 視窗事件public void windowDeactivated(WindowEvent e)
WindowListener 中的 windowDeactivatede - 視窗事件public void windowStateChanged(WindowEvent e)
WindowStateListener 中的 windowStateChangede - 視窗事件public void windowGainedFocus(WindowEvent e)
WindowFocusListener 中的 windowGainedFocuse - 視窗事件public void windowLostFocus(WindowEvent e)
WindowFocusListener 中的 windowLostFocuse - 視窗事件public void actionPerformed(ActionEvent e)
ActionListener 中的 actionPerformede - 操作事件public void itemStateChanged(ItemEvent e)
ItemListener 中的 itemStateChangede - 項事件public void adjustmentValueChanged(AdjustmentEvent e)
AdjustmentListener 中的 adjustmentValueChangede - 調整事件public void textValueChanged(TextEvent e)
TextListener 複製的描述
TextListener 中的 textValueChangedpublic void inputMethodTextChanged(InputMethodEvent e)
InputMethodListener 中的 inputMethodTextChangede - 項事件public void caretPositionChanged(InputMethodEvent e)
InputMethodListener 中的 caretPositionChangede - 項事件public void hierarchyChanged(HierarchyEvent e)
HierarchyListener 中的 hierarchyChangede - 項事件HierarchyEvent.getChangeFlags()public void ancestorMoved(HierarchyEvent e)
HierarchyBoundsListener 中的 ancestorMovede - 項事件public void ancestorResized(HierarchyEvent e)
HierarchyBoundsListener 中的 ancestorResizede - 項事件public void mouseWheelMoved(MouseWheelEvent e)
MouseWheelListener 中的 mouseWheelMovede - 鼠標事件MouseWheelEvent
public static ComponentListener add(ComponentListener a,
ComponentListener b)
a - 元件偵聽器 ab - 元件偵聽器 b
public static ContainerListener add(ContainerListener a,
ContainerListener b)
a - 容器偵聽器 ab - 容器偵聽器 b
public static FocusListener add(FocusListener a,
FocusListener b)
a - 焦點偵聽器 ab - 焦點偵聽器 b
public static KeyListener add(KeyListener a,
KeyListener b)
a - 鍵偵聽器 ab - 鍵偵聽器 b
public static MouseListener add(MouseListener a,
MouseListener b)
a - 鼠標偵聽器 ab - 鼠標偵聽器 b
public static MouseMotionListener add(MouseMotionListener a,
MouseMotionListener b)
a - 鼠標移動偵聽器 ab - 鼠標移動偵聽器 b
public static WindowListener add(WindowListener a,
WindowListener b)
a - 視窗偵聽器 ab - 視窗偵聽器 b
public static WindowStateListener add(WindowStateListener a,
WindowStateListener b)
a - 視窗狀態偵聽器 ab - 視窗狀態偵聽器 b
public static WindowFocusListener add(WindowFocusListener a,
WindowFocusListener b)
a - 視窗焦點偵聽器 ab - 視窗焦點偵聽器 b
public static ActionListener add(ActionListener a,
ActionListener b)
a - 操作偵聽器 ab - 操作偵聽器 b
public static ItemListener add(ItemListener a,
ItemListener b)
a - 項偵聽器 ab - 項偵聽器 b
public static AdjustmentListener add(AdjustmentListener a,
AdjustmentListener b)
a - 調整偵聽器 ab - 調整偵聽器 b
public static TextListener add(TextListener a,
TextListener b)
public static InputMethodListener add(InputMethodListener a,
InputMethodListener b)
a - 輸入方法偵聽器 ab - 輸入方法偵聽器 b
public static HierarchyListener add(HierarchyListener a,
HierarchyListener b)
a - 層次結構偵聽器 ab - 層次結構偵聽器 b
public static HierarchyBoundsListener add(HierarchyBoundsListener a,
HierarchyBoundsListener b)
a - 層次結構邊界偵聽器 ab - 層次結構邊界偵聽器 b
public static MouseWheelListener add(MouseWheelListener a,
MouseWheelListener b)
a - 鼠標滾輪偵聽器 ab - 鼠標滾輪偵聽器 b
public static ComponentListener remove(ComponentListener l,
ComponentListener oldl)
l - 元件偵聽器 loldl - 正移除的元件偵聽器
public static ContainerListener remove(ContainerListener l,
ContainerListener oldl)
l - 容器偵聽器 loldl - 正移除的容器偵聽器
public static FocusListener remove(FocusListener l,
FocusListener oldl)
l - 焦點偵聽器 loldl - 正移除的焦點偵聽器
public static KeyListener remove(KeyListener l,
KeyListener oldl)
l - 鍵偵聽器 loldl - 正移除的鍵偵聽器
public static MouseListener remove(MouseListener l,
MouseListener oldl)
l - 鼠標偵聽器 loldl - 正移除的鼠標偵聽器
public static MouseMotionListener remove(MouseMotionListener l,
MouseMotionListener oldl)
l - 鼠標移動偵聽器 loldl - 正移除的鼠標移動偵聽器
public static WindowListener remove(WindowListener l,
WindowListener oldl)
l - 視窗偵聽器 loldl - 正移除的視窗偵聽器
public static WindowStateListener remove(WindowStateListener l,
WindowStateListener oldl)
l - 視窗狀態偵聽器 loldl - 正移除的視窗狀態偵聽器
public static WindowFocusListener remove(WindowFocusListener l,
WindowFocusListener oldl)
l - 視窗焦點偵聽器 loldl - 正移除的視窗焦點偵聽器
public static ActionListener remove(ActionListener l,
ActionListener oldl)
l - 操作偵聽器 loldl - 正移除的操作偵聽器
public static ItemListener remove(ItemListener l,
ItemListener oldl)
l - 項偵聽器 loldl - 正移除的項偵聽器
public static AdjustmentListener remove(AdjustmentListener l,
AdjustmentListener oldl)
l - 調整偵聽器 loldl - 正移除的調整偵聽器
public static TextListener remove(TextListener l,
TextListener oldl)
public static InputMethodListener remove(InputMethodListener l,
InputMethodListener oldl)
l - 輸入方法偵聽器 loldl - 正移除的輸入方法偵聽器
public static HierarchyListener remove(HierarchyListener l,
HierarchyListener oldl)
l - 層次結構偵聽器 loldl - 正移除的層次結構偵聽器
public static HierarchyBoundsListener remove(HierarchyBoundsListener l,
HierarchyBoundsListener oldl)
l - 層次結構邊界偵聽器 loldl - 正移除的層次結構邊界偵聽器
public static MouseWheelListener remove(MouseWheelListener l,
MouseWheelListener oldl)
l - 鼠標滾輪偵聽器 loldl - 正移除的鼠標滾輪偵聽器
protected static EventListener addInternal(EventListener a,
EventListener b)
a - 事件偵聽器 ab - 事件偵聽器 b
protected static EventListener removeInternal(EventListener l,
EventListener oldl)
l - 正在其中執行移除操作的偵聽器oldl - 正移除的偵聽器
protected void saveInternal(ObjectOutputStream s,
String k)
throws IOException
IOException
protected static void save(ObjectOutputStream s,
String k,
EventListener l)
throws IOException
IOException
public static <T extends EventListener> T[] getListeners(EventListener l,
Class<T> listenerType)
java.util.EventListener 連接為 FooListener 的所有物件的陣列。FooListener 是使用 addFooListener 方法、通過 AWTEventMulticaster 連接的。如果已指定一個 null 偵聽器,則此方法將返回一個空陣列。如果指定的偵聽器不是 AWTEventMulticaster 的一個實例,則此方法將返回一個只包含指定偵聽器的陣列。如果沒有連接這樣的偵聽器,則此方法將返回一個空陣列。
l - 指定的 java.util.EventListenerlistenerType - 所需的偵聽器型別;該參數應該指定一個從 java.util.EventListener 遺傳下來的介面
FooListener 的所有物件的陣列,如果沒有通過指定的多路廣播偵聽器連接這樣的偵聽器,則返回一個空陣列
NullPointerException - 如果指定的 listenertype 參數為 null
ClassCastException - 如果 listenerType 沒有指定實作 java.util.EventListener 的類別或介面
|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。