Search in sources :

Example 1 with IdeMenuBar

use of com.intellij.openapi.wm.impl.IdeMenuBar 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)

Aggregations

IdeMenuBar (com.intellij.openapi.wm.impl.IdeMenuBar)1 IdeRootPane (com.intellij.openapi.wm.impl.IdeRootPane)1