if (display != null) { if (display.containsImages()) { controller.getAction(BrowserControl.FORWARD_NAV).setEnabled(!v); } else { controller.getAction(BrowserControl.FORWARD_NAV).setEnabled(v); } controller.getAction(BrowserControl.BACKWARD_NAV).setEnabled(!v); long id = -1; if (model.getGoIntoNode() != null) id = model.getGoIntoNode().getUserObjectId(); if (v) { model.setMainTree(v, null); view.navigate(); } else if (!v && !(display.getUserObjectId() == id)) { model.setMainTree(v, display); view.navigate(); }
if (display == null) return; if (display.containsImages()) { controller.getAction(BrowserControl.FORWARD_NAV).setEnabled(!v); } else { controller.getAction(BrowserControl.FORWARD_NAV).setEnabled(v); } controller.getAction(BrowserControl.BACKWARD_NAV).setEnabled(!v); long id = -1; if (model.getGoIntoNode() != null) id = model.getGoIntoNode().getUserObjectId(); if (v) { model.setMainTree(v, null); view.navigate(); } else if (!v && !(display.getUserObjectId() == id)) { model.setMainTree(v, display); view.navigate();
    public void navigate(boolean v)    {        TreeImageDisplay display = getLastSelectedDisplay();        if (display != null) { //shouldn't happen            if (display.containsImages()) {                controller.getAction(BrowserControl.FORWARD_NAV).setEnabled(!v);            } else {                controller.getAction(BrowserControl.FORWARD_NAV).setEnabled(v);            }            controller.getAction(BrowserControl.BACKWARD_NAV).setEnabled(!v);            long id = -1;            if (model.getGoIntoNode() != null)                id = model.getGoIntoNode().getUserObjectId();            if (v) {                model.setMainTree(v, null);                view.navigate();            } else if (!v && !(display.getUserObjectId() == id)) {                model.setMainTree(v, display);                view.navigate();            }         }     }