public void copyPolygon(Vertex v)
    {
        if (v == null)  return;
        if (v.getClass() != Point.class)    return;
        Point p = (Point)v;
        double xDiff = draggedToX - draggedFromX;
        double yDiff = draggedToY - draggedFromY;
        Point q = p;
        Point prev = null;
        Point begin = null;
        do {
            Point next = vertices.addPoint(q.X() + xDiff, q. Y() + yDiff);
            if (prev != null)
            {
                prev.setRight(next);
                next.setLeft(prev);
            }
            else    begin = next;
            prev = next;
            q = q.getRight();
        } while (q != p);
        prev.setRight(begin);
        begin.setLeft(prev);
    }