List of usage examples for com.intellij.openapi.wm ToolWindow setContentUiType
void setContentUiType(@NotNull ToolWindowContentUiType type, @Nullable Runnable runnable);
From source file:com.intellij.ide.actions.ToggleContentUiTypeAction.java
License:Apache License
@Override protected void setSelected(ToolWindow window, boolean state) { window.setContentUiType(state ? ToolWindowContentUiType.TABBED : ToolWindowContentUiType.COMBO, null); }
From source file:com.intellij.ide.projectView.impl.ProjectViewImpl.java
License:Apache License
public synchronized void setupImpl(final ToolWindow toolWindow, final boolean loadPaneExtensions) { myActionGroup = new DefaultActionGroup(); myAutoScrollFromSourceHandler.install(); if (toolWindow != null) { myContentManager = toolWindow.getContentManager(); if (!ApplicationManager.getApplication().isUnitTestMode()) { toolWindow.setContentUiType(ToolWindowContentUiType.getInstance("combo"), null); ((ToolWindowEx) toolWindow).setAdditionalGearActions(myActionGroup); toolWindow.getComponent().putClientProperty(ToolWindowContentUi.HIDE_ID_LABEL, "true"); }/*from ww w .ja va2s .c om*/ } else { final ContentFactory contentFactory = ServiceManager.getService(ContentFactory.class); myContentManager = contentFactory.createContentManager(false, myProject); } GuiUtils.replaceJSplitPaneWithIDEASplitter(myPanel); SwingUtilities.invokeLater(new Runnable() { @Override public void run() { splitterProportions.restoreSplitterProportions(myPanel); } }); if (loadPaneExtensions) { ensurePanesLoaded(); } isInitialized = true; doAddUninitializedPanes(); myContentManager.addContentManagerListener(new ContentManagerAdapter() { @Override public void selectionChanged(ContentManagerEvent event) { if (event.getOperation() == ContentManagerEvent.ContentOperation.add) { viewSelectionChanged(); } } }); }