public class EditingGraphMousePlugin<V,E> extends AbstractGraphMousePlugin implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
| Modifier and Type | Field and Description |
|---|---|
protected VisualizationServer.Paintable |
arrowPaintable |
protected java.awt.Shape |
arrowShape |
protected java.awt.geom.Point2D |
down |
protected org.apache.commons.collections4.Factory<E> |
edgeFactory |
protected edu.uci.ics.jung.graph.util.EdgeType |
edgeIsDirected |
protected VisualizationServer.Paintable |
edgePaintable |
protected java.awt.Shape |
edgeShape |
protected java.awt.Shape |
rawArrowShape |
protected java.awt.geom.CubicCurve2D |
rawEdge |
protected V |
startVertex |
protected org.apache.commons.collections4.Factory<V> |
vertexFactory |
cursor, modifiers| Constructor and Description |
|---|
EditingGraphMousePlugin(org.apache.commons.collections4.Factory<V> vertexFactory,
org.apache.commons.collections4.Factory<E> edgeFactory) |
EditingGraphMousePlugin(int modifiers,
org.apache.commons.collections4.Factory<V> vertexFactory,
org.apache.commons.collections4.Factory<E> edgeFactory)
create instance and prepare shapes for visual effects
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkModifiers(java.awt.event.MouseEvent e)
Overridden to be more flexible, and pass events with
key combinations.
|
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e)
If startVertex is non-null, stretch an edge shape between
startVertex and the mouse pointer to simulate edge creation
|
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e)
If the mouse is pressed in an empty area, create a new vertex there.
|
void |
mouseReleased(java.awt.event.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.
|
getCursor, getModifiers, setCursor, setModifiersprotected V startVertex
protected java.awt.geom.Point2D down
protected java.awt.geom.CubicCurve2D rawEdge
protected java.awt.Shape edgeShape
protected java.awt.Shape rawArrowShape
protected java.awt.Shape arrowShape
protected VisualizationServer.Paintable edgePaintable
protected VisualizationServer.Paintable arrowPaintable
protected edu.uci.ics.jung.graph.util.EdgeType edgeIsDirected
protected org.apache.commons.collections4.Factory<V> vertexFactory
protected org.apache.commons.collections4.Factory<E> edgeFactory
public EditingGraphMousePlugin(org.apache.commons.collections4.Factory<V> vertexFactory, org.apache.commons.collections4.Factory<E> edgeFactory)
public boolean checkModifiers(java.awt.event.MouseEvent e)
checkModifiers in interface GraphMousePlugincheckModifiers in class AbstractGraphMousePlugine - an event to compare topublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListener