本文整理了Java中net.sf.okapi.common.Util.openURL()
方法的一些代码示例,展示了Util.openURL()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.openURL()
方法的具体详情如下:
包路径:net.sf.okapi.common.Util
类名称:Util
方法名:openURL
[英]Opens the specified page in a web browser (Java 1.5 compatible).
This is based on the public domain class BareBonesBrowserLaunch from Dem Pilafian at (www.centerkey.com/java/browser)
[中]在web浏览器中打开指定页面(兼容Java 1.5)。
这是基于Dem Pilafian的公共域类BareBonesBrowserLaunch的({www.centerkey.com/java/browser)
代码示例来源:origin: net.sf.okapi/okapi-core
/**
* Opens a given topic of the OkapiWiki.
* @param topic the title of the topic/page.
*/
public static void openWikiTopic (String topic) {
try {
// Resolve spaces
topic = topic.replace(' ', '_');
//TODO: get the base URL from a properties file
Util.openURL(new URL(String.format("http://okapiframework.org/wiki/index.php?title=%s", topic)).toString());
}
catch ( MalformedURLException e ) {
e.printStackTrace();
}
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-termextraction
@Override
protected Event handleEndBatch (Event event) {
extractor.completeExtraction();
String finalPath = Util.fillRootDirectoryVariable(params.getOutputPath(), rootDir);
LOGGER.info("Output: {}", finalPath);
LOGGER.info("Candidate terms found = {}", extractor.getTerms().size());
if ( params.getAutoOpen() ) {
Util.openURL((new File(finalPath)).getAbsolutePath());
}
return event;
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-translationcomparison
@Override
protected Event handleEndBatch (Event event) {
matcher = null;
if ( writer != null ) {
writer.close();
writer = null;
}
if ( prnWriter != null ) {
prnWriter.close();
prnWriter = null;
}
if ( tmx != null ) {
tmx.writeEndDocument();
tmx.close();
tmx = null;
}
Runtime.getRuntime().gc();
if ( params.isAutoOpen() && ( pathToOpen != null )) {
Util.openURL((new File(pathToOpen)).getAbsolutePath());
}
return event;
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-gttbatchtranslation
Util.openURL("http://translate.google.com/toolkit/workbench?did="+docId);
代码示例来源:origin: net.sf.okapi.lib/okapi-lib-verification-ui
private void generateReport () {
try {
startWaiting("Generating report...");
String rootDir = (qcsPath==null ? null : Util.getDirectoryName(qcsPath));
session.generateReport(rootDir);
String finalPath = Util.fillRootDirectoryVariable(session.getParameters().getOutputPath(), rootDir);
if ( session.getParameters().getAutoOpen() ) {
Util.openURL((new File(finalPath)).getAbsolutePath());
}
}
catch ( Throwable e ) {
Dialogs.showError(shell, "Error while generating report.\n"+e.getMessage(), null);
}
finally {
stopWaiting();
}
}
代码示例来源:origin: net.sf.okapi.steps/okapi-step-rainbowkit
Util.openURL("file:///"+reportPath);
内容来源于网络,如有侵权,请联系作者删除!