AWTEventMulticaster in Java

Spread the love
  • 24
  • 34
  • 14
  • 23
  • 10

AWTEventMulticaster in Java
AWTEventMulticaster in Java

AWTEventMulticaster in Java:

AWTEventMulticaster is helpful for writing custom AWT components. As the name suggests when we invoke one of the EventListener methods on AWTEventMulticaster, it invokes the same method on the EventListener objects. AWTEventMulticaster implements the linked list of EventListener objects.AWTEventMulticaster helps to notify the listeners on that list upon occurring an event, hence it can serve any desired ty of EventListener.We can use add() and remove() methods to add or remove EventListener objects from the Linked list.

The Structure of the AWTEventMulticaster :

public class java.awt.AWTEventMulticaster extends
             java.lang.Object implements 
TextListener {
protected AWTEventMulticaster(EventListener a, EventListener b);
// Member variables
protected EventListener a;
protected EventListener b;
// Methods
public static ComponentListener add(ComponentListener a,ComponentListener b);
public static ContainerListener add(ContainerListener a,ContainerListener b);
public static FocusListener add(FocusListener a, FocusListener b);
public static KeyListener add(KeyListener a, KeyListener b);
public static MouseListener add(MouseListener a, MouseListener b);
public static MouseMotionListener add(MouseMotionListener a,MouseMotionListener b);
public static WindowListener add(WindowListener a, WindowListener b);
public static ActionListener add(ActionListener a, ActionListener b);
public static ItemListener add(ItemListener a, ItemListener b);
public static AdjustmentListener add(AdjustmentListener a,AdjustmentListener b);
public static TextListener add(TextListener a, TextListener b);
protected static EventListener addInternal(EventListener a, EventListener b);
public static ComponentListener remove(ComponentListener l,ComponentListener oldl);
public static ContainerListener remove(ContainerListener l,ContainerListener oldl);
public static FocusListener remove(FocusListener l, FocusListener oldl);
public static KeyListener remove(KeyListener l, KeyListener oldl);
public static MouseListener remove(MouseListener l, MouseListener oldl);
public static MouseMotionListener remove(MouseMotionListener l,MouseMotionListener oldl);
public static WindowListener remove(WindowListener l, WindowListener oldl);
public static ActionListener remove(ActionListener l, ActionListener oldl);
public static ItemListener remove(ItemListener l, ItemListener oldl);
public static AdjustmentListener remove(AdjustmentListener l,AdjustmentListener oldl);
public static TextListener remove(TextListener l, TextListener oldl);
protected static EventListener removeInternal(EventListener l,EventListener oldl);
protected static void save(ObjectOutputStream outputstream, String k, EventListener l) throws IOException;
public void actionPerformed(ActionEvent e); 
public void adjustmentValueChanged(AdjustmentEvent e);
public void componentAdded(ContainerEvent e); 
public void componentHidden(ComponentEvent e); 
public void componentMoved(ComponentEvent e); 
public void componentRemoved(ContainerEvent e); 
public void componentResized(ComponentEvent e); 
public void componentShown(ComponentEvent e); 
public void focusGained(FocusEvent e); 
public void focusLost(FocusEvent e); 
public void itemStateChanged(ItemEvent e); 
public void keyPressed(KeyEvent e); 
public void keyReleased(KeyEvent e); 
public void keyTyped(KeyEvent e);
public void mouseClicked(MouseEvent e); 
public void mouseDragged(MouseEvent e); 
public void mouseEntered(MouseEvent e); 
public void mouseExited(MouseEvent e); 
public void mouseMoved(MouseEvent e); 
public void mousePressed(MouseEvent e); 
public void mouseReleased(MouseEvent e); 
public void textValueChanged(TextEvent e); 
public void windowActivated(WindowEvent e); 
public void windowClosed(WindowEvent e); 
public void windowClosing(WindowEvent e); 
public void windowDeactivated(WindowEvent e);
public void windowDeiconified(WindowEvent e); 
public void windowIconified(WindowEvent e); 
public void windowOpened(WindowEvent e);
protected EventListener remove(EventListener oldl);
protected void saveInternal(ObjectOutputStream outputstream, String k) throws IOException;
Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 24
  • 34
  • 14
  • 23
  • 10


Please enter your comment!
Please enter your name here