private Rectangle2D viewToFrame(Rectangle2D view){
  double width=view.getWidth() / this.viewW;
  double height=view.getHeight() / this.viewH;
  double x=view.getX() - (width * this.viewX);
  double y=view.getY() - (height * this.viewY);
  return new Rectangle2D.Double(x,y,width,height);
}

private Rectangle2D viewToFrame ( Rectangle2D view ) { double width = view . getWidth ( ) / this . viewW ; double height = view . getHeight ( ) / this . viewH ; double x = view . getX ( ) - ( width * this . viewX ) ; double y = view . getY ( ) - ( height * this . viewY ) ; return new Rectangle2D . Double ( x , y , width , height ) ; }
returns the frame surrounding the specified view rectangle .
