edu.uci.ics.jung.visualization.control
Class ViewTranslatingGraphMousePlugin
java.lang.Object
edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
edu.uci.ics.jung.visualization.control.ViewTranslatingGraphMousePlugin
- All Implemented Interfaces:
- GraphMousePlugin, MouseListener, MouseMotionListener, EventListener
public class ViewTranslatingGraphMousePlugin
- extends AbstractGraphMousePlugin
- implements MouseListener, MouseMotionListener
ViewTranslatingGraphMousePlugin uses a MouseButtonOne press and
drag gesture to translate the graph display in the x and y
direction by changing the AffineTransform applied to the Graphics2D.
The default MouseButtonOne modifier can be overridden
to cause a different mouse gesture to translate the display.
- Author:
- Tom Nelson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ViewTranslatingGraphMousePlugin
public ViewTranslatingGraphMousePlugin()
ViewTranslatingGraphMousePlugin
public ViewTranslatingGraphMousePlugin(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
- 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
mouseDragged
public void mouseDragged(MouseEvent e)
- chack the modifiers. If accepted, translate the graph according
to the dragging of the mouse pointer
- Specified by:
mouseDragged in interface MouseMotionListener
- Parameters:
e - the event
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClicked in interface MouseListener
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEntered in interface MouseListener
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExited in interface MouseListener
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMoved in interface MouseMotionListener
Copyright © 2010 null. All Rights Reserved.