@Override public void close(TabLabelView tab) { if (dataTabs.hasTab(tab)) { int index = dataTabs.deleteTab(tab); view.removeDataTab(index); TabPanelPresenter p = dataTabs.getPresenter(tab); p.removed(); } else if (visTabs.hasTab(tab)) { int index = visTabs.deleteTab(tab); view.removeVisTab(index); TabPanelPresenter p = visTabs.getPresenter(tab); p.removed(); } else { logger.log(Level.SEVERE, "Unknown tab!"); } }
public void popinDataPanel(String id) { logger.log(Level.INFO, "Adding data panel back in!"); TabLabelView tab = dataTabs.unpopTab(Integer.parseInt(id)); TabPanelPresenter p = dataTabs.getPresenter(tab); // FIXME: reusing presenters/view does not work yet... // p.added(); dataTabs.deleteTab(tab); addDataTab(((DataPanelPresenterImpl) p).getDataKey()); }
public void popinVisPanel(String id) { logger.log(Level.INFO, "Adding vis panel back in!"); TabLabelView tab = visTabs.unpopTab(Integer.parseInt(id)); TabPanelPresenter p = visTabs.getPresenter(tab); // FIXME: reusing presenters/view does not work yet... // p.added(); visTabs.deleteTab(tab); if (p instanceof ConfusionMatrixPresenterImpl) { ConfusionMatrixPresenterImpl cp = (ConfusionMatrixPresenterImpl) p; addConfusionMatrixTab(cp.getRandomForest(), cp.getData(), cp.getBuilder()); } else { TreePanelPresenterImpl tp = (TreePanelPresenterImpl) p; addVisTab(tp.getDatakey(), tp.getModelkey(), tp.getTreeIndex()); } }