| |
|
| com.jgraph.pad.tool.JGraphpadVertexTool com.jgraph.pad.tool.JGraphpadEdgeTool
JGraphpadEdgeTool | public class JGraphpadEdgeTool extends JGraphpadVertexTool (Code) | | Tool that inserts edges based on a prototype.
|
Field Summary | |
final public static String | NAME_EDGETOOL Defines the default name for tools of this kind. | protected PortView | startcurrent Initial and current port view. |
NAME_EDGETOOL | final public static String NAME_EDGETOOL(Code) | | Defines the default name for tools of this kind.
|
startcurrent | protected PortView startcurrent(Code) | | Initial and current port view.
|
JGraphpadEdgeTool | public JGraphpadEdgeTool(Object prototype)(Code) | | Constructs a new edge tool for the specified prototype using
JGraphpadEdgeTool.NAME_EDGETOOL .
Parameters: prototype - The prototype cell to create new edges with. |
JGraphpadEdgeTool | public JGraphpadEdgeTool(String name, Object prototype)(Code) | | Constructs a new edge tool for the specified name and prototype.
Edgetools must be always active to be able to click on source/target
vertices without triggering a cell move.
Parameters: name - The name of the tool to be created. Parameters: prototype - The prototype cell to create new edges with. |
execute | protected void execute(JGraph graph, Object edge)(Code) | | Overrides the parent's implementation to insert the specified edge into
cache .
Parameters: cache - The cache into which to insert the edge. Parameters: edge - The edge to be inserted into cache . |
isForceMarqueeEvent | public boolean isForceMarqueeEvent(MouseEvent event)(Code) | | Returns true if the in any case except the selection cell under the mouse
pointer is an edge. This is used to fetch control when a source/target
selection is made for connecting via a new edge.
Returns false if the selection cell under the mouse is an edge. |
mouseDragged | public void mouseDragged(MouseEvent event)(Code) | | Overrides the parent's implementation to avoid flickering by checking if
the state of the preview will change.
Parameters: event - The object that describes the event. |
mouseMoved | public void mouseMoved(MouseEvent event)(Code) | | Overrides the parent's implementation to highlight ports which are under
the mousepointer.
Parameters: event - The object that describes the event. |
mousePressed | public void mousePressed(MouseEvent event)(Code) | | Extends the parent's implementation to find the port view at the mouse
location and set the startPoint accordingly.
Parameters: event - The object that describes the event. |
overlay | public void overlay(JGraph graph, Graphics g, boolean clear)(Code) | | Extends the parent's implementation to draw the highlighted port using
JGraphpadEdgeTool.paintPort(JGraph,Graphics) .
Parameters: graph - The graph to paint in. Parameters: g - The graphics to use for paiting. Parameters: clear - Wether to clear the display. |
paintPort | protected void paintPort(JGraph graph, Graphics g)(Code) | | Paints the
JGraphpadEdgeTool.current port in highlighted state.
Parameters: graph - The graph to paint the port in. Parameters: g - The graphics to use for paiting. |
processMouseDraggedEvent | protected void processMouseDraggedEvent(MouseEvent event)(Code) | | 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.
Parameters: event - The object that describes the event. |
|
|
|