java.awt
Class AWTEventMulticaster

java.lang.Object
  |
  +--java.awt.AWTEventMulticaster
All Implemented Interfaces:
ActionListener, AdjustmentListener, ComponentListener, ContainerListener, EventListener, FocusListener, HierarchyBoundsListener, HierarchyListener, InputMethodListener, ItemListener, KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, TextListener, WindowFocusListener, WindowListener, WindowStateListener
Direct Known Subclasses:
DnDEventMulticaster, java.awt.Toolkit.ToolkitEventMulticaster

public class AWTEventMulticaster
extends Object
implements ComponentListener, ContainerListener, FocusListener, KeyListener, MouseListener, MouseMotionListener, WindowListener, WindowFocusListener, WindowStateListener, ActionListener, ItemListener, AdjustmentListener, TextListener, InputMethodListener, HierarchyListener, HierarchyBoundsListener, MouseWheelListener

Unsafe: A class which implements efficient and thread-safe multi-cast event dispatching for the AWT events defined in the java.awt.event package. This class will manage an immutable structure consisting of a chain of event listeners and will dispatch events to those listeners. Because the structure is immutable, it is safe to use this API to add/remove listeners during the process of an event dispatch operation. An example of how this class could be used to implement a new component which fires "action" events:


 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
         if (actionListener != null) {
             actionListener.actionPerformed(new ActionEvent());
         }         
 }
 

Since:
1.1
Version:
1.32, 01/17/02
Author:
John Rose, Amy Fowler

Field Summary
protected  EventListener a
           
protected  EventListener b
           
 
Constructor Summary
protected AWTEventMulticaster(EventListener a, EventListener b)
          Creates an event multicaster instance which chains listener-a with listener-b.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Enabled: Handles the actionPerformed event by invoking the actionPerformed methods on listener-a and listener-b.
static ActionListener add(ActionListener a, ActionListener b)
          Enabled: Adds action-listener-a with action-listener-b and returns the resulting multicast listener.
static AdjustmentListener add(AdjustmentListener a, AdjustmentListener b)
          Enabled: Adds adjustment-listener-a with adjustment-listener-b and returns the resulting multicast listener.
static ComponentListener add(ComponentListener a, ComponentListener b)
          Enabled: Adds component-listener-a with component-listener-b and returns the resulting multicast listener.
static ContainerListener add(ContainerListener a, ContainerListener b)
          Enabled: Adds container-listener-a with container-listener-b and returns the resulting multicast listener.
static FocusListener add(FocusListener a, FocusListener b)
          Enabled: Adds focus-listener-a with focus-listener-b and returns the resulting multicast listener.
static HierarchyBoundsListener add(HierarchyBoundsListener a, HierarchyBoundsListener b)
          Enabled: Adds hierarchy-bounds-listener-a with hierarchy-bounds-listener-b and returns the resulting multicast listener.
static HierarchyListener add(HierarchyListener a, HierarchyListener b)
          Enabled: Adds hierarchy-listener-a with hierarchy-listener-b and returns the resulting multicast listener.
static InputMethodListener add(InputMethodListener a, InputMethodListener b)
          Enabled: Adds input-method-listener-a with input-method-listener-b and returns the resulting multicast listener.
static ItemListener add(ItemListener a, ItemListener b)
          Enabled: Adds item-listener-a with item-listener-b and returns the resulting multicast listener.
static KeyListener add(KeyListener a, KeyListener b)
          Enabled: Adds key-listener-a with key-listener-b and returns the resulting multicast listener.
static MouseListener add(MouseListener a, MouseListener b)
          Enabled: Adds mouse-listener-a with mouse-listener-b and returns the resulting multicast listener.
static MouseMotionListener add(MouseMotionListener a, MouseMotionListener b)
          Enabled: Adds mouse-motion-listener-a with mouse-motion-listener-b and returns the resulting multicast listener.
static MouseWheelListener add(MouseWheelListener a, MouseWheelListener b)
          Enabled: Adds mouse-wheel-listener-a with mouse-wheel-listener-b and returns the resulting multicast listener.
static TextListener add(TextListener a, TextListener b)
          Enabled:
static WindowFocusListener add(WindowFocusListener a, WindowFocusListener b)
          Enabled: Adds window-focus-listener-a with window-focus-listener-b and returns the resulting multicast listener.
static WindowListener add(WindowListener a, WindowListener b)
          Enabled: Adds window-listener-a with window-listener-b and returns the resulting multicast listener.
static WindowStateListener add(WindowStateListener a, WindowStateListener b)
          Enabled: Adds window-state-listener-a with window-state-listener-b and returns the resulting multicast listener.
protected static EventListener addInternal(EventListener a, EventListener b)
          Returns the resulting multicast listener from adding listener-a and listener-b together.
 void adjustmentValueChanged(AdjustmentEvent e)
          Enabled: Handles the adjustmentValueChanged event by invoking the adjustmentValueChanged methods on listener-a and listener-b.
 void ancestorMoved(HierarchyEvent e)
          Suppressed: Handles the ancestorMoved event by invoking the ancestorMoved methods on listener-a and listener-b.
 void ancestorResized(HierarchyEvent e)
          Suppressed: Handles the ancestorResized event by invoking the ancestorResized methods on listener-a and listener-b.
 void caretPositionChanged(InputMethodEvent e)
          Enabled: Handles the caretPositionChanged event by invoking the caretPositionChanged methods on listener-a and listener-b.
 void componentAdded(ContainerEvent e)
          Enabled: Handles the componentAdded container event by invoking the componentAdded methods on listener-a and listener-b.
 void componentHidden(ComponentEvent e)
          Enabled: Handles the componentHidden event by invoking the componentHidden methods on listener-a and listener-b.
 void componentMoved(ComponentEvent e)
          Enabled: Handles the componentMoved event by invoking the componentMoved methods on listener-a and listener-b.
 void componentRemoved(ContainerEvent e)
          Enabled: Handles the componentRemoved container event by invoking the componentRemoved methods on listener-a and listener-b.
 void componentResized(ComponentEvent e)
          Enabled: Handles the componentResized event by invoking the componentResized methods on listener-a and listener-b.
 void componentShown(ComponentEvent e)
          Enabled: Handles the componentShown event by invoking the componentShown methods on listener-a and listener-b.
 void focusGained(FocusEvent e)
          Enabled: Handles the focusGained event by invoking the focusGained methods on listener-a and listener-b.
 void focusLost(FocusEvent e)
          Enabled: Handles the focusLost event by invoking the focusLost methods on listener-a and listener-b.
private static int getListenerCount(EventListener l, Class listenerType)
           
static EventListener[] getListeners(EventListener l, Class listenerType)
          Suppressed: Returns an array of all the objects chained as FooListeners by the specified java.util.EventListener.
 void hierarchyChanged(HierarchyEvent e)
          Suppressed: Handles the hierarchyChanged event by invoking the hierarchyChanged methods on listener-a and listener-b.
 void inputMethodTextChanged(InputMethodEvent e)
          Enabled: Handles the inputMethodTextChanged event by invoking the inputMethodTextChanged methods on listener-a and listener-b.
 void itemStateChanged(ItemEvent e)
          Enabled: Handles the itemStateChanged event by invoking the itemStateChanged methods on listener-a and listener-b.
 void keyPressed(KeyEvent e)
          Enabled: Handles the keyPressed event by invoking the keyPressed methods on listener-a and listener-b.
 void keyReleased(KeyEvent e)
          Enabled: Handles the keyReleased event by invoking the keyReleased methods on listener-a and listener-b.
 void keyTyped(KeyEvent e)
          Enabled: Handles the keyTyped event by invoking the keyTyped methods on listener-a and listener-b.
 void mouseClicked(MouseEvent e)
          Enabled: Handles the mouseClicked event by invoking the mouseClicked methods on listener-a and listener-b.
 void mouseDragged(MouseEvent e)
          Enabled: Handles the mouseDragged event by invoking the mouseDragged methods on listener-a and listener-b.
 void mouseEntered(MouseEvent e)
          Enabled: Handles the mouseEntered event by invoking the mouseEntered methods on listener-a and listener-b.
 void mouseExited(MouseEvent e)
          Enabled: Handles the mouseExited event by invoking the mouseExited methods on listener-a and listener-b.
 void mouseMoved(MouseEvent e)
          Enabled: Handles the mouseMoved event by invoking the mouseMoved methods on listener-a and listener-b.
 void mousePressed(MouseEvent e)
          Enabled: Handles the mousePressed event by invoking the mousePressed methods on listener-a and listener-b.
 void mouseReleased(MouseEvent e)
          Enabled: Handles the mouseReleased event by invoking the mouseReleased methods on listener-a and listener-b.
 void mouseWheelMoved(MouseWheelEvent e)
          Enabled: Handles the mouseWheelMoved event by invoking the mouseWheelMoved methods on listener-a and listener-b.
private static int populateListenerArray(EventListener[] a, EventListener l, int index)
           
static ActionListener remove(ActionListener l, ActionListener oldl)
          Enabled: Removes the old action-listener from action-listener-l and returns the resulting multicast listener.
static AdjustmentListener remove(AdjustmentListener l, AdjustmentListener oldl)
          Enabled: Removes the old adjustment-listener from adjustment-listener-l and returns the resulting multicast listener.
static ComponentListener remove(ComponentListener l, ComponentListener oldl)
          Enabled: Removes the old component-listener from component-listener-l and returns the resulting multicast listener.
static ContainerListener remove(ContainerListener l, ContainerListener oldl)
          Enabled: Removes the old container-listener from container-listener-l and returns the resulting multicast listener.
protected  EventListener remove(EventListener oldl)
          Removes a listener from this multicaster and returns the resulting multicast listener.
static FocusListener remove(FocusListener l, FocusListener oldl)
          Enabled: Removes the old focus-listener from focus-listener-l and returns the resulting multicast listener.
static HierarchyBoundsListener remove(HierarchyBoundsListener l, HierarchyBoundsListener oldl)
          Enabled: Removes the old hierarchy-bounds-listener from hierarchy-bounds-listener-l and returns the resulting multicast listener.
static HierarchyListener remove(HierarchyListener l, HierarchyListener oldl)
          Enabled: Removes the old hierarchy-listener from hierarchy-listener-l and returns the resulting multicast listener.
static InputMethodListener remove(InputMethodListener l, InputMethodListener oldl)
          Enabled: Removes the old input-method-listener from input-method-listener-l and returns the resulting multicast listener.
static ItemListener remove(ItemListener l, ItemListener oldl)
          Enabled: Removes the old item-listener from item-listener-l and returns the resulting multicast listener.
static KeyListener remove(KeyListener l, KeyListener oldl)
          Enabled: Removes the old key-listener from key-listener-l and returns the resulting multicast listener.
static MouseListener remove(MouseListener l, MouseListener oldl)
          Enabled: Removes the old mouse-listener from mouse-listener-l and returns the resulting multicast listener.
static MouseMotionListener remove(MouseMotionListener l, MouseMotionListener oldl)
          Enabled: Removes the old mouse-motion-listener from mouse-motion-listener-l and returns the resulting multicast listener.
static MouseWheelListener remove(MouseWheelListener l, MouseWheelListener oldl)
          Enabled: Removes the old mouse-wheel-listener from mouse-wheel-listener-l and returns the resulting multicast listener.
static TextListener remove(TextListener l, TextListener oldl)
          Enabled:
static WindowFocusListener remove(WindowFocusListener l, WindowFocusListener oldl)
          Enabled: Removes the old window-focus-listener from window-focus-listener-l and returns the resulting multicast listener.
static WindowListener remove(WindowListener l, WindowListener oldl)
          Enabled: Removes the old window-listener from window-listener-l and returns the resulting multicast listener.
static WindowStateListener remove(WindowStateListener l, WindowStateListener oldl)
          Enabled: Removes the old window-state-listener from window-state-listener-l and returns the resulting multicast listener.
protected static EventListener removeInternal(EventListener l, EventListener oldl)
          Returns the resulting multicast listener after removing the old listener from listener-l.
protected static void save(ObjectOutputStream s, String k, EventListener l)
           
protected  void saveInternal(ObjectOutputStream s, String k)
           
 void textValueChanged(TextEvent e)
          Enabled:
 void windowActivated(WindowEvent e)
          Suppressed: Handles the windowActivated event by invoking the windowActivated methods on listener-a and listener-b.
 void windowClosed(WindowEvent e)
          Suppressed: Handles the windowClosed event by invoking the windowClosed methods on listener-a and listener-b.
 void windowClosing(WindowEvent e)
          Suppressed: Handles the windowClosing event by invoking the windowClosing methods on listener-a and listener-b.
 void windowDeactivated(WindowEvent e)
          Suppressed: Handles the windowDeactivated event by invoking the windowDeactivated methods on listener-a and listener-b.
 void windowDeiconified(WindowEvent e)
          Suppressed: Handles the windowDeiconfied event by invoking the windowDeiconified methods on listener-a and listener-b.
 void windowGainedFocus(WindowEvent e)
          Suppressed: Handles the windowGainedFocus event by invoking the windowGainedFocus methods on listener-a and listener-b.
 void windowIconified(WindowEvent e)
          Suppressed: Handles the windowIconified event by invoking the windowIconified methods on listener-a and listener-b.
 void windowLostFocus(WindowEvent e)
          Suppressed: Handles the windowLostFocus event by invoking the windowLostFocus methods on listener-a and listener-b.
 void windowOpened(WindowEvent e)
          Suppressed: Handles the windowOpened event by invoking the windowOpened methods on listener-a and listener-b.
 void windowStateChanged(WindowEvent e)
          Suppressed: Handles the windowStateChanged event by invoking the windowStateChanged methods on listener-a and listener-b.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

a

protected final EventListener a

b

protected final EventListener b
Constructor Detail

AWTEventMulticaster

protected AWTEventMulticaster(EventListener a,
                              EventListener b)
Creates an event multicaster instance which chains listener-a with listener-b. Input parameters a and b should not be null, though implementations may vary in choosing whether or not to throw NullPointerException in that case.

Parameters:
a - listener-a
b - listener-b
Method Detail

remove

protected EventListener remove(EventListener oldl)
Removes a listener from this multicaster and returns the resulting multicast listener.

Parameters:
oldl - the listener to be removed

componentResized

public void componentResized(ComponentEvent e)
Enabled: Handles the componentResized event by invoking the componentResized methods on listener-a and listener-b.

Specified by:
componentResized in interface ComponentListener
Parameters:
e - the component event

componentMoved

public void componentMoved(ComponentEvent e)
Enabled: Handles the componentMoved event by invoking the componentMoved methods on listener-a and listener-b.

Specified by:
componentMoved in interface ComponentListener
Parameters:
e - the component event

componentShown

public void componentShown(ComponentEvent e)
Enabled: Handles the componentShown event by invoking the componentShown methods on listener-a and listener-b.

Specified by:
componentShown in interface ComponentListener
Parameters:
e - the component event

componentHidden

public void componentHidden(ComponentEvent e)
Enabled: Handles the componentHidden event by invoking the componentHidden methods on listener-a and listener-b.

Specified by:
componentHidden in interface ComponentListener
Parameters:
e - the component event

componentAdded

public void componentAdded(ContainerEvent e)
Enabled: Handles the componentAdded container event by invoking the componentAdded methods on listener-a and listener-b.

Specified by:
componentAdded in interface ContainerListener
Parameters:
e - the component event

componentRemoved

public void componentRemoved(ContainerEvent e)
Enabled: Handles the componentRemoved container event by invoking the componentRemoved methods on listener-a and listener-b.

Specified by:
componentRemoved in interface ContainerListener
Parameters:
e - the component event

focusGained

public void focusGained(FocusEvent e)
Enabled: Handles the focusGained event by invoking the focusGained methods on listener-a and listener-b.

Specified by:
focusGained in interface FocusListener
Parameters:
e - the focus event

focusLost

public void focusLost(FocusEvent e)
Enabled: Handles the focusLost event by invoking the focusLost methods on listener-a and listener-b.

Specified by:
focusLost in interface FocusListener
Parameters:
e - the focus event

keyTyped

public void keyTyped(KeyEvent e)
Enabled: Handles the keyTyped event by invoking the keyTyped methods on listener-a and listener-b.

Specified by:
keyTyped in interface KeyListener
Parameters:
e - the key event

keyPressed

public void keyPressed(KeyEvent e)
Enabled: Handles the keyPressed event by invoking the keyPressed methods on listener-a and listener-b.

Specified by:
keyPressed in interface KeyListener
Parameters:
e - the key event

keyReleased

public void keyReleased(KeyEvent e)
Enabled: Handles the keyReleased event by invoking the keyReleased methods on listener-a and listener-b.

Specified by:
keyReleased in interface KeyListener
Parameters:
e - the key event

mouseClicked

public void mouseClicked(MouseEvent e)
Enabled: Handles the mouseClicked event by invoking the mouseClicked methods on listener-a and listener-b.

Specified by:
mouseClicked in interface MouseListener
Parameters:
e - the mouse event

mousePressed

public void mousePressed(MouseEvent e)
Enabled: Handles the mousePressed event by invoking the mousePressed methods on listener-a and listener-b.

Specified by:
mousePressed in interface MouseListener
Parameters:
e - the mouse event

mouseReleased

public void mouseReleased(MouseEvent e)
Enabled: Handles the mouseReleased event by invoking the mouseReleased methods on listener-a and listener-b.

Specified by:
mouseReleased in interface MouseListener
Parameters:
e - the mouse event

mouseEntered

public void mouseEntered(MouseEvent e)
Enabled: Handles the mouseEntered event by invoking the mouseEntered methods on listener-a and listener-b.

Specified by:
mouseEntered in interface MouseListener
Parameters:
e - the mouse event

mouseExited

public void mouseExited(MouseEvent e)
Enabled: Handles the mouseExited event by invoking the mouseExited methods on listener-a and listener-b.

Specified by:
mouseExited in interface MouseListener
Parameters:
e - the mouse event

mouseDragged

public void mouseDragged(MouseEvent e)
Enabled: Handles the mouseDragged event by invoking the mouseDragged methods on listener-a and listener-b.

Specified by:
mouseDragged in interface MouseMotionListener
Parameters:
e - the mouse event

mouseMoved

public void mouseMoved(MouseEvent e)
Enabled: Handles the mouseMoved event by invoking the mouseMoved methods on listener-a and listener-b.

Specified by:
mouseMoved in interface MouseMotionListener
Parameters:
e - the mouse event

windowOpened

public void windowOpened(WindowEvent e)
Suppressed: Handles the windowOpened event by invoking the windowOpened methods on listener-a and listener-b.

Specified by:
windowOpened in interface WindowListener
Parameters:
e - the window event

windowClosing

public void windowClosing(WindowEvent e)
Suppressed: Handles the windowClosing event by invoking the windowClosing methods on listener-a and listener-b.

Specified by:
windowClosing in interface WindowListener
Parameters:
e - the window event

windowClosed

public void windowClosed(WindowEvent e)
Suppressed: Handles the windowClosed event by invoking the windowClosed methods on listener-a and listener-b.

Specified by:
windowClosed in interface WindowListener
Parameters:
e - the window event

windowIconified

public void windowIconified(WindowEvent e)
Suppressed: Handles the windowIconified event by invoking the windowIconified methods on listener-a and listener-b.

Specified by:
windowIconified in interface WindowListener
Parameters:
e - the window event
See Also:
java.awt.Frame#setIconImage

windowDeiconified

public void windowDeiconified(WindowEvent e)
Suppressed: Handles the windowDeiconfied event by invoking the windowDeiconified methods on listener-a and listener-b.

Specified by:
windowDeiconified in interface WindowListener
Parameters:
e - the window event

windowActivated

public void windowActivated(WindowEvent e)
Suppressed: Handles the windowActivated event by invoking the windowActivated methods on listener-a and listener-b.

Specified by:
windowActivated in interface WindowListener
Parameters:
e - the window event

windowDeactivated

public void windowDeactivated(WindowEvent e)
Suppressed: Handles the windowDeactivated event by invoking the windowDeactivated methods on listener-a and listener-b.

Specified by:
windowDeactivated in interface WindowListener
Parameters:
e - the window event

windowStateChanged

public void windowStateChanged(WindowEvent e)
Suppressed: Handles the windowStateChanged event by invoking the windowStateChanged methods on listener-a and listener-b.

Specified by:
windowStateChanged in interface WindowStateListener
Parameters:
e - the window event

windowGainedFocus

public void windowGainedFocus(WindowEvent e)
Suppressed: Handles the windowGainedFocus event by invoking the windowGainedFocus methods on listener-a and listener-b.

Specified by:
windowGainedFocus in interface WindowFocusListener
Parameters:
e - the window event

windowLostFocus

public void windowLostFocus(WindowEvent e)
Suppressed: Handles the windowLostFocus event by invoking the windowLostFocus methods on listener-a and listener-b.

Specified by:
windowLostFocus in interface WindowFocusListener
Parameters:
e - the window event

actionPerformed

public void actionPerformed(ActionEvent e)
Enabled: Handles the actionPerformed event by invoking the actionPerformed methods on listener-a and listener-b.

Specified by:
actionPerformed in interface ActionListener
Parameters:
e - the action event

itemStateChanged

public void itemStateChanged(ItemEvent e)
Enabled: Handles the itemStateChanged event by invoking the itemStateChanged methods on listener-a and listener-b.

Specified by:
itemStateChanged in interface ItemListener
Parameters:
e - the item event

adjustmentValueChanged

public void adjustmentValueChanged(AdjustmentEvent e)
Enabled: Handles the adjustmentValueChanged event by invoking the adjustmentValueChanged methods on listener-a and listener-b.

Specified by:
adjustmentValueChanged in interface AdjustmentListener
Parameters:
e - the adjustment event

textValueChanged

public void textValueChanged(TextEvent e)
Enabled:

Specified by:
textValueChanged in interface TextListener

inputMethodTextChanged

public void inputMethodTextChanged(InputMethodEvent e)
Enabled: Handles the inputMethodTextChanged event by invoking the inputMethodTextChanged methods on listener-a and listener-b.

Specified by:
inputMethodTextChanged in interface InputMethodListener
Parameters:
e - the item event

caretPositionChanged

public void caretPositionChanged(InputMethodEvent e)
Enabled: Handles the caretPositionChanged event by invoking the caretPositionChanged methods on listener-a and listener-b.

Specified by:
caretPositionChanged in interface InputMethodListener
Parameters:
e - the item event

hierarchyChanged

public void hierarchyChanged(HierarchyEvent e)
Suppressed: Handles the hierarchyChanged event by invoking the hierarchyChanged methods on listener-a and listener-b.

Specified by:
hierarchyChanged in interface HierarchyListener
Parameters:
e - the item event
See Also:
HierarchyEvent.getChangeFlags()

ancestorMoved

public void ancestorMoved(HierarchyEvent e)
Suppressed: Handles the ancestorMoved event by invoking the ancestorMoved methods on listener-a and listener-b.

Specified by:
ancestorMoved in interface HierarchyBoundsListener
Parameters:
e - the item event

ancestorResized

public void ancestorResized(HierarchyEvent e)
Suppressed: Handles the ancestorResized event by invoking the ancestorResized methods on listener-a and listener-b.

Specified by:
ancestorResized in interface HierarchyBoundsListener
Parameters:
e - the item event

mouseWheelMoved

public void mouseWheelMoved(MouseWheelEvent e)
Enabled: Handles the mouseWheelMoved event by invoking the mouseWheelMoved methods on listener-a and listener-b.

Specified by:
mouseWheelMoved in interface MouseWheelListener
Parameters:
e - the mouse event
Since:
1.4
See Also:
MouseWheelEvent

add

public static ComponentListener add(ComponentListener a,
                                    ComponentListener b)
Enabled: Adds component-listener-a with component-listener-b and returns the resulting multicast listener.

Parameters:
a - component-listener-a
b - component-listener-b

add

public static ContainerListener add(ContainerListener a,
                                    ContainerListener b)
Enabled: Adds container-listener-a with container-listener-b and returns the resulting multicast listener.

Parameters:
a - container-listener-a
b - container-listener-b

add

public static FocusListener add(FocusListener a,
                                FocusListener b)
Enabled: Adds focus-listener-a with focus-listener-b and returns the resulting multicast listener.

Parameters:
a - focus-listener-a
b - focus-listener-b

add

public static KeyListener add(KeyListener a,
                              KeyListener b)
Enabled: Adds key-listener-a with key-listener-b and returns the resulting multicast listener.

Parameters:
a - key-listener-a
b - key-listener-b

add

public static MouseListener add(MouseListener a,
                                MouseListener b)
Enabled: Adds mouse-listener-a with mouse-listener-b and returns the resulting multicast listener.

Parameters:
a - mouse-listener-a
b - mouse-listener-b

add

public static MouseMotionListener add(MouseMotionListener a,
                                      MouseMotionListener b)
Enabled: Adds mouse-motion-listener-a with mouse-motion-listener-b and returns the resulting multicast listener.

Parameters:
a - mouse-motion-listener-a
b - mouse-motion-listener-b

add

public static WindowListener add(WindowListener a,
                                 WindowListener b)
Enabled: Adds window-listener-a with window-listener-b and returns the resulting multicast listener.

Parameters:
a - window-listener-a
b - window-listener-b

add

public static WindowStateListener add(WindowStateListener a,
                                      WindowStateListener b)
Enabled: Adds window-state-listener-a with window-state-listener-b and returns the resulting multicast listener.

Parameters:
a - window-state-listener-a
b - window-state-listener-b

add

public static WindowFocusListener add(WindowFocusListener a,
                                      WindowFocusListener b)
Enabled: Adds window-focus-listener-a with window-focus-listener-b and returns the resulting multicast listener.

Parameters:
a - window-focus-listener-a
b - window-focus-listener-b

add

public static ActionListener add(ActionListener a,
                                 ActionListener b)
Enabled: Adds action-listener-a with action-listener-b and returns the resulting multicast listener.

Parameters:
a - action-listener-a
b - action-listener-b

add

public static ItemListener add(ItemListener a,
                               ItemListener b)
Enabled: Adds item-listener-a with item-listener-b and returns the resulting multicast listener.

Parameters:
a - item-listener-a
b - item-listener-b

add

public static AdjustmentListener add(AdjustmentListener a,
                                     AdjustmentListener b)
Enabled: Adds adjustment-listener-a with adjustment-listener-b and returns the resulting multicast listener.

Parameters:
a - adjustment-listener-a
b - adjustment-listener-b

add

public static TextListener add(TextListener a,
                               TextListener b)
Enabled:


add

public static InputMethodListener add(InputMethodListener a,
                                      InputMethodListener b)
Enabled: Adds input-method-listener-a with input-method-listener-b and returns the resulting multicast listener.

Parameters:
a - input-method-listener-a
b - input-method-listener-b

add

public static HierarchyListener add(HierarchyListener a,
                                    HierarchyListener b)
Enabled: Adds hierarchy-listener-a with hierarchy-listener-b and returns the resulting multicast listener.

Parameters:
a - hierarchy-listener-a
b - hierarchy-listener-b

add

public static HierarchyBoundsListener add(HierarchyBoundsListener a,
                                          HierarchyBoundsListener b)
Enabled: Adds hierarchy-bounds-listener-a with hierarchy-bounds-listener-b and returns the resulting multicast listener.

Parameters:
a - hierarchy-bounds-listener-a
b - hierarchy-bounds-listener-b

add

public static MouseWheelListener add(MouseWheelListener a,
                                     MouseWheelListener b)
Enabled: Adds mouse-wheel-listener-a with mouse-wheel-listener-b and returns the resulting multicast listener.

Parameters:
a - mouse-wheel-listener-a
b - mouse-wheel-listener-b
Since:
1.4

remove

public static ComponentListener remove(ComponentListener l,
                                       ComponentListener oldl)
Enabled: Removes the old component-listener from component-listener-l and returns the resulting multicast listener.

Parameters:
l - component-listener-l
oldl - the component-listener being removed

remove

public static ContainerListener remove(ContainerListener l,
                                       ContainerListener oldl)
Enabled: Removes the old container-listener from container-listener-l and returns the resulting multicast listener.

Parameters:
l - container-listener-l
oldl - the container-listener being removed

remove

public static FocusListener remove(FocusListener l,
                                   FocusListener oldl)
Enabled: Removes the old focus-listener from focus-listener-l and returns the resulting multicast listener.

Parameters:
l - focus-listener-l
oldl - the focus-listener being removed

remove

public static KeyListener remove(KeyListener l,
                                 KeyListener oldl)
Enabled: Removes the old key-listener from key-listener-l and returns the resulting multicast listener.

Parameters:
l - key-listener-l
oldl - the key-listener being removed

remove

public static MouseListener remove(MouseListener l,
                                   MouseListener oldl)
Enabled: Removes the old mouse-listener from mouse-listener-l and returns the resulting multicast listener.

Parameters:
l - mouse-listener-l
oldl - the mouse-listener being removed

remove

public static MouseMotionListener remove(MouseMotionListener l,
                                         MouseMotionListener oldl)
Enabled: Removes the old mouse-motion-listener from mouse-motion-listener-l and returns the resulting multicast listener.

Parameters:
l - mouse-motion-listener-l
oldl - the mouse-motion-listener being removed

remove

public static WindowListener remove(WindowListener l,
                                    WindowListener oldl)
Enabled: Removes the old window-listener from window-listener-l and returns the resulting multicast listener.

Parameters:
l - window-listener-l
oldl - the window-listener being removed

remove

public static WindowStateListener remove(WindowStateListener l,
                                         WindowStateListener oldl)
Enabled: Removes the old window-state-listener from window-state-listener-l and returns the resulting multicast listener.

Parameters:
l - window-state-listener-l
oldl - the window-state-listener being removed

remove

public static WindowFocusListener remove(WindowFocusListener l,
                                         WindowFocusListener oldl)
Enabled: Removes the old window-focus-listener from window-focus-listener-l and returns the resulting multicast listener.

Parameters:
l - window-focus-listener-l
oldl - the window-focus-listener being removed

remove

public static ActionListener remove(ActionListener l,
                                    ActionListener oldl)
Enabled: Removes the old action-listener from action-listener-l and returns the resulting multicast listener.

Parameters:
l - action-listener-l
oldl - the action-listener being removed

remove

public static ItemListener remove(ItemListener l,
                                  ItemListener oldl)
Enabled: Removes the old item-listener from item-listener-l and returns the resulting multicast listener.

Parameters:
l - item-listener-l
oldl - the item-listener being removed

remove

public static AdjustmentListener remove(AdjustmentListener&n