public Rectangle2D reserved(Rectangle2D area,RectangleEdge edge){
  Rectangle2D result=null;
  if (edge == RectangleEdge.TOP) {
    result=new Rectangle2D.Double(area.getX(),area.getY(),area.getWidth(),this.top);
  }
 else   if (edge == RectangleEdge.BOTTOM) {
    result=new Rectangle2D.Double(area.getX(),area.getMaxY() - this.top,area.getWidth(),this.bottom);
  }
 else   if (edge == RectangleEdge.LEFT) {
    result=new Rectangle2D.Double(area.getX(),area.getY(),this.left,area.getHeight());
  }
 else   if (edge == RectangleEdge.RIGHT) {
    result=new Rectangle2D.Double(area.getMaxX() - this.right,area.getY(),this.right,area.getHeight());
  }
  return result;
}

public Rectangle2D reserved ( Rectangle2D area , RectangleEdge edge ) { Rectangle2D result = null ; if ( edge == RectangleEdge . TOP ) { result = new Rectangle2D . Double ( area . getX ( ) , area . getY ( ) , area . getWidth ( ) , this . top ) ; } else if ( edge == RectangleEdge . BOTTOM ) { result = new Rectangle2D . Double ( area . getX ( ) , area . getMaxY ( ) - this . top , area . getWidth ( ) , this . bottom ) ; } else if ( edge == RectangleEdge . LEFT ) { result = new Rectangle2D . Double ( area . getX ( ) , area . getY ( ) , this . left , area . getHeight ( ) ) ; } else if ( edge == RectangleEdge . RIGHT ) { result = new Rectangle2D . Double ( area . getMaxX ( ) - this . right , area . getY ( ) , this . right , area . getHeight ( ) ) ; } return result ; }
calculates the reserved area .
