当前位置: 首页>>代码示例>>Java>>正文


Java UnsupportedOperatingSystemException类代码示例

本文整理汇总了Java中edu.stanford.ejalbert.exception.UnsupportedOperatingSystemException的典型用法代码示例。如果您正苦于以下问题:Java UnsupportedOperatingSystemException类的具体用法?Java UnsupportedOperatingSystemException怎么用?Java UnsupportedOperatingSystemException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


UnsupportedOperatingSystemException类属于edu.stanford.ejalbert.exception包,在下文中一共展示了UnsupportedOperatingSystemException类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: OSMCreditPanel

import edu.stanford.ejalbert.exception.UnsupportedOperatingSystemException; //导入依赖的package包/类
/**
 * Konstruktor
 */
public OSMCreditPanel() {
         
   super(new FlowLayout(FlowLayout.CENTER));
   JLabel lab = new JLabel("Map data \u00a9 ");
   lab.setFont(font);
   lab.setForeground(new Color(0x505050));
   add(lab);
             
   lab = new JLabel("OpenStreetMap");
   lab.setCursor(new Cursor(Cursor.HAND_CURSOR));
   Map<TextAttribute, Integer> fontAttr = new HashMap<>();
   fontAttr.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);
   lab.setFont(font.deriveFont(fontAttr));
   lab.setForeground(new Color(0x330066));
   add(lab);
             
   lab.addMouseListener(new MouseAdapter() {
     @Override
     public void mouseClicked(MouseEvent e) {
       try {
          new BrowserLauncher().openURLinBrowser("http://www.openstreetmap.org/copyright");
       }  catch (BrowserLaunchingInitializingException | UnsupportedOperatingSystemException ex) {
          System.err.println(ex);
       }
     }
   });                
             
   lab = new JLabel(" contributors");
   lab.setFont(font);
   lab.setForeground(new Color(0x505050));
   add(lab);                
             
   setBackground(new Color(210, 210, 210, 170));
   setOpaque(true);
   setPreferredSize(new Dimension(270, 24));            

         
}
 
开发者ID:makaw,项目名称:somado,代码行数:42,代码来源:OSMCreditPanel.java

示例2: getLauncher

import edu.stanford.ejalbert.exception.UnsupportedOperatingSystemException; //导入依赖的package包/类
/**
 * Return the BrowserLauncher instance
 * @return BrowserLauncher instance
 */
static edu.stanford.ejalbert.BrowserLauncher getLauncher() {
    if (_launcher == null) {
        boolean hackMRJ = false;
        if (SystemUtils.IS_OS_MAC_OSX) {
            // Circumvent BrowserLauncher NPE when running under Oracle 1.7u4 (and later ???) release for Mac OS X
            if (System.getProperty(PROP_MRJ_VERSION) == null) {
                hackMRJ = true;
                System.setProperty(PROP_MRJ_VERSION, "9999.999");
                _logger.debug("Probably running Oracle JVM under Mac OS X, faking missing 'mrj.version' system property.");
            }
        }
        try {
            final LoggerAdapter loggerAdapter = new LoggerAdapter();

            _launcher = new edu.stanford.ejalbert.BrowserLauncher(loggerAdapter, loggerAdapter);

            // Refresh the system property at startup:
            refreshBrowserPref();

        } catch (UnsupportedOperatingSystemException uose) {
            _logger.warn("Cannot initialize browser launcher : ", uose);
        } catch (BrowserLaunchingInitializingException bie) {
            _logger.warn("Cannot initialize browser launcher : ", bie);
        } finally {
            if (hackMRJ) {
                // Circumvent BrowserLauncher NPE when running under Oracle 1.7u4 (and later ???) release for Mac OS X
                System.clearProperty(PROP_MRJ_VERSION);
            }
        }
    }
    return _launcher;
}
 
开发者ID:JMMC-OpenDev,项目名称:jMCS,代码行数:37,代码来源:BrowserLauncher.java


注:本文中的edu.stanford.ejalbert.exception.UnsupportedOperatingSystemException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。