code: private void selectPoint(int mx, int my) {
  		if (!isEnabled()) {
  			return;
  		}
  		
  		for (int i=1;i<list.size()-1;i++) {
  			if (checkPoint(mx,my,(ControlPoint) list.get(i))) {
  				selected = (ControlPoint) list.get(i);
  				return;
  			}
  		}
  		if (checkPoint(mx,my,(ControlPoint) list.get(0))) {
  			selected = (ControlPoint) list.get(0);
  			return;
  		}
  		if (checkPoint(mx,my,(ControlPoint) list.get(list.size()-1))) {
  			selected = (ControlPoint) list.get(list.size()-1);
  			return;
  		}
  		
  		selected = null;
  	}
docs: Select the control point at the specified mouse coordinate
  
  @param mx The mouse x coordinate
  @param my The mouse y coordinate