samples.preview_new_graphdraw.test
Class CircleEdge

java.lang.Object
  extended by samples.preview_new_graphdraw.VisEdge
      extended by samples.preview_new_graphdraw.test.CircleEdge

public class CircleEdge
extends VisEdge


Field Summary
 
Fields inherited from class samples.preview_new_graphdraw.VisEdge
mBack, mEdge, mFront
 
Constructor Summary
CircleEdge(Edge ve, VisVertex front, VisVertex back)
           
 
Method Summary
 VisEdge copy(VisVertex front, VisVertex back)
          Creates a new VisEdge from the specified VisVertex instances and this instance's Edge.
 Coordinates getCenter()
           
 double getRadius()
           
 double getSquareDistance(double x, double y)
          If it's in the half-plane that contains the half-circle, return the distance, else return infinity.
 double getStartAngle()
           
 
Methods inherited from class samples.preview_new_graphdraw.VisEdge
getBack, getEdge, getFront
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CircleEdge

public CircleEdge(Edge ve,
                  VisVertex front,
                  VisVertex back)
Method Detail

copy

public VisEdge copy(VisVertex front,
                    VisVertex back)
Description copied from class: VisEdge
Creates a new VisEdge from the specified VisVertex instances and this instance's Edge.

Overrides:
copy in class VisEdge

getCenter

public Coordinates getCenter()

getRadius

public double getRadius()

getStartAngle

public double getStartAngle()

getSquareDistance

public double getSquareDistance(double x,
                                double y)
If it's in the half-plane that contains the half-circle, return the distance, else return infinity. (You shouldn't be clicking on the wrong side.)

Overrides:
getSquareDistance in class VisEdge
See Also:
VisEdge.getSquareDistance(double, double)