/** Display this panel in an external window. */ public void windowPanel() { // try to hide the panel if (dockManager.hide(this, false)) { // move the toolbar from the main window to the panel if (hasToolbar()) { if (toolbarContainer == null) { toolbarContainer = new ToolbarContainer(app, false); } toolbarContainer.addToolbar(toolbar); toolbarContainer.buildGui(); toolbarContainer.setActiveToolbar(getViewId()); toolbarPanel.add(toolbarContainer, BorderLayout.CENTER); ToolbarContainer mainContainer = ((GuiManagerD) app.getGuiManager()).getToolbarPanel(); mainContainer.removeToolbar(toolbar); mainContainer.updateToolbarPanel(); } setVisible(true); createFrame(); } }
/** Update the toolbar of this dock panel if it's open in its own toolbar container. */ public void updateToolbar() { if (isVisible() && isOpenInFrame() && hasToolbar()) { toolbarContainer.updateToolbarPanel(); } }