SourceForge Jpcap

net.sourceforge.jpcap.client
Class CaptureViewMouseListener

java.lang.Object
  extended by net.sourceforge.jpcap.client.CaptureViewMouseListener
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener

public class CaptureViewMouseListener
extends Object
implements MouseListener, MouseMotionListener

Mouse event handler for the capture view frame.

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

Version:
$Revision: 1.1 $n
Author:
Patrick Charles and Jonas Lehmann
Last modified by:
$Author: esmondpitt $
Last modified at:
$Date: 2008/08/21 02:58:11 $

Constructor Summary
CaptureViewMouseListener(PacketVisualizationCanvas pvc)
           
 
Method Summary
 void mouseClicked(MouseEvent me)
           
 void mouseDragged(MouseEvent me)
          Hosts are animated while the mouse is dragged.
 void mouseEntered(MouseEvent me)
           
 void mouseExited(MouseEvent me)
           
 void mouseMoved(MouseEvent me)
           
 void mousePressed(MouseEvent me)
          A mouse press event selects a host.
 void mouseReleased(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(MouseEvent me)
Specified by:
mouseClicked in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent me)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent me)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(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 MouseListener

mouseReleased

public void mouseReleased(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 MouseListener

mouseDragged

public void mouseDragged(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 MouseMotionListener

mouseMoved

public void mouseMoved(MouseEvent me)
Specified by:
mouseMoved in interface MouseMotionListener

Copyright © Patrick Charles & Jonas Lehmann, 2001; Esmond Pitt, 2008.