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


Java BareBonesBrowserLaunch类代码示例

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


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

示例1: main

import com.centerkey.utils.BareBonesBrowserLaunch; //导入依赖的package包/类
public static void main(String... args) {
  // Create a one-time task that will open a url to config page in a browser
  // after the application has been given a couple of seconds to start up.
  new Timer().schedule(new TimerTask() {
    @Override
    public void run() {
      LOG.info("============= Open URL in Browser");
      // Open a Browser window for the user
      BareBonesBrowserLaunch.openURL("http://localhost:8082/index.html");
      LOG.info("============= After Open URL in Browser");
    }
  }, 9000);

  
  LOG.info("============= Call Fat Jar Router Main");
  // Call Fat Jar Router main last because it never returns
  FatJarRouter.main(args);
  LOG.info("============= Returned from Fat Jar Router Main");
}
 
开发者ID:mitre,项目名称:ptmatchadapter,代码行数:20,代码来源:PtmatchAdapter.java

示例2: main

import com.centerkey.utils.BareBonesBrowserLaunch; //导入依赖的package包/类
/**
 * Creates stand-alone dialog box for testing only.
 *
 * @param args
 * @throws Exception
 */
public static void main(String args[]) throws Exception {
    JFrame f = new JFrame();

    HyperlinkActivatedListener listener = new HyperlinkActivatedListener() {
        private static final long serialVersionUID = -225585129296632961L;

        public void followHyperlink(URL url, String target) {
            BareBonesBrowserLaunch.openURL(url.toString());
        }
    };

    StartupDialog startupDialog = new StartupDialog(f,
        Jets3tProperties.getInstance(Constants.JETS3T_PROPERTIES_FILENAME), listener);
    startupDialog.setVisible(true);
    ProviderCredentials credentials = startupDialog.getProviderCredentials();
    startupDialog.dispose();

    if (credentials != null) {
        System.out.println("Credentials: " + credentials.getLogString());
    } else {
        System.out.println("Credentials: null");
    }

    f.dispose();
}
 
开发者ID:guptavishal,项目名称:jets3t-aws-roles,代码行数:32,代码来源:StartupDialog.java

示例3: mousePressed

import com.centerkey.utils.BareBonesBrowserLaunch; //导入依赖的package包/类
@Override
    public void mousePressed() {
        mousePressedNow = true;

        if ((chosenRecipe != null) && (mouseX > 41 && mouseX < 661 && mouseY > urlYbegin && mouseY < urlYend)) {
//            browserLauncher.openURLinBrowser("Chrome",chosenRecipe.getRecipeUrl());

            if (isMac) {
                BareBonesBrowserLaunch.openURL(chosenRecipe.getRecipeUrl());
            } else {
                browserLauncher.openURLinBrowser(chosenRecipe.getRecipeUrl());
            }
        }

    }
 
开发者ID:aysenurbilgin,项目名称:cww_framework,代码行数:16,代码来源:FatSecretSketch.java

示例4: main

import com.centerkey.utils.BareBonesBrowserLaunch; //导入依赖的package包/类
/**
     * Creates stand-alone dialog box for testing only.
     *
     * @param args
     * @throws Exception
     */
    public static void main(String args[]) throws Exception {
//        String algorithm = Jets3tProperties.getInstance(Constants.JETS3T_PROPERTIES_FILENAME)
//            .getStringProperty("crypto.algorithm", "PBEWithMD5AndDES");
//        File file = new File("/Users/jmurty/Desktop/test.enc");
//        AWSCredentials awsCredentialsTest = new AWSCredentials("a", "b");
//        awsCredentialsTest.save("please", file, algorithm);
//        System.err.println("Saved: " + awsCredentialsTest);
//        System.err.println("Loaded: " + AWSCredentials.load("please", file));
//        if (true)
//            return;
//
        JFrame f = new JFrame();

        HyperlinkActivatedListener listener = new HyperlinkActivatedListener() {
            private static final long serialVersionUID = -225585129296632961L;

            public void followHyperlink(URL url, String target) {
                BareBonesBrowserLaunch.openURL(url.toString());
            }
        };

        StartupDialog startupDialog = new StartupDialog(f,
            Jets3tProperties.getInstance(Constants.JETS3T_PROPERTIES_FILENAME), listener);
        startupDialog.setVisible(true);
        AWSCredentials awsCredentials = startupDialog.getAWSCredentials();
        startupDialog.dispose();

        if (awsCredentials != null) {
            System.out.println("AWS Credentials: " + awsCredentials.getLogString());
        } else {
            System.out.println("AWS Credentials: null");
        }

        f.dispose();
    }
 
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:42,代码来源:StartupDialog.java

示例5: actionPerformed

import com.centerkey.utils.BareBonesBrowserLaunch; //导入依赖的package包/类
public void actionPerformed(ActionEvent e) {
	// 今すぐ更新 check
	if(e.getActionCommand() == "CheckNow") {
		if(!UpdateChecker.isRunning()) {
			txtfldLatestVersion.setForeground(Color.black);
			UpdateChecker.addListener(this);
			UpdateChecker.startCheckForUpdates(txtfldXMLURL.getText());
			btnCheckNow.setEnabled(false);
		}
	}
	// ブラウザでダウンロード
	else if(e.getActionCommand() == "OpenDownloadURL") {
		BareBonesBrowserLaunch.openURL(txtfldDownloadURL.getText());
	}
	// Installer Download
	else if(e.getActionCommand() == "OpenInstallerURL") {
		BareBonesBrowserLaunch.openURL(txtfldWindowsInstallerURL.getText());
	}
	// 保存
	else if(e.getActionCommand() == "Save") {
		NullpoMinoSwing.propGlobal.setProperty("updatechecker.enable", chkboxEnable.isSelected());
		NullpoMinoSwing.propGlobal.setProperty("updatechecker.url", txtfldXMLURL.getText());
		NullpoMinoSwing.propGlobal.setProperty("updatechecker.startupMax", NullpoMinoSwing.getIntTextField(20, txtfldStartupMax));
		NullpoMinoSwing.saveConfig();
	}
	// 閉じる
	else if(e.getActionCommand() == "Close") {
		this.setVisible(false);
	}
}
 
开发者ID:PoochyEXE,项目名称:nullpomino,代码行数:31,代码来源:UpdateCheckFrame.java

示例6: help

import com.centerkey.utils.BareBonesBrowserLaunch; //导入依赖的package包/类
public void help() {
	BareBonesBrowserLaunch.openURL(HELP_URL);
}
 
开发者ID:cyriux,项目名称:mpcmaid,代码行数:4,代码来源:MainFrame.java

示例7: main

import com.centerkey.utils.BareBonesBrowserLaunch; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
    for (String url : args) {
        BareBonesBrowserLaunch.browse(url);
    }
}
 
开发者ID:groovenauts,项目名称:jmeter_oauth_plugin,代码行数:6,代码来源:Get.java

示例8: followHyperlink

import com.centerkey.utils.BareBonesBrowserLaunch; //导入依赖的package包/类
/**
 * Follows hyperlinks clicked on by a user. This is achieved differently depending on whether
 * Cockpit is running as an applet or as a stand-alone application:
 * <ul>
 * <li>Application: Detects the default browser application for the user's system (using
 * <tt>BareBonesBrowserLaunch</tt>) and opens the link as a new window in that browser</li>
 * <li>Applet: Opens the link in the current browser using the applet's context</li>
 * </ul>
 *
 * @param url
 * the url to open
 * @param target
 * the target pane to open the url in, eg "_blank". This may be null.
 */
public void followHyperlink(URL url, String target) {
    if (!isStandAloneApplication) {
        if (target == null) {
            getAppletContext().showDocument(url);
        } else {
            getAppletContext().showDocument(url, target);
        }
    } else {
        BareBonesBrowserLaunch.openURL(url.toString());
    }
}
 
开发者ID:glycoinfo,项目名称:eurocarbdb,代码行数:26,代码来源:Cockpit.java

示例9: followHyperlink

import com.centerkey.utils.BareBonesBrowserLaunch; //导入依赖的package包/类
/**
 * Follows hyperlinks clicked on by a user. This is achieved differently depending on whether
 * Cockpit is running as an applet or as a stand-alone application:
 * <ul>
 * <li>Application: Detects the default browser application for the user's system (using
 * <tt>BareBonesBrowserLaunch</tt>) and opens the link as a new window in that browser</li>
 * <li>Applet: Opens the link in the current browser using the applet's context</li>
 * </ul>
 *
 * @param url
 * the url to open
 * @param target
 * the target pane to open the url in, eg "_blank". This may be null.
 */
public void followHyperlink(URL url, String target) {
    if (isRunningAsApplet) {
        if (target == null) {
            getAppletContext().showDocument(url);
        } else {
            getAppletContext().showDocument(url, target);
        }
    } else {
        BareBonesBrowserLaunch.openURL(url.toString());
    }
}
 
开发者ID:guptavishal,项目名称:jets3t-aws-roles,代码行数:26,代码来源:Uploader.java


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