net.sourceforge.jpcap.client
Class CaptureViewMouseListener

java.lang.Object
  extended bynet.sourceforge.jpcap.client.CaptureViewMouseListener
All Implemented Interfaces:
java.util.EventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

public class CaptureViewMouseListener
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener

Mouse event handler for the capture view frame.

Allows the user to reorganize the visualization canvas by clicking and dragging rendered hosts.


Constructor Summary
CaptureViewMouseListener(PacketVisualizationCanvas pvc)
           
 
Method Summary
 void mouseClicked(java.awt.event.MouseEvent me)
           
 void mouseDragged(java.awt.event.MouseEvent me)
          Hosts are animated while the mouse is dragged.
 void mouseEntered(java.awt.event.MouseEvent me)
           
 void mouseExited(java.awt.event.MouseEvent me)
           
 void mouseMoved(java.awt.event.MouseEvent me)
           
 void mousePressed(java.awt.event.MouseEvent me)
          A mouse press event selects a host.
 void mouseReleased(java.awt.event.MouseEvent me)
          A mouse release event places a host at a new location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaptureViewMouseListener

public CaptureViewMouseListener(PacketVisualizationCanvas pvc)
Method Detail

mouseClicked

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

mouseEntered

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

mouseExited

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

mousePressed

public void mousePressed(java.awt.event.MouseEvent me)
A mouse press event selects a host.

When the user clicks, detect if the location is on a plotted host. If it is, select the host for movement to a new location.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me)
A mouse release event places a host at a new location.

When the mouse is released, if a host is currently selected, drop it at the new location.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent me)
Hosts are animated while the mouse is dragged.

When the mouse is dragged, if a host is currently selected, animate the drag.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

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