Java Code Examples for com.intellij.ui.content.ContentFactory#createContentManager()
The following examples show how to use
com.intellij.ui.content.ContentFactory#createContentManager() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DesktopToolWindowImpl.java From consulo with Apache License 2.0 | 6 votes |
@RequiredUIAccess @Override protected void init(boolean canCloseContent, @Nullable Object component) { final ContentFactory contentFactory = ContentFactory.getInstance(); myContentUI = new DesktopToolWindowContentUi(this); ContentManager contentManager = myContentManager = contentFactory.createContentManager(myContentUI, canCloseContent, myToolWindowManager.getProject()); if (component != null) { final Content content = contentFactory.createContent((JComponent)component, "", false); contentManager.addContent(content); contentManager.setSelectedContent(content, false); } myComponent = contentManager.getComponent(); DesktopInternalDecorator.installFocusTraversalPolicy(myComponent, new LayoutFocusTraversalPolicy()); UiNotifyConnector notifyConnector = new UiNotifyConnector(myComponent, new Activatable() { @Override public void showNotify() { myShowing.onReady(); } }); Disposer.register(contentManager, notifyConnector); }
Example 2
Source File: UnifiedToolWindowImpl.java From consulo with Apache License 2.0 | 5 votes |
@RequiredUIAccess @Override protected void init(boolean canCloseContent, @Nullable Object component) { final ContentFactory contentFactory = ContentFactory.getInstance(); ContentManager contentManager = myContentManager = contentFactory.createContentManager(new UnifiedToolWindowContentUI(this), canCloseContent, myToolWindowManager.getProject()); if (component != null) { final Content content = contentFactory.createUIContent((Component)component, "", false); contentManager.addContent(content); contentManager.setSelectedContent(content, false); } myComponent = contentManager.getUIComponent(); }
Example 3
Source File: RunDashboardManagerImpl.java From consulo with Apache License 2.0 | 5 votes |
@Inject public RunDashboardManagerImpl(@Nonnull final Project project) { myProject = project; ContentFactory contentFactory = ContentFactory.getInstance(); ContentUI contentUI = new PanelContentUI(); myContentManager = contentFactory.createContentManager(contentUI, false, project); myGroupers = Arrays.stream(DashboardGroupingRule.EP_NAME.getExtensions()).sorted(DashboardGroupingRule.PRIORITY_COMPARATOR).map(DashboardGrouper::new) .collect(Collectors.toList()); if (isDashboardEnabled()) { initToolWindowListeners(); } }