|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin edu.uci.ics.jung.visualization.control.RotatingGraphMousePlugin
public class RotatingGraphMousePlugin
RotatingGraphMouse provides the abiity to rotate the graph using the mouse. By default, it is activated by mouse button one drag with the shift key pressed. The modifiers can be overridden so that a different mouse/key combination activates the rotation
Field Summary |
---|
Fields inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin |
---|
cursor, down, modifiers |
Constructor Summary | |
---|---|
RotatingGraphMousePlugin()
create an instance with default modifier values |
|
RotatingGraphMousePlugin(int modifiers)
create an instance with passed zoom in/out values |
Method Summary | |
---|---|
protected double |
angleBetween(Point2D v1,
Point2D v2)
Returns the angle between two vectors from the origin to points v1 and v2. |
void |
mouseClicked(MouseEvent e)
|
void |
mouseDragged(MouseEvent e)
check the modifiers. |
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mouseMoved(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
save the 'down' point and check the modifiers. |
void |
mouseReleased(MouseEvent e)
unset the down point and change the cursor back to the default |
Methods inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin |
---|
checkModifiers, getCursor, getModifiers, setCursor, setModifiers |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RotatingGraphMousePlugin()
public RotatingGraphMousePlugin(int modifiers)
modifiers
- the event modifiers to trigger rotationMethod Detail |
---|
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
e
- the eventpublic void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
protected double angleBetween(Point2D v1, Point2D v2)
v1
- v2
-
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |