Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jpicedt.graphic.event
Class PEEventMulticaster  view PEEventMulticaster download PEEventMulticaster.java

java.lang.Object
  extended byjava.awt.AWTEventMulticaster
      extended byjpicedt.graphic.event.PEEventMulticaster
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.AdjustmentListener, java.awt.event.ComponentListener, java.awt.event.ContainerListener, java.util.EventListener, java.awt.event.FocusListener, java.awt.event.HierarchyBoundsListener, java.awt.event.HierarchyListener, java.awt.event.InputMethodListener, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, PEMouseInputListener, java.awt.event.TextListener, java.awt.event.WindowFocusListener, java.awt.event.WindowListener, java.awt.event.WindowStateListener

public class PEEventMulticaster
extends java.awt.AWTEventMulticaster
implements PEMouseInputListener

An enhanced version of AWTEventMulticaster that supports chaining of PEMouseInputListener's

Since:
jPicEdt 1.3.2

Field Summary
 
Fields inherited from class java.awt.AWTEventMulticaster
a, b
 
Constructor Summary
protected PEEventMulticaster(java.util.EventListener a, java.util.EventListener b)
          Creates a PEEventMulticaster instance which chains listener-a with listener-b
 
Method Summary
static PEMouseInputListener add(PEMouseInputListener a, PEMouseInputListener b)
          Adds PEMouseInputListener-a with PEMouseInputListener-b and returns the resulting multicast listener.
protected static java.util.EventListener addInternal(java.util.EventListener a, java.util.EventListener b)
          Returns the resulting multicast listener from adding listener-a and listener-b together.
 void mouseClicked(PEMouseEvent e)
          Handles the mouseClicked event by invoking the mouseClicked methods on listener-a and listener-b.
 void mouseDragged(PEMouseEvent e)
          Handles the mouseDragged event by invoking the mouseDragged methods on listener-a and listener-b.
 void mouseEntered(PEMouseEvent e)
          Handles the mouseEntered event by invoking the mouseEntered methods on listener-a and listener-b.
 void mouseExited(PEMouseEvent e)
          Handles the mouseExited event by invoking the mouseExited methods on listener-a and listener-b.
 void mouseMoved(PEMouseEvent e)
          Handles the mouseMoved event by invoking the mouseMoved methods on listener-a and listener-b.
 void mousePressed(PEMouseEvent e)
          Handles the mousePressed event by invoking the mousePressed methods on listener-a and listener-b.
 void mouseReleased(PEMouseEvent e)
          Handles the mouseReleased event by invoking the mouseReleased methods on listener-a and listener-b.
static PEMouseInputListener remove(PEMouseInputListener l, PEMouseInputListener oldl)
          Removes the old PEMouseInputListener from PEMouseInputListener-l and returns the resulting multicast listener.
protected static java.util.EventListener removeInternal(java.util.EventListener l, java.util.EventListener oldl)
          Returns the resulting multicast listener after removing the old listener from listener-l.
 
Methods inherited from class java.awt.AWTEventMulticaster
actionPerformed, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, adjustmentValueChanged, ancestorMoved, ancestorResized, caretPositionChanged, componentAdded, componentHidden, componentMoved, componentRemoved, componentResized, componentShown, focusGained, focusLost, getListeners, hierarchyChanged, inputMethodTextChanged, itemStateChanged, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, save, saveInternal, textValueChanged, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PEEventMulticaster

protected PEEventMulticaster(java.util.EventListener a,
                             java.util.EventListener b)
Creates a PEEventMulticaster instance which chains listener-a with listener-b

Method Detail

add

public static PEMouseInputListener add(PEMouseInputListener a,
                                       PEMouseInputListener b)
Adds PEMouseInputListener-a with PEMouseInputListener-b and returns the resulting multicast listener.


remove

public static PEMouseInputListener remove(PEMouseInputListener l,
                                          PEMouseInputListener oldl)
Removes the old PEMouseInputListener from PEMouseInputListener-l and returns the resulting multicast listener.


addInternal

protected static java.util.EventListener addInternal(java.util.EventListener a,
                                                     java.util.EventListener b)
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 PEEventMulticaster instance which chains a with b.


removeInternal

protected static java.util.EventListener removeInternal(java.util.EventListener l,
                                                        java.util.EventListener oldl)
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.


mouseClicked

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

Specified by:
mouseClicked in interface PEMouseInputListener

mousePressed

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

Specified by:
mousePressed in interface PEMouseInputListener

mouseReleased

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

Specified by:
mouseReleased in interface PEMouseInputListener

mouseEntered

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

Specified by:
mouseEntered in interface PEMouseInputListener

mouseExited

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

Specified by:
mouseExited in interface PEMouseInputListener

mouseDragged

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

Specified by:
mouseDragged in interface PEMouseInputListener

mouseMoved

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

Specified by:
mouseMoved in interface PEMouseInputListener