|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jgraph.graph.BasicMarqueeHandler
com.jgraph.editor.JGraphEditorTool
com.jgraph.pad.tool.JGraphpadVertexTool
com.jgraph.pad.tool.JGraphpadEdgeTool
Tool that inserts edges based on a prototype.
| Field Summary | |
protected org.jgraph.graph.PortView |
current
Initial and current port view. |
static String |
NAME_EDGETOOL
Defines the default name for tools of this kind. |
protected org.jgraph.graph.PortView |
start
Initial and current port view. |
| Fields inherited from class com.jgraph.pad.tool.JGraphpadVertexTool |
NAME_VERTEXTOOL, previewEnabled, previewView, prototype, singleClickSize, threshold |
| Fields inherited from class com.jgraph.editor.JGraphEditorTool |
isAlwaysActive, name |
| Fields inherited from class org.jgraph.graph.BasicMarqueeHandler |
currentPoint, marqueeBounds, previousCursor, startPoint |
| Constructor Summary | |
JGraphpadEdgeTool(Object prototype)
Constructs a new edge tool for the specified prototype using NAME_EDGETOOL. |
|
JGraphpadEdgeTool(String name,
Object prototype)
Constructs a new edge tool for the specified name and prototype. |
|
| Method Summary | |
protected void |
execute(org.jgraph.JGraph graph,
Object edge)
Overrides the parent's implementation to insert the specified edge into cache. |
boolean |
isForceMarqueeEvent(MouseEvent event)
Returns true if the in any case except the selection cell under the mouse pointer is an edge. |
void |
mouseDragged(MouseEvent event)
Overrides the parent's implementation to avoid flickering by checking if the state of the preview will change. |
void |
mouseMoved(MouseEvent event)
Overrides the parent's implementation to highlight ports which are under the mousepointer. |
void |
mousePressed(MouseEvent event)
Extends the parent's implementation to find the port view at the mouse location and set the startPoint accordingly. |
void |
mouseReleased(MouseEvent event)
Extends the parent's implementation to reset start and
current. |
void |
overlay(org.jgraph.JGraph graph,
Graphics g,
boolean clear)
Extends the parent's implementation to draw the highlighted port using paintPort(JGraph, Graphics). |
protected void |
paintPort(org.jgraph.JGraph graph,
Graphics g)
Paints the current port in highlighted state. |
protected void |
processMouseDraggedEvent(MouseEvent event)
Overrides the parent's implementation to update the preview to connect to the port under the mouse or use the location of the mouse as a point. |
| Methods inherited from class com.jgraph.pad.tool.JGraphpadVertexTool |
createCell, getPrototype, getSingleClickSize, getThreshold, isConstrainedSizeEvent, isPreviewEnabled, setPreviewEnabled, setPrototype, setSingleClickSize, setThreshold |
| Methods inherited from class com.jgraph.editor.JGraphEditorTool |
getName, isAlwaysActive, setAlwaysActive, setName |
| Methods inherited from class org.jgraph.graph.BasicMarqueeHandler |
getCurrentPoint, getGraphForEvent, getMarqueeBounds, getPreviousCursor, getStartPoint, handleMarqueeEvent, isMarqueeTriggerEvent, paint, setCurrentPoint, setMarqueeBounds, setPreviousCursor, setStartPoint |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String NAME_EDGETOOL
protected org.jgraph.graph.PortView start
protected org.jgraph.graph.PortView current
| Constructor Detail |
public JGraphpadEdgeTool(Object prototype)
NAME_EDGETOOL.
prototype - The prototype cell to create new edges with.
public JGraphpadEdgeTool(String name,
Object prototype)
name - The name of the tool to be created.prototype - The prototype cell to create new edges with.| Method Detail |
public boolean isForceMarqueeEvent(MouseEvent event)
public void mousePressed(MouseEvent event)
mousePressed in class JGraphpadVertexToolevent - The object that describes the event.public void mouseMoved(MouseEvent event)
event - The object that describes the event.public void mouseDragged(MouseEvent event)
event - The object that describes the event.protected void processMouseDraggedEvent(MouseEvent event)
processMouseDraggedEvent in class JGraphpadVertexToolevent - The object that describes the event.public void mouseReleased(MouseEvent event)
start and
current.
mouseReleased in class JGraphpadVertexToolevent - The object that describes the event.
protected void execute(org.jgraph.JGraph graph,
Object edge)
cache.
execute in class JGraphpadVertexTooledge - The edge to be inserted into cache.
public void overlay(org.jgraph.JGraph graph,
Graphics g,
boolean clear)
paintPort(JGraph, Graphics).
overlay in class JGraphpadVertexToolgraph - The graph to paint in.g - The graphics to use for paiting.clear - Wether to clear the display.
protected void paintPort(org.jgraph.JGraph graph,
Graphics g)
current port in highlighted state.
graph - The graph to paint the port in.g - The graphics to use for paiting.
|
JGraphpad Pro
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||