本文整理汇总了Java中com.centerkey.utils.BareBonesBrowserLaunch.openURL方法的典型用法代码示例。如果您正苦于以下问题:Java BareBonesBrowserLaunch.openURL方法的具体用法?Java BareBonesBrowserLaunch.openURL怎么用?Java BareBonesBrowserLaunch.openURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.centerkey.utils.BareBonesBrowserLaunch
的用法示例。
在下文中一共展示了BareBonesBrowserLaunch.openURL方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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();
}
示例2: 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());
}
}
}
示例3: 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();
}
示例4: 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);
}
}
示例5: help
import com.centerkey.utils.BareBonesBrowserLaunch; //导入方法依赖的package包/类
public void help() {
BareBonesBrowserLaunch.openURL(HELP_URL);
}
示例6: 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());
}
}
示例7: 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());
}
}