List of usage examples for com.intellij.openapi.ui Messages isMacSheetEmulation
public static boolean isMacSheetEmulation()
From source file:ui.AddFilterRuleDialog.java
License:Apache License
protected void _init(String title, @Nullable DoNotAskOption doNotAskOption) { setTitle(title);/* www. ja va 2s .co m*/ if (Messages.isMacSheetEmulation()) { setUndecorated(true); } setButtonsAlignment(SwingConstants.RIGHT); setDoNotAskOption(doNotAskOption); init(); if (Messages.isMacSheetEmulation()) { MacUtil.adjustFocusTraversal(myDisposable); } }
From source file:ui.AddFilterRuleDialog.java
License:Apache License
@NotNull
LayoutManager createRootLayout() {
return Messages.isMacSheetEmulation() ? myLayout = new MyBorderLayout() : new BorderLayout();
}
From source file:ui.AddFilterRuleDialog.java
License:Apache License
@Override protected void dispose() { if (Messages.isMacSheetEmulation()) { animate();//w w w.j a v a 2 s.c o m } else { super.dispose(); } }
From source file:ui.AddFilterRuleDialog.java
License:Apache License
@Override public void show() { if (Messages.isMacSheetEmulation()) { setInitialLocationCallback(new Computable<Point>() { @Override// w w w . ja va 2 s . c om public Point compute() { JRootPane rootPane = SwingUtilities.getRootPane(getWindow().getParent()); if (rootPane == null) { rootPane = SwingUtilities.getRootPane(getWindow().getOwner()); } Point p = rootPane.getLocationOnScreen(); p.x += (rootPane.getWidth() - getWindow().getWidth()) / 2; return p; } }); animate(); if (SystemInfo.isJavaVersionAtLeast("1.7")) { try { Method method = Class.forName("java.awt.Window").getDeclaredMethod("setOpacity", float.class); if (method != null) method.invoke(getPeer().getWindow(), .8f); } catch (Exception exception) { } } setAutoAdjustable(false); setSize(getPreferredSize().width, 0);//initial state before animation, zero height } super.show(); }
From source file:ui.GoogleAlertDialog.java
License:Apache License
protected void _init(String title, String message) { setTitle(title);// w w w. j a v a 2 s .c o m mMessage = message; if (Messages.isMacSheetEmulation()) { setUndecorated(true); } setButtonsAlignment(SwingConstants.RIGHT); setDoNotAskOption(null); init(); if (Messages.isMacSheetEmulation()) { MacUtil.adjustFocusTraversal(myDisposable); } }
From source file:ui.MultiSelectDialog.java
License:Apache License
protected void _init(Project project, String title, String message, @Nullable String checkboxText, boolean checkboxStatus, @Nullable DoNotAskOption doNotAskOption) { setTitle(title);/*from ww w .ja v a2s . c o m*/ if (Messages.isMacSheetEmulation()) { setUndecorated(true); } propertiesComponent = PropertiesComponent.getInstance(project); myMessage = message; myCheckboxText = checkboxText; myChecked = checkboxStatus; setButtonsAlignment(SwingConstants.RIGHT); setDoNotAskOption(doNotAskOption); init(); if (Messages.isMacSheetEmulation()) { MacUtil.adjustFocusTraversal(myDisposable); } }