protected Point2D checkLowerLimits(){
  Point2D p1=new Point2D.Double();
  Point2D p2=null;
  double moveX=0;
  double moveY=0;
  inverse(0,height,p1);
  if (p1.getX() < leftLimit) {
    p2=forward(centerY,leftLimit,p2);
    moveX=p2.getX();
  }
  if (p1.getY() < bottomLimit) {
    p2=forward(bottomLimit,centerX,p2);
    moveY=height - p2.getY();
  }
  if (p2 != null) {
    inverse(hWidth + moveX,hHeight - moveY,p2);
  }
  return p2;
}

protected Point2D checkLowerLimits ( ) { Point2D p1 = new Point2D . Double ( ) ; Point2D p2 = null ; double moveX = 0 ; double moveY = 0 ; inverse ( 0 , height , p1 ) ; if ( p1 . getX ( ) < leftLimit ) { p2 = forward ( centerY , leftLimit , p2 ) ; moveX = p2 . getX ( ) ; } if ( p1 . getY ( ) < bottomLimit ) { p2 = forward ( bottomLimit , centerX , p2 ) ; moveY = height - p2 . getY ( ) ; } if ( p2 != null ) { inverse ( hWidth + moveX , hHeight - moveY , p2 ) ; } return p2 ; }
checks the lower limits and returns new center coordinates to keep the limits at the edge if necessary .
