}
public int compare(Object o1, Object o2) {
SimpleEdge e1 = (SimpleEdge) o1;
SimpleEdge e2 = (SimpleEdge) o2;
SimpleVertex v1 = e1.getAnother(v);
SimpleVertex v2 = e2.getAnother(v);
double x1 =
Math.abs(v1.getVertexext().getLeftTop().getX()
- v.getVertexext().getLeftTop().getX());
double x2 =
Math.abs(v2.getVertexext().getLeftTop().getX()
- v.getVertexext().getLeftTop().getX());
Double dx1 = new Double(x1);
Double dx2 = new Double(x2);
return dx1.compareTo(dx2);