net.clackrouter.router.graph
Class WireView.EdgeHandle

java.lang.Object
  extended by net.clackrouter.router.graph.WireView.EdgeHandle
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
WireView

public static class WireView.EdgeHandle
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  int currentIndex
          Holds the index of the current (editing) label or point.
protected  int currentLabel
          Holds the index of the current (editing) label or point.
protected  java.awt.geom.Point2D currentPoint
           
protected  EdgeView edge
           
protected  java.awt.geom.Rectangle2D[] extraLabelLocations
           
protected  boolean firstOverlayCall
           
protected  JGraph graph
           
protected  boolean isEdgeConnectable
           
protected  boolean label
           
protected  java.awt.geom.Rectangle2D loc
           
protected  EdgeView orig
           
protected  java.awt.geom.Rectangle2D[] r
           
protected  EdgeView relevantEdge
           
protected  boolean source
           
protected  boolean target
           
 
Constructor Summary
WireView.EdgeHandle(EdgeView edge, GraphContext ctx)
           
 
Method Summary
protected  ConnectionSet createConnectionSet(EdgeView view, java.lang.Object edge, boolean verbose)
           
protected  void invalidate()
           
 boolean isAddPointEvent(java.awt.event.MouseEvent event)
          Returning true signifies a mouse event adds a new point to an edge.
 boolean isConstrainedMoveEvent(java.awt.event.MouseEvent e)
           
protected  boolean isEditing()
           
 boolean isRemovePointEvent(java.awt.event.MouseEvent event)
          Returning true signifies a mouse event removes a given point.
protected  boolean isSourceEditing()
           
protected  boolean isTargetEditing()
           
 void mouseDragged(java.awt.event.MouseEvent event)
           
 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)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void overlay(java.awt.Graphics g)
           
 void paint(java.awt.Graphics g)
           
protected  void paintPort(java.awt.Graphics g, CellView p)
           
protected  void reloadPoints(EdgeView edge)
           
protected  boolean snap(boolean source, java.awt.geom.Point2D 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

currentLabel

protected int currentLabel
Holds the index of the current (editing) label or point.


currentIndex

protected int currentIndex
Holds the index of the current (editing) label or point.


currentPoint

protected java.awt.geom.Point2D currentPoint

r

protected transient java.awt.geom.Rectangle2D[] r

loc

protected transient java.awt.geom.Rectangle2D loc

extraLabelLocations

protected transient java.awt.geom.Rectangle2D[] extraLabelLocations

firstOverlayCall

protected boolean firstOverlayCall

isEdgeConnectable

protected boolean isEdgeConnectable

relevantEdge

protected EdgeView relevantEdge
Constructor Detail

WireView.EdgeHandle

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

reloadPoints

protected void reloadPoints(EdgeView edge)

paint

public void paint(java.awt.Graphics g)

overlay

public void overlay(java.awt.Graphics g)

paintPort

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

snap

protected boolean snap(boolean source,
                       java.awt.geom.Point2D point)

isConstrainedMoveEvent

public boolean isConstrainedMoveEvent(java.awt.event.MouseEvent e)

isAddPointEvent

public boolean isAddPointEvent(java.awt.event.MouseEvent event)
Returning true signifies a mouse event adds a new point to an edge.


isRemovePointEvent

public boolean isRemovePointEvent(java.awt.event.MouseEvent event)
Returning true signifies a mouse event removes a given point.


isSourceEditing

protected boolean isSourceEditing()

isTargetEditing

protected boolean isTargetEditing()

isEditing

protected boolean isEditing()

mouseMoved

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


mousePressed

public void mousePressed(java.awt.event.MouseEvent event)

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent event)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)

createConnectionSet

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

invalidate

protected void invalidate()