edu.uci.ics.jung.visualization.control
Class LensTranslatingGraphMousePlugin
java.lang.Object
edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
edu.uci.ics.jung.visualization.control.TranslatingGraphMousePlugin
edu.uci.ics.jung.visualization.control.LensTranslatingGraphMousePlugin
- All Implemented Interfaces:
- GraphMousePlugin, MouseListener, MouseMotionListener, EventListener
public class LensTranslatingGraphMousePlugin
- extends TranslatingGraphMousePlugin
- implements MouseListener, MouseMotionListener
Extends TranslatingGraphMousePlugin and adds the capability
to drag and resize the viewing
lens in the graph view. Mouse1 in the center moves the lens,
mouse1 on the edge resizes the lens. The default mouse button and
modifiers can be overridden in the constructor.
- Author:
- Tom Nelson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dragOnLens
protected boolean dragOnLens
dragOnEdge
protected boolean dragOnEdge
edgeOffset
protected double edgeOffset
LensTranslatingGraphMousePlugin
public LensTranslatingGraphMousePlugin()
- create an instance with default modifiers
LensTranslatingGraphMousePlugin
public LensTranslatingGraphMousePlugin(int modifiers)
- create an instance with passed modifer value
- Parameters:
modifiers
- the mouse event modifier to activate this function
mousePressed
public void mousePressed(MouseEvent e)
- Check the event modifiers. Set the 'down' point for later
use. If this event satisfies the modifiers, change the cursor
to the system 'move cursor'
- Specified by:
mousePressed
in interface MouseListener
- Overrides:
mousePressed
in class TranslatingGraphMousePlugin
- Parameters:
e
- the event
mouseReleased
public void mouseReleased(MouseEvent e)
- unset the 'down' point and change the cursoe back to the system
default cursor
- Specified by:
mouseReleased
in interface MouseListener
- Overrides:
mouseReleased
in class TranslatingGraphMousePlugin
mouseDragged
public void mouseDragged(MouseEvent e)
- check the modifiers. If accepted, move or resize the lens according
to the dragging of the mouse pointer
- Specified by:
mouseDragged
in interface MouseMotionListener
- Overrides:
mouseDragged
in class TranslatingGraphMousePlugin
- Parameters:
e
- the event
Copyright © 2009. All Rights Reserved.