setZoomToScale(false);
    public void modeChanged(String className, BrowserMode mode)    {        // boooooo.        if(className == null)        {            return;        }        else if(className.equals(BrowserModel.PAN_MODE_NAME))        {            if(mode == BrowserMode.HAND_MODE)            {                // TODO: change drag listener here            }            else if(mode == BrowserMode.NO_HAND_MODE)            {                // TODO: change back.            }        }        else if(className.equals(BrowserModel.MAJOR_UI_MODE_NAME))        {            if(mode == BrowserMode.DEFAULT_MODE)            {                // TODO: fill this in            }        }        else if(className.equals(BrowserModel.SELECT_MODE_NAME))        {            if(mode == BrowserMode.SELECTING_MODE)            {                selectionInProgress = true;                repaint();            }            else            {                selectionInProgress = false;                repaint();            }        }        else if(className.equals(BrowserModel.ZOOM_MODE_NAME))        {            if(mode == BrowserMode.ZOOM_TO_FIT_MODE)            {                setZoomToScale();            }            else if(mode == BrowserMode.ZOOM_ACTUAL_MODE)            {                setZoomLevel(1);            }            else if(mode == BrowserMode.ZOOM_50_MODE)            {                setZoomLevel(0.5);            }            else if(mode == BrowserMode.ZOOM_75_MODE)            {                setZoomLevel(0.75);            }            else if(mode == BrowserMode.ZOOM_200_MODE)            {                setZoomLevel(2);            }        }        else if(className.equals(BrowserModel.SEMANTIC_MODE_NAME))        {            if(mode == BrowserMode.IMAGE_NAME_MODE)            {                semanticHoverThumbnailAction =                    PiccoloActionFactory.getImageNameEnterAction(semanticLayer);                defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL,                                                        semanticHoverThumbnailAction);                setThumbnailOverActions(defaultTOverActions);            }            else if(mode == BrowserMode.SEMANTIC_ZOOMING_MODE)            {                semanticHoverThumbnailAction =                    PiccoloActionFactory.getSemanticEnterAction(semanticLayer);                defaultTOverActions.setMouseEnterAction(PiccoloModifiers.NORMAL,                                                        semanticHoverThumbnailAction);                setThumbnailOverActions(defaultTOverActions);            }        }            }