org.jgraph.graph
Class EdgeView.EdgeHandle

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

public class EdgeView.EdgeHandle
extends Object
implements CellHandle, Serializable

See Also:
Serialized Form

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

Field Detail

graph

protected JGraph graph

edge

protected EdgeView edge

orig

protected EdgeView orig

label

protected boolean label

source

protected boolean source

target

protected boolean target

currentPoint

protected Point currentPoint

r

protected transient Rectangle[] r

loc

protected transient 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(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(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(Graphics g,
                         CellView p)

snap

protected boolean snap(boolean source,
                       Point point)

isSourceEditing

protected boolean isSourceEditing()

isTargetEditing

protected boolean isTargetEditing()

isEditing

protected boolean isEditing()

mouseMoved

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

Specified by:
mouseMoved in interface CellHandle
Parameters:
event - the point for which the cursor is returned

mousePressed

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

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

mouseDragged

public void mouseDragged(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(MouseEvent e)
Description copied from interface: CellHandle
Messaged when the drag operation has terminated with a drop.

Specified by:
mouseReleased in interface CellHandle
Parameters:
e - the drop event to be processed

createConnectionSet

protected ConnectionSet createConnectionSet(EdgeView view,
                                            Object edge,
                                            boolean verbose)

invalidate

protected void invalidate()