|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
edu.uci.ics.jung.visualization.control.EditingGraphMousePlugin
public class EditingGraphMousePlugin
A plugin that can create vertices, undirected edges, and directed edges using mouse gestures.
Field Summary |
---|
Fields inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin |
---|
cursor, modifiers |
Constructor Summary | |
---|---|
EditingGraphMousePlugin()
|
|
EditingGraphMousePlugin(int modifiers)
create instance and prepare shapes for visual effects |
Method Summary | |
---|---|
boolean |
checkModifiers(MouseEvent e)
overrided to be more flexible, and pass events with key combinations. |
void |
mouseClicked(MouseEvent e)
|
void |
mouseDragged(MouseEvent e)
If startVertex is non-null, stretch an edge shape between startVertex and the mouse pointer to simulate edge creation |
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mouseMoved(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
If the mouse is pressed in an empty area, create a new vertex there. |
void |
mouseReleased(MouseEvent e)
If startVertex is non-null, and the mouse is released over an existing vertex, create an undirected edge from startVertex to the vertex under the mouse pointer. |
void |
setVertexLocations(SettableVertexLocationFunction vertexLocations)
sets the vertex locations. |
Methods inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin |
---|
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 EditingGraphMousePlugin()
public EditingGraphMousePlugin(int modifiers)
modifiers
- Method Detail |
---|
public void setVertexLocations(SettableVertexLocationFunction vertexLocations)
vertexLocations
- public boolean checkModifiers(MouseEvent e)
checkModifiers
in interface GraphMousePlugin
checkModifiers
in class AbstractGraphMousePlugin
e
- an event to compare to
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
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 |