protected void removeCurrentPage() { int index = tabbedPanel.getSelectedIndex(); if (index < 0) return; tabbedPanel.removeTabAt(index); pageList.removeElementAt(index); updatePageCounterField(pageList.size()); changed = true; if (tabbedPanel.getTabCount() <= 0) cardLayout.show(finalPanel, "FirstPanel"); ejs.getModelEditor().getVariablesEditor().updateControlValues(false); }
public void showPage(Editor anEditor) { for (int i = 0, n = tabbedPanel.getComponentCount(); i < n; i++) { if (tabbedPanel.getComponent(i) == anEditor.getComponent()) { // System.out.println ("Found editor "+anEditor.getName()+ " at i="+i); ejs.showPanel(defaultHeader); cardLayout.show(finalPanel, anEditor.getName()); tabbedPanel.setSelectedComponent(anEditor.getComponent()); return; } } }
private void toggleCurrentPage() { int index = tabbedPanel.getSelectedIndex(); if (index < 0) return; Editor page = pageList.get(index); if (page.isActive()) { page.setActive(false); tabbedPanel.setTitleAt(index, page.getName() + " (D)"); } else { page.setActive(true); tabbedPanel.setTitleAt(index, page.getName()); } changed = true; ejs.getModelEditor().getVariablesEditor().updateControlValues(false); }