本文整理汇总了Java中com.intellij.openapi.util.SystemInfo.isMacOSSnowLeopard方法的典型用法代码示例。如果您正苦于以下问题:Java SystemInfo.isMacOSSnowLeopard方法的具体用法?Java SystemInfo.isMacOSSnowLeopard怎么用?Java SystemInfo.isMacOSSnowLeopard使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.util.SystemInfo
的用法示例。
在下文中一共展示了SystemInfo.isMacOSSnowLeopard方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: add
import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
public void add(final IdeFrame frame) {
if (!Registry.is("actionSystem.mouseGesturesEnabled")) return;
if (SystemInfo.isMacOSSnowLeopard) {
try {
if (myListeners.containsKey(frame)) {
remove(frame);
}
Object listener = new MacGestureAdapter(this, frame);
myListeners.put(frame, listener);
}
catch (Throwable e) {
LOG.debug(e);
}
}
}
示例2: remove
import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
public void remove(IdeFrame frame) {
if (!Registry.is("actionSystem.mouseGesturesEnabled")) return;
if (SystemInfo.isMacOSSnowLeopard) {
try {
Object listener = myListeners.get(frame);
JComponent cmp = frame.getComponent();
myListeners.remove(frame);
if (listener != null && cmp != null && cmp.isShowing()) {
((MacGestureAdapter)listener).remove(cmp);
}
}
catch (Throwable e) {
LOG.debug(e);
}
}
}
示例3: adjustFocusTraversal
import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
public static void adjustFocusTraversal(@NotNull Disposable disposable) {
if (!SystemInfo.isMacOSSnowLeopard) return;
final AWTEventListener listener = new AWTEventListener() {
@Override
public void eventDispatched(AWTEvent event) {
if (event instanceof KeyEvent
&& ((KeyEvent)event).getKeyCode() == KeyEvent.VK_TAB
&& (!(event.getSource() instanceof JTextComponent))
&& (!(event.getSource() instanceof JList))
&& !isFullKeyboardAccessEnabled())
((KeyEvent)event).consume();
}
};
Disposer.register(disposable, new Disposable() {
@Override
public void dispose() {
Toolkit.getDefaultToolkit().removeAWTEventListener(listener);
}
});
Toolkit.getDefaultToolkit().addAWTEventListener(listener, AWTEvent.KEY_EVENT_MASK);
}
示例4: getDefaultFontName
import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
@NotNull
private static String getDefaultFontName() {
if (SystemInfo.isMacOSSnowLeopard) return "Menlo";
if (SystemInfo.isXWindow && !GraphicsEnvironment.isHeadless()) {
for (Font font : GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts()) {
if ("DejaVu Sans Mono".equals(font.getName())) {
return font.getFontName();
}
}
}
return "Monospaced";
}
示例5: isFullKeyboardAccessEnabled
import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
public static boolean isFullKeyboardAccessEnabled() {
if (!SystemInfo.isMacOSSnowLeopard) return false;
final AtomicBoolean result = new AtomicBoolean();
Foundation.executeOnMainThread(new Runnable() {
@Override
public void run() {
result.set(invoke(invoke("NSApplication", "sharedApplication"), "isFullKeyboardAccessEnabled").intValue() == 1);
}
}, true, true);
return result.get();
}
示例6: isOpenCommandSupportArgs
import com.intellij.openapi.util.SystemInfo; //导入方法依赖的package包/类
public static boolean isOpenCommandSupportArgs() {
return SystemInfo.isMacOSSnowLeopard;
}