net.clackrouter.jgraph.pad
Class GPGraphUI.MouseInputHandler

java.lang.Object
  extended by net.clackrouter.jgraph.pad.GPGraphUI.MouseInputHandler
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, javax.swing.event.MouseInputListener
Enclosing class:
GPGraphUI

public class GPGraphUI.MouseInputHandler
extends java.lang.Object
implements javax.swing.event.MouseInputListener

MouseInputHandler handles passing all mouse events, including mouse motion events, until the mouse is released to the destination it is constructed with. It is assumed all the events are currently target at source.


Field Summary
protected  java.awt.Component destination
          Destination that receives all events.
protected  java.awt.Component source
          Source that events are coming from.
 
Constructor Summary
GPGraphUI.MouseInputHandler(java.awt.Component source, java.awt.Component destination, java.awt.event.MouseEvent event)
           
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
protected  void removeFromSource()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

protected java.awt.Component source
Source that events are coming from.


destination

protected java.awt.Component destination
Destination that receives all events.

Constructor Detail

GPGraphUI.MouseInputHandler

public GPGraphUI.MouseInputHandler(java.awt.Component source,
                                   java.awt.Component destination,
                                   java.awt.event.MouseEvent event)
Method Detail

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

removeFromSource

protected void removeFromSource()