scaleToShow = false;
if(scaleToShow) return;
    public void setZoomLevel(double zoomLevel)    {        // error condition        if(zoomLevel <= 0)        {            return;        }        scaleToShow = false;                Dimension dim = getSize();        double width = dim.getWidth();        double height = dim.getHeight();        double scale = getCamera().getViewScale();        double viewWidth = getCamera().getViewBounds().getWidth();        double viewHeight = getCamera().getViewBounds().getHeight();        double viewCenterX = getCamera().getViewBounds().getCenterX();        double viewCenterY = getCamera().getViewBounds().getCenterY();                double scaleX = 0;        double scaleY = 0;                System.err.println(footprint.getWidth()+","+footprint.getWidth());        System.err.println("dim:"+width+","+height);        if(width/zoomLevel < footprint.getWidth())        {            scaleX = viewCenterX;            if((viewCenterX - (scale/zoomLevel)*viewWidth/2) < 0)            {                scaleX = 0;            }        }        if(height/zoomLevel < footprint.getHeight())        {            scaleY = viewCenterY;            if((viewCenterY - (scale/zoomLevel)*viewWidth/2) < 0)            {                scaleY = 0;            }        }        System.err.println("scaleX="+scaleX+", scaleY="+scaleY);        getCamera().scaleViewAboutPoint(zoomLevel/scale,scaleX,scaleY);        updateConstraints();    }