fdX = 0;
if(-deltaX+cWest < wOffset) { fdX = -wOffset; } else if(-deltaX+cEast > eOffset) { fdX = -(eOffset-cEast); }
        protected void makeBoundedCameraMotion(PCamera c,                                               double deltaX, double deltaY)        {            PBounds pBounds = c.getViewBounds();            Rectangle2D rBounds = pBounds.getBounds2D();            double wOffset = activeRegion.getX();            double nOffset = activeRegion.getY();            double eOffset = activeRegion.getX()+activeRegion.getWidth();            double sOffset = activeRegion.getY()+activeRegion.getHeight();            double cWest = rBounds.getX();            double cNorth = rBounds.getY();            double cEast = rBounds.getX()+rBounds.getWidth();            double cSouth = rBounds.getY()+rBounds.getHeight();            double fdX = 0;            double fdY = 0;            // check horizontal panning bounds            if((-deltaX+cWest < wOffset) ||               (-deltaX+cEast > eOffset))            {                fdX = 0;            }            else            {                fdX = deltaX;            }            // check vertical panning bounds            if((-deltaY+cNorth < nOffset) ||               (-deltaY+cSouth > sOffset))            {                fdY = 0;            }            else            {                fdY = deltaY;            }            c.translateView(fdX,fdY);            c.repaint();        }