org.jdesktop.swingx.util.OS.isLinux()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(173)

本文整理了Java中org.jdesktop.swingx.util.OS.isLinux()方法的一些代码示例,展示了OS.isLinux()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OS.isLinux()方法的具体详情如下:
包路径:org.jdesktop.swingx.util.OS
类名称:OS
方法名:isLinux

OS.isLinux介绍

暂无

代码示例

代码示例来源:origin: org.swinglabs.swingx/swingx-all

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected boolean isSystemAddon() {
  6. return OS.isLinux();
  7. }

代码示例来源:origin: org.swinglabs.swingx/swingx-plaf

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected boolean isSystemAddon() {
  6. return OS.isLinux();
  7. }

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-plaf

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected boolean isSystemAddon() {
  6. return OS.isLinux();
  7. }

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

  1. /**
  2. * Gets the addon best suited for the operating system where the
  3. * virtual machine is running.
  4. *
  5. * @return the addon matching the native operating system platform.
  6. */
  7. public static String getSystemAddonClassName() {
  8. String addon = WindowsClassicLookAndFeelAddons.class.getName();
  9. if (OS.isMacOSX()) {
  10. addon = MacOSXLookAndFeelAddons.class.getName();
  11. } else if (OS.isWindows()) {
  12. // see whether of not visual styles are used
  13. if (OS.isUsingWindowsVisualStyles()) {
  14. addon = WindowsLookAndFeelAddons.class.getName();
  15. } else {
  16. addon = WindowsClassicLookAndFeelAddons.class.getName();
  17. }
  18. } else if (OS.isLinux()) {
  19. addon = LinuxLookAndFeelAddons.class.getName();
  20. }
  21. return addon;
  22. }

代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-common

  1. /**
  2. * Issue 1260-swingx: NPE in static initializer of OS
  3. */
  4. @Test
  5. public void testOSNPE() {
  6. String oldProperty = System.getProperty("os.name");
  7. try {
  8. if (oldProperty != null) {
  9. System.clearProperty("os.name");
  10. assertNull(System.getProperty("os.name"));
  11. }
  12. OS.isLinux();
  13. } finally {
  14. if (oldProperty != null) {
  15. System.setProperty("os.name", oldProperty);
  16. assertEquals(oldProperty, System.getProperty("os.name"));
  17. }
  18. }
  19. }

相关文章