public static WorkspaceTab handleCreateNewTab(TabbedWorkspace workspace) { final String name = JOptionPane.showInputDialog(workspace, "Please enter a name for the new tab"); if (name != null) { CustomWorkspaceTabsManager customTabsManager = workspace.getCustomTabsManager(); WorkspaceTab tab = workspace.addTabForPlugin(customTabsManager.getPluginForTabName(name, workspace)); workspace.setSelectedTab(tab); return tab; } return null; } }
public static WorkspaceTab handleCreateNewTab(TabbedWorkspace workspace) { final String name = JOptionPane.showInputDialog(workspace, "Please enter a name for the new tab"); if (name != null) { CustomWorkspaceTabsManager customTabsManager = workspace.getCustomTabsManager(); WorkspaceTab tab = workspace.addTabForPlugin(customTabsManager.getPluginForTabName(name, workspace)); workspace.setSelectedTab(tab); return tab; } return null; } }
public static WorkspaceTab handleCreateNewTab(TabbedWorkspace workspace) { final String name = JOptionPane.showInputDialog(workspace, "Please enter a name for the new tab"); if (name != null) { CustomWorkspaceTabsManager customTabsManager = workspace.getCustomTabsManager(); WorkspaceTab tab = workspace.addTabForPlugin(customTabsManager.getPluginForTabName(name, workspace)); workspace.setSelectedTab(tab); return tab; } return null; } }
public void initialise() { // Here we either need to load the default tabs, or // restore a set of tabs final List<String> visibleTabs = new TabbedWorkspaceStateManager().getTabs(); // If no tabs are set as visible (i.e. we have yet to customise) show all by default for (WorkspaceTabPlugin plugin : getOrderedPlugins()) { if(visibleTabs.isEmpty()) { if(plugin.isProtegeDefaultTab()) { addTabForPlugin(plugin); } } else if (visibleTabs.contains(plugin.getId())) { addTabForPlugin(plugin); } } }
/** * Override of the <code>Workspace</code> initialise method. */ public void initialise() { JPanel tabHolder = new JPanel(new BorderLayout()); workspaceTabs = new HashSet<WorkspaceTab>(); // Create the tabs. tabbedPane = new JTabbedPane(); tabHolder.add(tabbedPane); setContent(tabbedPane); // Here we either need to load the default tabs, or // restore a set of tabs final List<String> visibleTabs = new TabbedWorkspaceStateManager().getTabs(); // If no tabs are set as visible (ie we have yet to customise, show all by default for (WorkspaceTabPlugin plugin : getOrderedPlugins()) { if (visibleTabs.isEmpty() || visibleTabs.contains(plugin.getId())) { addTabForPlugin(plugin); } } }
/** * Override of the <code>Workspace</code> initialise method. */ public void initialise() { JPanel tabHolder = new JPanel(new BorderLayout()); workspaceTabs = new HashSet<WorkspaceTab>(); // Create the tabs. tabbedPane = new JTabbedPane(); tabHolder.add(tabbedPane); setContent(tabbedPane); // Here we either need to load the default tabs, or // restore a set of tabs final List<String> visibleTabs = new TabbedWorkspaceStateManager().getTabs(); // If no tabs are set as visible (ie we have yet to customise, show all by default for (WorkspaceTabPlugin plugin : getOrderedPlugins()) { if (visibleTabs.isEmpty() || visibleTabs.contains(plugin.getId())) { addTabForPlugin(plugin); } } }