Java Code Examples for com.intellij.openapi.util.SystemInfo#isMacOSLion()
The following examples show how to use
com.intellij.openapi.util.SystemInfo#isMacOSLion() .
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: DesktopWindowManagerImpl.java From consulo with Apache License 2.0 | 6 votes |
private int updateFrameBounds(JFrame frame, IdeFrameEx ideFrame) { int extendedState = frame.getExtendedState(); if (SystemInfo.isMacOSLion) { ComponentPeer peer = AWTAccessor.getComponentAccessor().getPeer(frame); if (peer instanceof FramePeer) { // frame.state is not updated by jdk so get it directly from peer extendedState = ((FramePeer)peer).getState(); } } boolean isMaximized = extendedState == Frame.MAXIMIZED_BOTH || isFullScreenSupportedInCurrentOS() && ideFrame.isInFullScreen(); boolean usePreviousBounds = isMaximized && myFrameBounds != null && frame.getBounds().contains(new Point((int)myFrameBounds.getCenterX(), (int)myFrameBounds.getCenterY())); if (!usePreviousBounds) { myFrameBounds = frame.getBounds(); } return extendedState; }
Example 2
Source File: JBTabbedPane.java From consulo with Apache License 2.0 | 5 votes |
private void updateSelectedTabForeground() { if (UIUtil.isUnderAquaLookAndFeel() && SystemInfo.isMacOSLion) { if (getSelectedIndex() != -1 && getTabComponentAt(getSelectedIndex()) != null) { getTabComponentAt(getSelectedIndex()).setForeground(Color.WHITE); } if (previousSelectedIndex != -1 && getTabComponentAt(previousSelectedIndex) != null) { getTabComponentAt(previousSelectedIndex).setForeground(JBColor.foreground()); } } }
Example 3
Source File: FrameState.java From consulo with Apache License 2.0 | 5 votes |
public static int getExtendedState(Component component) { int state = Frame.NORMAL; if (component instanceof Frame) { state = ((Frame)component).getExtendedState(); if (SystemInfo.isMacOSLion) { // workaround: frame.state is not updated by jdk so get it directly from peer ComponentPeer peer = AWTAccessor.getComponentAccessor().getPeer(component); if (peer instanceof FramePeer) { state = ((FramePeer)peer).getState(); } } } return state; }
Example 4
Source File: DesktopWindowManagerImpl.java From consulo with Apache License 2.0 | 4 votes |
@Override public boolean isFullScreenSupportedInCurrentOS() { return SystemInfo.isMacOSLion || SystemInfo.isWindows || SystemInfo.isXWindow && X11UiUtil.isFullScreenSupported(); }