|
||||||||||
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.EditingGraphMousePlugin<V,E>
public class EditingGraphMousePlugin<V,E>
A plugin that can create vertices, undirected edges, and directed edges using mouse gestures.
Field Summary | |
---|---|
protected VisualizationServer.Paintable |
arrowPaintable
|
protected Shape |
arrowShape
|
protected Point2D |
down
|
protected org.apache.commons.collections15.Factory<E> |
edgeFactory
|
protected EdgeType |
edgeIsDirected
|
protected VisualizationServer.Paintable |
edgePaintable
|
protected Shape |
edgeShape
|
protected Shape |
rawArrowShape
|
protected CubicCurve2D |
rawEdge
|
protected V |
startVertex
|
protected org.apache.commons.collections15.Factory<V> |
vertexFactory
|
Fields inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin |
---|
cursor, modifiers |
Constructor Summary | |
---|---|
EditingGraphMousePlugin(org.apache.commons.collections15.Factory<V> vertexFactory,
org.apache.commons.collections15.Factory<E> edgeFactory)
|
|
EditingGraphMousePlugin(int modifiers,
org.apache.commons.collections15.Factory<V> vertexFactory,
org.apache.commons.collections15.Factory<E> edgeFactory)
create instance and prepare shapes for visual effects |
Method Summary | |
---|---|
boolean |
checkModifiers(MouseEvent e)
Overridden 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. |
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 |
Field Detail |
---|
protected V startVertex
protected Point2D down
protected CubicCurve2D rawEdge
protected Shape edgeShape
protected Shape rawArrowShape
protected Shape arrowShape
protected VisualizationServer.Paintable edgePaintable
protected VisualizationServer.Paintable arrowPaintable
protected EdgeType edgeIsDirected
protected org.apache.commons.collections15.Factory<V> vertexFactory
protected org.apache.commons.collections15.Factory<E> edgeFactory
Constructor Detail |
---|
public EditingGraphMousePlugin(org.apache.commons.collections15.Factory<V> vertexFactory, org.apache.commons.collections15.Factory<E> edgeFactory)
public EditingGraphMousePlugin(int modifiers, org.apache.commons.collections15.Factory<V> vertexFactory, org.apache.commons.collections15.Factory<E> edgeFactory)
modifiers
- Method Detail |
---|
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 |