|
|||||||||
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
com.alveole.studio.web.designer.LinkEditor
public class LinkEditor
A plugin that can create vertices, undirected edges, and directed edges using mouse gestures. This class was imported from JUNG project and modified to integrate callbacks to GuiActionsManager, when a link is created.
Field Summary | |
---|---|
protected edu.uci.ics.jung.visualization.VisualizationViewer.Paintable |
arrowPaintable
|
protected java.awt.Shape |
arrowShape
|
protected java.awt.geom.Point2D |
down
|
protected boolean |
edgeIsDirected
|
protected edu.uci.ics.jung.visualization.VisualizationViewer.Paintable |
edgePaintable
|
protected java.awt.Shape |
edgeShape
|
protected GuiActionsManager |
manager
|
protected java.awt.Shape |
rawArrowShape
|
protected java.awt.geom.CubicCurve2D |
rawEdge
|
protected edu.uci.ics.jung.graph.Vertex |
startVertex
|
Fields inherited from class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin |
---|
cursor, modifiers |
Constructor Summary | |
---|---|
LinkEditor(GuiActionsManager manager)
|
|
LinkEditor(GuiActionsManager manager,
int modifiers)
create instance and prepare shapes for visual effects |
Method Summary | |
---|---|
boolean |
checkModifiers(java.awt.event.MouseEvent e)
overrided to be more flexible, and pass events with key combinations. |
boolean |
isEdgeIsDirected()
|
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. |
void |
setEdgeIsDirected(boolean edgeIsDirected)
|
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 edu.uci.ics.jung.graph.Vertex 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 edu.uci.ics.jung.visualization.VisualizationViewer.Paintable edgePaintable
protected edu.uci.ics.jung.visualization.VisualizationViewer.Paintable arrowPaintable
protected boolean edgeIsDirected
protected GuiActionsManager manager
Constructor Detail |
---|
public LinkEditor(GuiActionsManager manager)
public LinkEditor(GuiActionsManager manager, int modifiers)
modifiers
- Method Detail |
---|
public boolean checkModifiers(java.awt.event.MouseEvent e)
checkModifiers
in interface edu.uci.ics.jung.visualization.control.GraphMousePlugin
checkModifiers
in class edu.uci.ics.jung.visualization.control.AbstractGraphMousePlugin
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public boolean isEdgeIsDirected()
public void setEdgeIsDirected(boolean edgeIsDirected)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |