if (!(oldValue.getClass().equals(newValue.getClass()))) model.setEditorSelectedPane(Editor.PROPERTIES_INDEX);
    public void propertyChange(PropertyChangeEvent pce)    {        String name = pce.getPropertyName();        if (name == null) return;        if (name.equals(TreeViewer.CANCEL_LOADING_PROPERTY)) {            Browser browser = model.getSelectedBrowser();            if (browser != null) browser.cancel();        } else if (name.equals(Browser.POPUP_MENU_PROPERTY)) {            Component c = (Component) pce.getNewValue();            Browser browser = model.getSelectedBrowser();            if (browser != null && c != null)                view.showPopup(c, browser.getClickPoint());        } else if (name.equals(Browser.CLOSE_PROPERTY)) {            Browser browser = (Browser) pce.getNewValue();            if (browser != null) view.removeBrowser(browser);        } else if (name.equals(Editor.CLOSE_EDITOR_PROPERTY)) {        	Browser b = model.getSelectedBrowser();         	TreeImageDisplay d = null;        	if (b != null) d = b.getLastSelectedDisplay();        	int editorType = model.getEditorType();        	model.removeEditor();            model.onComponentStateChange(true);        	if (editorType == TreeViewer.CREATE_EDITOR)         		resetSelectedDisplay(d);        } else if (name.equals(Classifier.CLOSE_CLASSIFIER_PROPERTY)) {        	Browser b = model.getSelectedBrowser();         	if (b != null) resetSelectedDisplay(b.getLastSelectedDisplay());            model.onComponentStateChange(true);        } else if (name.equals(TreeViewer.FINDER_VISIBLE_PROPERTY)) {            Boolean b = (Boolean) pce.getNewValue();            if (!b.booleanValue()) {                model.clearFoundResults();                model.onComponentStateChange(true);            }        } else if (name.equals(TreeViewer.SELECTED_BROWSER_PROPERTY)) {            Browser  b = model.getSelectedBrowser();            Iterator i = model.getBrowsers().values().iterator();            Browser browser;            while (i.hasNext()) {                browser = (Browser) i.next();                browser.setSelected(browser.equals(b));            }        } else if (name.equals(TreeViewer.THUMBNAIL_LOADING_PROPERTY)) {            model.retrieveThumbnail((ImageData) pce.getNewValue());        } else if (name.equals(Browser.SELECTED_DISPLAY_PROPERTY)) {            Object oldValue = pce.getOldValue();            Object newValue = pce.getNewValue();            if (oldValue != null && newValue != null) {                if (!(oldValue.getClass().equals(newValue.getClass())))                    model.setEditorSelectedPane(Editor.PROPERTIES_INDEX);            }            model.onSelectedDisplay();            view.updateMenuItems();        } else if (name.equals(TreeViewer.HIERARCHY_ROOT_PROPERTY)) {            Map browsers = model.getBrowsers();            Iterator i = browsers.values().iterator();            while (i.hasNext())                ((Browser) i.next()).refreshTree();        } else if (name.equals(                AddExistingObjectsDialog.EXISTING_ADD_PROPERTY)) {            model.addExistingObjects((Set) pce.getNewValue());        } else if (name.equals(EditorSaverDialog.SAVING_DATA_EDITOR_PROPERTY)) {            boolean b = ((Boolean) pce.getNewValue()).booleanValue();            model.saveInEditor(b);        } else if (name.equals(DataHandler.ANNOTATED_PROPERTY) ||        		name.equals(DataHandler.CLASSIFIED_PROPERTY)) {        	if (view.getDataHandler() == null) return;        	view.discardDataHandler();        	Map browsers = model.getBrowsers();            Iterator i = browsers.values().iterator();            while (i.hasNext())                ((Browser) i.next()).refreshTree();        }    }