public void updateDrawingLimits(Rectangle2D drawing){
  int xmin=(int)(drawing.getX() - (drawing.getWidth() / 2));
  int xmax=xmin + (int)(drawing.getWidth() * 2);
  xposInput.setLimits(xmin,xmax);
  int ymin=(int)(drawing.getY() - (drawing.getHeight() / 2));
  int ymax=ymin + (int)(drawing.getHeight() * 2);
  yposInput.setLimits(ymin,ymax);
}

public void updateDrawingLimits ( Rectangle2D drawing ) { int xmin = ( int ) ( drawing . getX ( ) - ( drawing . getWidth ( ) / 2 ) ) ; int xmax = xmin + ( int ) ( drawing . getWidth ( ) * 2 ) ; xposInput . setLimits ( xmin , xmax ) ; int ymin = ( int ) ( drawing . getY ( ) - ( drawing . getHeight ( ) / 2 ) ) ; int ymax = ymin + ( int ) ( drawing . getHeight ( ) * 2 ) ; yposInput . setLimits ( ymin , ymax ) ; }
use the drawing size to define the limits for the x and y axis controls . as the drawing limits call - back , this is invoked for every frame . it should never generate a notification or event .
