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

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

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

OS.isMacOSX介绍

暂无

代码示例

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

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

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

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

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

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

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

  1. /**
  2. * Overridden for performance reasons.
  3. * See the <a href="#override">Implementation Note</a>
  4. * for more information.
  5. */
  6. @Override
  7. public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {
  8. if (OS.isMacOSX()) {
  9. super.firePropertyChange(propertyName, oldValue, newValue);
  10. }
  11. }
  12. }

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

  1. /**
  2. * Overridden for performance reasons.
  3. * See the <a href="#override">Implementation Note</a>
  4. * for more information.
  5. */
  6. @Override
  7. public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {
  8. if (OS.isMacOSX()) {
  9. super.firePropertyChange(propertyName, oldValue, newValue);
  10. }
  11. }
  12. }

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

  1. /**
  2. * Overridden for performance reasons.
  3. * See the <a href="#override">Implementation Note</a>
  4. * for more information.
  5. */
  6. @Override
  7. public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {
  8. if (OS.isMacOSX()) {
  9. super.firePropertyChange(propertyName, oldValue, newValue);
  10. }
  11. }
  12. }

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

  1. /**
  2. * Overridden for performance reasons.
  3. * See the <a href="#override">Implementation Note</a>
  4. * for more information.
  5. */
  6. @Override
  7. public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {
  8. if (OS.isMacOSX()) {
  9. super.firePropertyChange(propertyName, oldValue, newValue);
  10. }
  11. }
  12. }

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

  1. /**
  2. * @return <code>true</code> if we run Leopard and the Mac Look And Feel.
  3. */
  4. public static boolean isNativeSearchFieldSupported() {
  5. try {
  6. String versionString = System.getProperty("os.version");
  7. // Mac versions have the format 10.x or 10.x.x
  8. if (versionString.length() < 4) {
  9. return false;
  10. }
  11. // only the part 10.x is important
  12. versionString = versionString.substring(0, 4);
  13. return OS.isMacOSX() && Float.parseFloat(versionString) >= 10.5
  14. && UIManager.getLookAndFeel().getName().equals("Mac OS X");
  15. } catch (Exception e) {
  16. // in case the os.version cannot be parsed, we are surely not
  17. // running mac os x.
  18. return false;
  19. }
  20. }

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

  1. /**
  2. * @return <code>true</code> if we run Leopard and the Mac Look And Feel.
  3. */
  4. public static boolean isNativeSearchFieldSupported() {
  5. try {
  6. String versionString = System.getProperty("os.version");
  7. // Mac versions have the format 10.x or 10.x.x
  8. if (versionString.length() < 4) {
  9. return false;
  10. }
  11. // only the part 10.x is important
  12. versionString = versionString.substring(0, 4);
  13. return OS.isMacOSX() && Float.parseFloat(versionString) >= 10.5
  14. && UIManager.getLookAndFeel().getName().equals("Mac OS X");
  15. } catch (Exception e) {
  16. // in case the os.version cannot be parsed, we are surely not
  17. // running mac os x.
  18. return false;
  19. }
  20. }

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

  1. /**
  2. * @return <code>true</code> if we run Leopard and the Mac Look And Feel.
  3. */
  4. public static boolean isNativeSearchFieldSupported() {
  5. try {
  6. String versionString = System.getProperty("os.version");
  7. // Mac versions have the format 10.x or 10.x.x
  8. if (versionString.length() < 4) {
  9. return false;
  10. }
  11. // only the part 10.x is important
  12. versionString = versionString.substring(0, 4);
  13. return OS.isMacOSX() && Float.parseFloat(versionString) >= 10.5
  14. && UIManager.getLookAndFeel().getName().equals("Mac OS X");
  15. } catch (Exception e) {
  16. // in case the os.version cannot be parsed, we are surely not
  17. // running mac os x.
  18. return false;
  19. }
  20. }

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

  1. /**
  2. * @return <code>true</code> if we run Leopard and the Mac Look And Feel.
  3. */
  4. public static boolean isNativeSearchFieldSupported() {
  5. try {
  6. String versionString = System.getProperty("os.version");
  7. // Mac versions have the format 10.x or 10.x.x
  8. if (versionString.length() < 4) {
  9. return false;
  10. }
  11. // only the part 10.x is important
  12. versionString = versionString.substring(0, 4);
  13. return OS.isMacOSX() && Float.parseFloat(versionString) >= 10.5
  14. && UIManager.getLookAndFeel().getName().equals("Mac OS X");
  15. } catch (Exception e) {
  16. // in case the os.version cannot be parsed, we are surely not
  17. // running mac os x.
  18. return false;
  19. }
  20. }

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

  1. /**
  2. * Overridden for performance reasons.
  3. * See the <a href="#override">Implementation Note</a>
  4. * for more information.
  5. */
  6. @Override
  7. protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
  8. if (OS.isMacOSX()) {
  9. super.firePropertyChange(propertyName, oldValue, newValue);
  10. } else {
  11. // Strings get interned...
  12. if ("document".equals(propertyName)) {
  13. super.firePropertyChange(propertyName, oldValue, newValue);
  14. }
  15. }
  16. }

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

  1. /**
  2. * Overridden for performance reasons.
  3. * See the <a href="#override">Implementation Note</a>
  4. * for more information.
  5. */
  6. @Override
  7. protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
  8. if (OS.isMacOSX()) {
  9. super.firePropertyChange(propertyName, oldValue, newValue);
  10. } else {
  11. // Strings get interned...
  12. if ("document".equals(propertyName)) {
  13. super.firePropertyChange(propertyName, oldValue, newValue);
  14. }
  15. }
  16. }

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

  1. /**
  2. * Overridden for performance reasons.
  3. * See the <a href="#override">Implementation Note</a>
  4. * for more information.
  5. */
  6. @Override
  7. protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
  8. if (OS.isMacOSX()) {
  9. super.firePropertyChange(propertyName, oldValue, newValue);
  10. } else {
  11. // Strings get interned...
  12. if ("document".equals(propertyName)) {
  13. super.firePropertyChange(propertyName, oldValue, newValue);
  14. }
  15. }
  16. }

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

  1. /**
  2. * Overridden for performance reasons.
  3. * See the <a href="#override">Implementation Note</a>
  4. * for more information.
  5. */
  6. @Override
  7. protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
  8. if (OS.isMacOSX()) {
  9. super.firePropertyChange(propertyName, oldValue, newValue);
  10. } else {
  11. // Strings get interned...
  12. if ("document".equals(propertyName)) {
  13. super.firePropertyChange(propertyName, oldValue, newValue);
  14. }
  15. }
  16. }

代码示例来源: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: com.haulmont.thirdparty/swingx-core

  1. if(OS.isMacOSX() && colorwell != null) {
  2. Insets ins = new Insets(5,5,5,5);
  3. GraphicsUtilities.tileStretchPaint(g, this, colorwell, ins);

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

  1. if(OS.isMacOSX() && colorwell != null) {
  2. Insets ins = new Insets(5,5,5,5);
  3. ColorUtil.tileStretchPaint(g, this, colorwell, ins);

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

  1. if(OS.isMacOSX() && colorwell != null) {
  2. Insets ins = new Insets(5,5,5,5);
  3. GraphicsUtilities.tileStretchPaint(g, this, colorwell, ins);

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

  1. if(OS.isMacOSX() && colorwell != null) {
  2. Insets ins = new Insets(5,5,5,5);
  3. GraphicsUtilities.tileStretchPaint(g, this, colorwell, ins);

相关文章