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);
}
}
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);
}
}
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);
}
}
}
Aggregations