All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.AWTEventMulticaster

java.lang.Object
   |
   +----java.awt.AWTEventMulticaster

public class AWTEventMulticaster
extends Object
implements ComponentListener, ContainerListener, FocusListener, KeyListener, MouseListener, MouseMotionListener, WindowListener, ActionListener, ItemListener, AdjustmentListener, TextListener
A class which implements efficient multi-cast event dispatching for the AWT events defined in the java.awt.event package. This class will manage the structure of a chain of event listeners and dispatch events to those listeners. 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 void addActionListener(ActionListener l) {
	   actionListener = AWTEventMulticaster.add(actionListener, l);
     }
     public 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());
         }         
 }
 


Variable Index

 o a
 o b

Constructor Index

 o AWTEventMulticaster(EventListener, EventListener)
Creates an event multicaster instance which chains listener-a with listener-b.

Method Index

 o actionPerformed(ActionEvent)
Handles the actionPerformed event by invoking the actionPerformed methods on listener-a and listener-b.
 o add(ActionListener, ActionListener)
Adds action-listener-a with action-listener-b and returns the resulting multicast listener.
 o add(AdjustmentListener, AdjustmentListener)
Adds adjustment-listener-a with adjustment-listener-b and returns the resulting multicast listener.
 o add(ComponentListener, ComponentListener)
Adds component-listener-a with component-listener-b and returns the resulting multicast listener.
 o add(ContainerListener, ContainerListener)
Adds container-listener-a with container-listener-b and returns the resulting multicast listener.
 o add(FocusListener, FocusListener)
Adds focus-listener-a with focus-listener-b and returns the resulting multicast listener.
 o add(ItemListener, ItemListener)
Adds item-listener-a with item-listener-b and returns the resulting multicast listener.
 o add(KeyListener, KeyListener)
Adds key-listener-a with key-listener-b and returns the resulting multicast listener.
 o add(MouseListener, MouseListener)
Adds mouse-listener-a with mouse-listener-b and returns the resulting multicast listener.
 o add(MouseMotionListener, MouseMotionListener)
Adds mouse-motion-listener-a with mouse-motion-listener-b and returns the resulting multicast listener.
 o add(TextListener, TextListener)
 o add(WindowListener, WindowListener)
Adds window-listener-a with window-listener-b and returns the resulting multicast listener.
 o addInternal(EventListener, EventListener)
Returns the resulting multicast listener from adding listener-a and listener-b together.
 o adjustmentValueChanged(AdjustmentEvent)
Handles the adjustmentValueChanged event by invoking the adjustmentValueChanged methods on listener-a and listener-b.
 o componentAdded(ContainerEvent)
Handles the componentAdded container event by invoking the componentAdded methods on listener-a and listener-b.
 o componentHidden(ComponentEvent)
Handles the componentHidden event by invoking the componentHidden methods on listener-a and listener-b.
 o componentMoved(ComponentEvent)
Handles the componentMoved event by invoking the componentMoved methods on listener-a and listener-b.
 o componentRemoved(ContainerEvent)
Handles the componentRemoved container event by invoking the componentRemoved methods on listener-a and listener-b.
 o componentResized(ComponentEvent)
Handles the componentResized event by invoking the componentResized methods on listener-a and listener-b.
 o componentShown(ComponentEvent)
Handles the componentShown event by invoking the componentShown methods on listener-a and listener-b.
 o focusGained(FocusEvent)
Handles the focusGained event by invoking the focusGained methods on listener-a and listener-b.
 o focusLost(FocusEvent)
Handles the focusLost event by invoking the focusLost methods on listener-a and listener-b.
 o itemStateChanged(ItemEvent)
Handles the itemStateChanged event by invoking the itemStateChanged methods on listener-a and listener-b.
 o keyPressed(KeyEvent)
Handles the keyPressed event by invoking the keyPressed methods on listener-a and listener-b.
 o keyReleased(KeyEvent)
Handles the keyReleased event by invoking the keyReleased methods on listener-a and listener-b.
 o keyTyped(KeyEvent)
Handles the keyTyped event by invoking the keyTyped methods on listener-a and listener-b.
 o mouseClicked(MouseEvent)
Handles the mouseClicked event by invoking the mouseClicked methods on listener-a and listener-b.
 o mouseDragged(MouseEvent)
Handles the mouseDragged event by invoking the mouseDragged methods on listener-a and listener-b.
 o mouseEntered(MouseEvent)
Handles the mouseEntered event by invoking the mouseEntered methods on listener-a and listener-b.
 o mouseExited(MouseEvent)
Handles the mouseExited event by invoking the mouseExited methods on listener-a and listener-b.
 o mouseMoved(MouseEvent)
Handles the mouseMoved event by invoking the mouseMoved methods on listener-a and listener-b.
 o mousePressed(MouseEvent)
Handles the mousePressed event by invoking the mousePressed methods on listener-a and listener-b.
 o mouseReleased(MouseEvent)
Handles the mouseReleased event by invoking the mouseReleased methods on listener-a and listener-b.
 o remove(ActionListener, ActionListener)
Removes the old action-listener from action-listener-l and returns the resulting multicast listener.
 o remove(AdjustmentListener, AdjustmentListener)
Removes the old adjustment-listener from adjustment-listener-l and returns the resulting multicast listener.
 o remove(ComponentListener, ComponentListener)
Removes the old component-listener from component-listener-l and returns the resulting multicast listener.
 o remove(ContainerListener, ContainerListener)
Removes the old container-listener from container-listener-l and returns the resulting multicast listener.
 o remove(EventListener)
Removes a listener from this multicaster and returns the resulting multicast listener.
 o remove(FocusListener, FocusListener)
Removes the old focus-listener from focus-listener-l and returns the resulting multicast listener.
 o remove(ItemListener, ItemListener)
Removes the old item-listener from item-listener-l and returns the resulting multicast listener.
 o remove(KeyListener, KeyListener)
Removes the old key-listener from key-listener-l and returns the resulting multicast listener.
 o remove(MouseListener, MouseListener)
Removes the old mouse-listener from mouse-listener-l and returns the resulting multicast listener.
 o remove(MouseMotionListener, MouseMotionListener)
Removes the old mouse-motion-listener from mouse-motion-listener-l and returns the resulting multicast listener.
 o remove(TextListener, TextListener)
 o remove(WindowListener, WindowListener)
Removes the old window-listener from window-listener-l and returns the resulting multicast listener.
 o removeInternal(EventListener, EventListener)
Returns the resulting multicast listener after removing the old listener from listener-l.
 o saveInternal(ObjectOutputStream, String)
 o textValueChanged(TextEvent)
 o windowActivated(WindowEvent)
Handles the windowActivated event by invoking the windowActivated methods on listener-a and listener-b.
 o windowClosed(WindowEvent)
Handles the windowClosed event by invoking the windowClosed methods on listener-a and listener-b.
 o windowClosing(WindowEvent)
Handles the windowClosing event by invoking the windowClosing methods on listener-a and listener-b.
 o windowDeactivated(WindowEvent)
Handles the windowDeactivated event by invoking the windowDeactivated methods on listener-a and listener-b.
 o windowDeiconified(WindowEvent)
Handles the windowDeiconfied event by invoking the windowDeiconified methods on listener-a and listener-b.
 o windowIconified(WindowEvent)
Handles the windowIconified event by invoking the windowIconified methods on listener-a and listener-b.
 o windowOpened(WindowEvent)
Handles the windowOpened event by invoking the windowOpened methods on listener-a and listener-b.

Variables

 o a
Properties Inheritable 
    a=EventListener 
 o b
Properties Inheritable 
    b=EventListener 

Constructors

 o AWTEventMulticaster
    method AWTEventMulticaster(a=EventListener, -
                               b=EventListener) Inheritable 
Creates an event multicaster instance which chains listener-a with listener-b.

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

Methods

 o remove
    method remove(oldl=EventListener) returns EventListener Inheritable     
Removes a listener from this multicaster and returns the resulting multicast listener.

Parameters:
oldl - the listener to be removed
 o componentResized
    method componentResized(e=ComponentEvent)  public     
Handles the componentResized event by invoking the componentResized methods on listener-a and listener-b.

Parameters:
e - the component event
 o componentMoved
    method componentMoved(e=ComponentEvent)  public     
Handles the componentMoved event by invoking the componentMoved methods on listener-a and listener-b.

Parameters:
e - the component event
 o componentShown
    method componentShown(e=ComponentEvent)  public     
Handles the componentShown event by invoking the componentShown methods on listener-a and listener-b.

Parameters:
e - the component event
 o componentHidden
    method componentHidden(e=ComponentEvent)  public     
Handles the componentHidden event by invoking the componentHidden methods on listener-a and listener-b.

Parameters:
e - the component event
 o componentAdded
    method componentAdded(e=ContainerEvent)  public     
Handles the componentAdded container event by invoking the componentAdded methods on listener-a and listener-b.

Parameters:
e - the component event
 o componentRemoved
    method componentRemoved(e=ContainerEvent)  public     
Handles the componentRemoved container event by invoking the componentRemoved methods on listener-a and listener-b.

Parameters:
e - the component event
 o focusGained
    method focusGained(e=FocusEvent)  public     
Handles the focusGained event by invoking the focusGained methods on listener-a and listener-b.

Parameters:
e - the focus event
 o focusLost
    method focusLost(e=FocusEvent)  public     
Handles the focusLost event by invoking the focusLost methods on listener-a and listener-b.

Parameters:
e - the focus event
 o keyTyped
    method keyTyped(e=KeyEvent)  public     
Handles the keyTyped event by invoking the keyTyped methods on listener-a and listener-b.

Parameters:
e - the key event
 o keyPressed
    method keyPressed(e=KeyEvent)  public     
Handles the keyPressed event by invoking the keyPressed methods on listener-a and listener-b.

Parameters:
e - the key event
 o keyReleased
    method keyReleased(e=KeyEvent)  public     
Handles the keyReleased event by invoking the keyReleased methods on listener-a and listener-b.

Parameters:
e - the key event
 o mouseClicked
    method mouseClicked(e=MouseEvent)  public     
Handles the mouseClicked event by invoking the mouseClicked methods on listener-a and listener-b.

Parameters:
e - the mouse event
 o mousePressed
    method mousePressed(e=MouseEvent)  public     
Handles the mousePressed event by invoking the mousePressed methods on listener-a and listener-b.

Parameters:
e - the mouse event
 o mouseReleased
    method mouseReleased(e=MouseEvent)  public     
Handles the mouseReleased event by invoking the mouseReleased methods on listener-a and listener-b.

Parameters:
e - the mouse event
 o mouseEntered
    method mouseEntered(e=MouseEvent)  public     
Handles the mouseEntered event by invoking the mouseEntered methods on listener-a and listener-b.

Parameters:
e - the mouse event
 o mouseExited
    method mouseExited(e=MouseEvent)  public     
Handles the mouseExited event by invoking the mouseExited methods on listener-a and listener-b.

Parameters:
e - the mouse event
 o mouseDragged
    method mouseDragged(e=MouseEvent)  public     
Handles the mouseDragged event by invoking the mouseDragged methods on listener-a and listener-b.

Parameters:
e - the mouse event
 o mouseMoved
    method mouseMoved(e=MouseEvent)  public     
Handles the mouseMoved event by invoking the mouseMoved methods on listener-a and listener-b.

Parameters:
e - the mouse event
 o windowOpened
    method windowOpened(e=WindowEvent)  public     
Handles the windowOpened event by invoking the windowOpened methods on listener-a and listener-b.

Parameters:
e - the window event
 o windowClosing
    method windowClosing(e=WindowEvent)  public     
Handles the windowClosing event by invoking the windowClosing methods on listener-a and listener-b.

Parameters:
e - the window event
 o windowClosed
    method windowClosed(e=WindowEvent)  public     
Handles the windowClosed event by invoking the windowClosed methods on listener-a and listener-b.

Parameters:
e - the window event
 o windowIconified
    method windowIconified(e=WindowEvent)  public     
Handles the windowIconified event by invoking the windowIconified methods on listener-a and listener-b.

Parameters:
e - the window event
 o windowDeiconified
    method windowDeiconified(e=WindowEvent)  public     
Handles the windowDeiconfied event by invoking the windowDeiconified methods on listener-a and listener-b.

Parameters:
e - the window event
 o windowActivated
    method windowActivated(e=WindowEvent)  public     
Handles the windowActivated event by invoking the windowActivated methods on listener-a and listener-b.

Parameters:
e - the window event
 o windowDeactivated
    method windowDeactivated(e=WindowEvent)  public     
Handles the windowDeactivated event by invoking the windowDeactivated methods on listener-a and listener-b.

Parameters:
e - the window event
 o actionPerformed
    method actionPerformed(e=ActionEvent)  public     
Handles the actionPerformed event by invoking the actionPerformed methods on listener-a and listener-b.

Parameters:
e - the action event
 o itemStateChanged
    method itemStateChanged(e=ItemEvent)  public     
Handles the itemStateChanged event by invoking the itemStateChanged methods on listener-a and listener-b.

Parameters:
e - the item event
 o adjustmentValueChanged
    method adjustmentValueChanged(e=AdjustmentEvent)  public     
Handles the adjustmentValueChanged event by invoking the adjustmentValueChanged methods on listener-a and listener-b.

Parameters:
e - the adjustment event
 o textValueChanged
    method textValueChanged(e=TextEvent)  public     
 o add
    method add(a=ComponentListener, -
               b=ComponentListener) returns ComponentListener public  static   
Adds component-listener-a with component-listener-b and returns the resulting multicast listener.

Parameters:
a - component-listener-a
b - component-listener-b
 o add
    method add(a=ContainerListener, -
               b=ContainerListener) returns ContainerListener public  static   
Adds container-listener-a with container-listener-b and returns the resulting multicast listener.

Parameters:
a - container-listener-a
b - container-listener-b
 o add
    method add(a=FocusListener, -
               b=FocusListener) returns FocusListener public  static   
Adds focus-listener-a with focus-listener-b and returns the resulting multicast listener.

Parameters:
a - focus-listener-a
b - focus-listener-b
 o add
    method add(a=KeyListener, -
               b=KeyListener) returns KeyListener public  static   
Adds key-listener-a with key-listener-b and returns the resulting multicast listener.

Parameters:
a - key-listener-a
b - key-listener-b
 o add
    method add(a=MouseListener, -
               b=MouseListener) returns MouseListener public  static   
Adds mouse-listener-a with mouse-listener-b and returns the resulting multicast listener.

Parameters:
a - mouse-listener-a
b - mouse-listener-b
 o add
    method add(a=MouseMotionListener, -
               b=MouseMotionListener) returns MouseMotionListener public  static   
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
 o add
    method add(a=WindowListener, -
               b=WindowListener) returns WindowListener public  static   
Adds window-listener-a with window-listener-b and returns the resulting multicast listener.

Parameters:
a - window-listener-a
b - window-listener-b
 o add
    method add(a=ActionListener, -
               b=ActionListener) returns ActionListener public  static   
Adds action-listener-a with action-listener-b and returns the resulting multicast listener.

Parameters:
a - action-listener-a
b - action-listener-b
 o add
    method add(a=ItemListener, -
               b=ItemListener) returns ItemListener public  static   
Adds item-listener-a with item-listener-b and returns the resulting multicast listener.

Parameters:
a - item-listener-a
b - item-listener-b
 o add
    method add(a=AdjustmentListener, -
               b=AdjustmentListener) returns AdjustmentListener public  static   
Adds adjustment-listener-a with adjustment-listener-b and returns the resulting multicast listener.

Parameters:
a - adjustment-listener-a
b - adjustment-listener-b
 o add
    method add(a=TextListener, -
               b=TextListener) returns TextListener public  static   
 o remove
    method remove(l=ComponentListener, -
                  oldl=ComponentListener) returns ComponentListener public  static   
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
 o remove
    method remove(l=ContainerListener, -
                  oldl=ContainerListener) returns ContainerListener public  static   
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
 o remove
    method remove(l=FocusListener, -
                  oldl=FocusListener) returns FocusListener public  static   
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
 o remove
    method remove(l=KeyListener, -
                  oldl=KeyListener) returns KeyListener public  static   
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
 o remove
    method remove(l=MouseListener, -
                  oldl=MouseListener) returns MouseListener public  static   
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
 o remove
    method remove(l=MouseMotionListener, -
                  oldl=MouseMotionListener) returns MouseMotionListener public  static   
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
 o remove
    method remove(l=WindowListener, -
                  oldl=WindowListener) returns WindowListener public  static   
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
 o remove
    method remove(l=ActionListener, -
                  oldl=ActionListener) returns ActionListener public  static   
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
 o remove
    method remove(l=ItemListener, -
                  oldl=ItemListener) returns ItemListener public  static   
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
 o remove
    method remove(l=AdjustmentListener, -
                  oldl=AdjustmentListener) returns AdjustmentListener public  static   
Removes the old adjustment-listener from adjustment-listener-l and returns the resulting multicast listener.

Parameters:
l - adjustment-listener-l
oldl - the adjustment-listener being removed
 o remove
    method remove(l=TextListener, -
                  oldl=TextListener) returns TextListener public  static   
 o addInternal
    method addInternal(a=EventListener, -
                       b=EventListener) returns EventListener Inheritable  static   
Returns the resulting multicast listener from adding listener-a and listener-b together. If listener-a is null, it returns listener-b; If listener-b is null, it returns listener-a If neither are null, then it creates and returns a new AWTEventMulticaster instance which chains a with b.

Parameters:
a - event listener-a
b - event listener-b
 o removeInternal
    method removeInternal(l=EventListener, -
                          oldl=EventListener) returns EventListener Inheritable  static   
Returns the resulting multicast listener after removing the old listener from listener-l. If listener-l equals the old listener OR listener-l is null, returns null. Else if listener-l is an instance of AWTEventMulticaster, then it removes the old listener from it. Else, returns listener l.

Parameters:
l - the listener being removed from
oldl - the listener being removed
 o saveInternal
    method saveInternal(s=ObjectOutputStream, -
                        k=String)  Inheritable     Signals IOException

All Packages  Class Hierarchy  This Package  Previous  Next  Index