Search in sources :

Example 1 with IdeRootPane

use of com.intellij.openapi.wm.impl.IdeRootPane in project intellij-community by JetBrains.

the class DarculaTitlePane method installSubcomponents.

private void installSubcomponents() {
    int decorationStyle = getWindowDecorationStyle();
    if (decorationStyle == JRootPane.FRAME) {
        createActions();
        myMenuBar = createMenuBar();
        if (myRootPane instanceof IdeRootPane) {
            myIdeMenu = new IdeMenuBar(ActionManagerEx.getInstanceEx(), DataManager.getInstance());
            add(myIdeMenu);
        }
        add(myMenuBar);
        createButtons();
        add(myHelpButton);
        add(myIconifyButton);
        add(myToggleButton);
        add(myCloseButton);
    } else if (decorationStyle == JRootPane.PLAIN_DIALOG || decorationStyle == JRootPane.INFORMATION_DIALOG || decorationStyle == JRootPane.ERROR_DIALOG || decorationStyle == JRootPane.COLOR_CHOOSER_DIALOG || decorationStyle == JRootPane.FILE_CHOOSER_DIALOG || decorationStyle == JRootPane.QUESTION_DIALOG || decorationStyle == JRootPane.WARNING_DIALOG) {
        createActions();
        createButtons();
        add(myHelpButton);
        add(myCloseButton);
    }
}
Also used : IdeRootPane(com.intellij.openapi.wm.impl.IdeRootPane) IdeMenuBar(com.intellij.openapi.wm.impl.IdeMenuBar)

Example 2 with IdeRootPane

use of com.intellij.openapi.wm.impl.IdeRootPane in project intellij-community by JetBrains.

the class BalloonLayoutImpl method doLayout.

private void doLayout(List<Balloon> balloons, int startX, int bottomY) {
    int y = bottomY;
    ToolWindowsPane pane = UIUtil.findComponentOfType(myParent, ToolWindowsPane.class);
    if (pane != null) {
        y -= pane.getBottomHeight();
    }
    if (myParent instanceof IdeRootPane) {
        y -= ((IdeRootPane) myParent).getStatusBarHeight();
    }
    for (Balloon balloon : balloons) {
        Rectangle bounds = new Rectangle(getSize(balloon));
        y -= bounds.height;
        bounds.setLocation(startX - bounds.width, y);
        balloon.setBounds(bounds);
    }
}
Also used : IdeRootPane(com.intellij.openapi.wm.impl.IdeRootPane) Balloon(com.intellij.openapi.ui.popup.Balloon) ToolWindowsPane(com.intellij.openapi.wm.impl.ToolWindowsPane)

Example 3 with IdeRootPane

use of com.intellij.openapi.wm.impl.IdeRootPane in project intellij-community by JetBrains.

the class ActivateNavigationBarAction method actionPerformed.

@Override
public void actionPerformed(@NotNull AnActionEvent e) {
    final Project project = e.getProject();
    if (project != null && UISettings.getInstance().getShowNavigationBar()) {
        final IdeFrameImpl frame = WindowManagerEx.getInstanceEx().getFrame(project);
        final IdeRootPane ideRootPane = (IdeRootPane) frame.getRootPane();
        JComponent component = ideRootPane.findByName(NavBarRootPaneExtension.NAV_BAR).getComponent();
        if (component instanceof NavBarPanel) {
            final NavBarPanel navBarPanel = (NavBarPanel) component;
            navBarPanel.rebuildAndSelectTail(true);
        }
    }
}
Also used : Project(com.intellij.openapi.project.Project) IdeFrameImpl(com.intellij.openapi.wm.impl.IdeFrameImpl) IdeRootPane(com.intellij.openapi.wm.impl.IdeRootPane)

Aggregations

IdeRootPane (com.intellij.openapi.wm.impl.IdeRootPane)3 Project (com.intellij.openapi.project.Project)1 Balloon (com.intellij.openapi.ui.popup.Balloon)1 IdeFrameImpl (com.intellij.openapi.wm.impl.IdeFrameImpl)1 IdeMenuBar (com.intellij.openapi.wm.impl.IdeMenuBar)1 ToolWindowsPane (com.intellij.openapi.wm.impl.ToolWindowsPane)1