com.jgraph.graph
Class EdgeView.EdgeHandle

java.lang.Object
  extended bycom.jgraph.graph.EdgeView.EdgeHandle
All Implemented Interfaces:
CellHandle, java.io.Serializable
Enclosing class:
EdgeView

public class EdgeView.EdgeHandle
extends java.lang.Object
implements CellHandle, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  EdgeView edge
           
protected  boolean firstOverlayCall
           
protected  JGraph graph
           
protected  int index
           
protected  boolean isEdgeConnectable
           
protected static int LABEL_INDEX
           
protected  java.awt.Rectangle loc
           
protected static int NO_INDEX
           
protected  java.awt.Rectangle[] r
           
protected  EdgeView relevantEdge
           
 
Constructor Summary
EdgeView.EdgeHandle(EdgeView edge, GraphContext ctx)
           
 
Method Summary
protected  void invalidate()
           
protected  boolean isSourceEditing()
           
protected  boolean isTargetEditing()
           
 void mouseDragged(java.awt.event.MouseEvent event)
          Messagedwhen the user drags the selection.
 void mouseMoved(java.awt.event.MouseEvent event)
          Invoked when the mouse pointer has been moved on a component (with no buttons down).
 void mousePressed(java.awt.event.MouseEvent event)
          Messaged when a drag gesture is recogniced.
 void mouseReleased(java.awt.event.MouseEvent e)
          Messaged when the drag operation has terminated with a drop.
 void overlay(java.awt.Graphics g)
          Paint the handle on the given graphics object during mouse operations.
 void paint(java.awt.Graphics g)
          Paint the handle on the given graphics object once.
protected  void paintPort(java.awt.Graphics g, PortView p)
           
protected  void reloadPoints(EdgeView edge)
           
protected  boolean snap(boolean source, java.awt.Point point)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_INDEX

protected static final transient int NO_INDEX
See Also:
Constant Field Values

LABEL_INDEX

protected static final transient int LABEL_INDEX
See Also:
Constant Field Values

graph

protected JGraph graph

edge

protected EdgeView edge

index

protected transient int index

r

protected transient java.awt.Rectangle[] r

loc

protected transient java.awt.Rectangle loc

firstOverlayCall

protected boolean firstOverlayCall

isEdgeConnectable

protected boolean isEdgeConnectable

relevantEdge

protected EdgeView relevantEdge
Constructor Detail

EdgeView.EdgeHandle

public EdgeView.EdgeHandle(EdgeView edge,
                           GraphContext ctx)
Method Detail

reloadPoints

protected void reloadPoints(EdgeView edge)

paint

public void paint(java.awt.Graphics g)
Description copied from interface: CellHandle
Paint the handle on the given graphics object once.

Specified by:
paint in interface CellHandle
Parameters:
g - the graphics object to paint the handle on

overlay

public void overlay(java.awt.Graphics g)
Description copied from interface: CellHandle
Paint the handle on the given graphics object during mouse operations.

Specified by:
overlay in interface CellHandle
Parameters:
g - the graphics object to paint the handle on

paintPort

protected void paintPort(java.awt.Graphics g,
                         PortView p)

isSourceEditing

protected boolean isSourceEditing()

snap

protected boolean snap(boolean source,
                       java.awt.Point point)

isTargetEditing

protected boolean isTargetEditing()

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent event)
Invoked when the mouse pointer has been moved on a component (with no buttons down).

Specified by:
mouseMoved in interface CellHandle

mousePressed

public void mousePressed(java.awt.event.MouseEvent event)
Description copied from interface: CellHandle
Messaged when a drag gesture is recogniced.

Specified by:
mousePressed in interface CellHandle

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent event)
Description copied from interface: CellHandle
Messagedwhen the user drags the selection. The Controller is responsible to determine whether the mouse is inside the parent graph or not.

Specified by:
mouseDragged in interface CellHandle
Parameters:
event - the drag event to be processed

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Description copied from interface: CellHandle
Messaged when the drag operation has terminated with a drop.

Specified by:
mouseReleased in interface CellHandle

invalidate

protected void invalidate()