本文整理汇总了Java中com.intellij.openapi.util.SystemInfo.isMacOSLion方法的典型用法代码示例。如果您正苦于以下问题:Java SystemInfo.isMacOSLion方法的具体用法?Java SystemInfo.isMacOSLion怎么用?Java SystemInfo.isMacOSLion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.util.SystemInfo
的用法示例。
在下文中一共展示了SystemInfo.isMacOSLion方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateFrameBounds
import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
private int updateFrameBounds(IdeFrameImpl frame) {
int extendedState = frame.getExtendedState();
if (SystemInfo.isMacOSLion) {
@SuppressWarnings("deprecation") ComponentPeer peer = frame.getPeer();
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() && frame.isInFullScreen();
boolean usePreviousBounds = isMaximized &&
myFrameBounds != null &&
frame.getBounds().contains(new Point((int)myFrameBounds.getCenterX(), (int)myFrameBounds.getCenterY()));
if (!usePreviousBounds) {
myFrameBounds = frame.getBounds();
}
return extendedState;
}
示例2: updateSelectedTabForeground
import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
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());
}
}
}
示例3: getExtendedState
import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
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
@SuppressWarnings("deprecation")
ComponentPeer peer = component.getPeer();
if (peer instanceof FramePeer) {
state = ((FramePeer)peer).getState();
}
}
}
return state;
}
示例4: addSettingsComponent
import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
public void addSettingsComponent(Component component) {
if (mySettingComponent == null) {
mySettingComponent = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
mySettingComponent.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
add(mySettingComponent, BorderLayout.WEST);
mySettingComponent.setOpaque(false);
if (!SystemInfo.isMacOSLion || UIUtil.isUnderDarcula()) {
mySettingComponent.setBorder(JBUI.Borders.emptyBottom(4));
}
}
mySettingComponent.add(component);
}
示例5: InlineProgressIndicator
import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
public InlineProgressIndicator(boolean compact, @NotNull TaskInfo processInfo) {
myCompact = compact;
myInfo = processInfo;
myCancelButton = new InplaceButton(new IconButton(processInfo.getCancelTooltipText(),
AllIcons.Process.Stop,
AllIcons.Process.StopHovered) {
}, new ActionListener() {
public void actionPerformed(final ActionEvent e) {
cancelRequest();
}
}).setFillBg(true);
myCancelButton.setVisible(myInfo.isCancellable());
myCancelButton.setOpaque(false);
myCancelButton.setToolTipText(processInfo.getCancelTooltipText());
myCancelButton.setFillBg(false);
myProgress = new JProgressBar(SwingConstants.HORIZONTAL);
myProgress.putClientProperty("JComponent.sizeVariant", "mini");
myComponent = new MyComponent(compact, myProcessName);
if (myCompact) {
myComponent.setOpaque(false);
myComponent.setLayout(new BorderLayout(2, 0));
final JPanel textAndProgress = new JPanel(new BorderLayout());
textAndProgress.setOpaque(false);
textAndProgress.add(myText, BorderLayout.CENTER);
final NonOpaquePanel progressWrapper = new NonOpaquePanel(new GridBagLayout());
progressWrapper.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0));
final GridBagConstraints c = new GridBagConstraints();
c.weightx = 1;
c.weighty = 1;
c.insets = new Insets(SystemInfo.isMacOSLion ? 1 : 0, 0, 1, myInfo.isCancellable() ? 0 : 4);
c.fill = GridBagConstraints.HORIZONTAL;
progressWrapper.add(myProgress, c);
textAndProgress.add(progressWrapper, BorderLayout.EAST);
myComponent.add(textAndProgress, BorderLayout.CENTER);
myComponent.add(myCancelButton, BorderLayout.EAST);
myComponent.setToolTipText(processInfo.getTitle() + ". " + IdeBundle.message("progress.text.clickToViewProgressWindow"));
} else {
myComponent.setLayout(new BorderLayout());
myProcessName.setText(processInfo.getTitle());
myComponent.add(myProcessName, BorderLayout.NORTH);
myProcessName.setForeground(UIUtil.getPanelBackground().brighter().brighter());
myProcessName.setBorder(new EmptyBorder(2, 2, 2, 2));
final NonOpaquePanel content = new NonOpaquePanel(new BorderLayout());
content.setBorder(new EmptyBorder(2, 2, 2, myInfo.isCancellable() ? 2 : 4));
myComponent.add(content, BorderLayout.CENTER);
final Wrapper cancelWrapper = new Wrapper(myCancelButton);
cancelWrapper.setOpaque(false);
cancelWrapper.setBorder(new EmptyBorder(0, 3, 0, 2));
content.add(cancelWrapper, BorderLayout.EAST);
content.add(myText, BorderLayout.NORTH);
content.add(myProgress, BorderLayout.CENTER);
content.add(myText2, BorderLayout.SOUTH);
myComponent.setBorder(new EmptyBorder(2, 2, 2, 2));
}
if (!myCompact) {
myProcessName.recomputeSize();
myText.recomputeSize();
myText2.recomputeSize();
}
}
示例6: isFullScreenSupportedInCurrentOS
import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
@Override
public boolean isFullScreenSupportedInCurrentOS() {
return SystemInfo.isMacOSLion || SystemInfo.isWindows || SystemInfo.isXWindow && X11UiUtil.isFullScreenSupported();
}