hasDataToSave(display);
    public void setSelectedDisplay(TreeImageDisplay display)    {        switch (model.getState()) {            //case LOADING_DATA:            //case LOADING_LEAVES:            case DISCARDED:                throw new IllegalStateException(                        "This method cannot be invoked in the LOADING_DATA, "+                        " LOADING_LEAVES or DISCARDED state.");        }        TreeImageDisplay oldDisplay = model.getLastSelectedDisplay();        //if (oldDisplay != null && oldDisplay.equals(display)) return;        if (display != null && display.getUserObject() instanceof String)             display = null;        model.setSelectedDisplay(display);        if (display == null) view.setNullSelectedNode();        firePropertyChange(SELECTED_DISPLAY_PROPERTY, oldDisplay, display);    }