public TabbedWorkspace() { tabbedPane.setUI(new CloseableTabbedPaneUI(CloseableTabbedPaneUI.TabClosability.CLOSABLE, new WorkspaceTabCloseHandler())); JPanel tabHolder = new JPanel(new BorderLayout()); tabHolder.add(tabbedPane); setContent(tabbedPane); }
/** * 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); } } }