protected static class CrookedSpringLayout.CrookedSpringEdge extends SpringLayout.SpringEdge
f
Constructor and Description |
---|
CrookedSpringLayout.CrookedSpringEdge(Edge ve,
VisVertex front,
VisVertex back) |
Modifier and Type | Method and Description |
---|---|
Coordinates |
calcMidpoint() |
VisEdge |
copy(VisVertex front,
VisVertex back)
Creates a new
VisEdge from the specified
VisVertex instances and this instance's
Edge . |
double |
getSquareDistance(double x,
double y)
Returns the squared distance from this edge to the point
(x,y) . |
public VisEdge copy(VisVertex front, VisVertex back)
VisEdge
VisEdge
from the specified
VisVertex
instances and this instance's
Edge
.public Coordinates calcMidpoint()
public double getSquareDistance(double x, double y)
VisEdge
(x,y)
.
The default implementation takes care of a distance from a straight edge to a point;
more complex edges should have corresponding functions.getSquareDistance
in class VisEdge
VisEdge.getSquareDistance(double, double)