Package diva.canvas.event
Class LayerEventMulticaster
- java.lang.Object
-
- java.awt.AWTEventMulticaster
-
- diva.canvas.event.LayerEventMulticaster
-
- All Implemented Interfaces:
LayerListener,LayerMotionListener,java.awt.event.ActionListener,java.awt.event.AdjustmentListener,java.awt.event.ComponentListener,java.awt.event.ContainerListener,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,java.awt.event.TextListener,java.awt.event.WindowFocusListener,java.awt.event.WindowListener,java.awt.event.WindowStateListener,java.util.EventListener
public class LayerEventMulticaster extends java.awt.AWTEventMulticaster implements LayerListener, LayerMotionListener
A subclass of the AWT event multi-caster, which adds support for layer events.- Version:
- $Id$
- Author:
- John Reekie
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLayerEventMulticaster(java.util.EventListener a, java.util.EventListener b)Create an event multicaster from two listeners.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LayerListeneradd(LayerListener a, LayerListener b)Adds layer-listener-a with layer-listener-b and returns the resulting multicast listener.static LayerMotionListeneradd(LayerMotionListener a, LayerMotionListener b)Adds layer-motion-listener-a with layer-motion-listener-b and returns the resulting multicast listener.protected static java.util.EventListeneraddInternal(java.util.EventListener a, java.util.EventListener b)Returns the resulting multicast listener from adding listener-a and listener-b together.voidmouseClicked(LayerEvent e)Invoked when the mouse is clicked on a layer or figure.voidmouseDragged(LayerEvent e)Invoked when the mouse moves while the button is still held down.voidmouseEntered(LayerEvent e)Invoked when the mouse enters a layer or figure.voidmouseExited(LayerEvent e)Invoked when the mouse exits a layer or figure.voidmouseMoved(LayerEvent e)Invoked when the mouse moves while over a layer or figure.voidmousePressed(LayerEvent e)Invoked when the mouse is pressed on a layer or figure.voidmouseReleased(LayerEvent e)Invoked when the mouse is released on a layer or figure.static LayerListenerremove(LayerListener l, LayerListener oldl)Removes the old layer-listener from layer-listener-l and returns the resulting multicast listener.static LayerMotionListenerremove(LayerMotionListener l, LayerMotionListener oldl)Removes the old layer-motion-listener from layer-motion-listener-l and returns the resulting multicast listener.-
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, removeInternal, save, saveInternal, textValueChanged, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
-
-
-
-
Method Detail
-
mouseDragged
public void mouseDragged(LayerEvent e)
Invoked when the mouse moves while the button is still held down.- Specified by:
mouseDraggedin interfaceLayerListener- Parameters:
e- The event
-
mouseEntered
public void mouseEntered(LayerEvent e)
Invoked when the mouse enters a layer or figure.- Specified by:
mouseEnteredin interfaceLayerMotionListener- Parameters:
e- The event
-
mouseExited
public void mouseExited(LayerEvent e)
Invoked when the mouse exits a layer or figure.- Specified by:
mouseExitedin interfaceLayerMotionListener- Parameters:
e- The event
-
mouseMoved
public void mouseMoved(LayerEvent e)
Invoked when the mouse moves while over a layer or figure.- Specified by:
mouseMovedin interfaceLayerMotionListener- Parameters:
e- The event
-
mousePressed
public void mousePressed(LayerEvent e)
Invoked when the mouse is pressed on a layer or figure.- Specified by:
mousePressedin interfaceLayerListener- Parameters:
e- The event
-
mouseReleased
public void mouseReleased(LayerEvent e)
Invoked when the mouse is released on a layer or figure.- Specified by:
mouseReleasedin interfaceLayerListener- Parameters:
e- The event
-
mouseClicked
public void mouseClicked(LayerEvent e)
Invoked when the mouse is clicked on a layer or figure.- Specified by:
mouseClickedin interfaceLayerListener- Parameters:
e- The event
-
add
public static LayerListener add(LayerListener a, LayerListener b)
Adds layer-listener-a with layer-listener-b 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 AWTEventMulticaster instance which chains a with b.- Parameters:
a- event listener-ab- event listener-b
-
add
public static LayerMotionListener add(LayerMotionListener a, LayerMotionListener b)
Adds layer-motion-listener-a with layer-motion-listener-b and returns the resulting multicast listener.
-
remove
public static LayerListener remove(LayerListener l, LayerListener oldl)
Removes the old layer-listener from layer-listener-l and returns the resulting multicast listener.
-
remove
public static LayerMotionListener remove(LayerMotionListener l, LayerMotionListener oldl)
Removes the old layer-motion-listener from layer-motion-listener-l and returns the resulting multicast listener.
-
-