code: public void setPoint( double x, double y ) {
          if (selection >= 0) {
              Coordinate coordinate = new Coordinate(x, y);
              pts.set(selection, coordinate);
          }
      }
docs: set selected control point