本文整理了Java中com.google.gwt.user.client.Window.open()
方法的一些代码示例,展示了Window.open()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.open()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Window
类名称:Window
方法名:open
[英]Opens a new browser window. The "name" and "features" arguments are specified here.
[中]打开一个新的浏览器窗口。“name”和“features”参数是here指定的。
代码示例来源:origin: kaaproject/kaa
/**
* Some browsers may not use given filename.
*/
public static void downloadJsonFile(String json, String filename) {
Window.open("data:application/octet-stream;"
+ "headers=Content-Disposition: attachment; filename=\""
+ filename + "\"," + json, "_self", "enabled");
}
代码示例来源:origin: libgdx/libgdx
@Override
public boolean openURI (String URI) {
if (config.openURLInNewWindow) {
Window.open(URI, "_blank", null);
} else {
Window.Location.assign(URI);
}
return true;
}
代码示例来源:origin: libgdx/libgdx
@Override
public boolean openURI (String URI) {
if (config.openURLInNewWindow) {
Window.open(URI, "_blank", null);
} else {
Window.Location.assign(URI);
}
return true;
}
代码示例来源:origin: kaaproject/kaa
@Override
public void onLogin() {
Window.open(Window.Location.getPath(), "_blank", "");
}
代码示例来源:origin: kaaproject/kaa
/**
* Export CTL schema.
*
* @param key the CTL export key
*/
public static void exportCtlSchema(String key) {
String getUrl = composeUrl(KAA_CTL_EXPORT_SERVLET_PATH, CTL_EXPORT_KEY_PARAMETER
+ "=" + URL.encodeQueryString(key));
String url = GWT.getModuleBaseURL() + getUrl;
Window.open(url, "_self", "enabled");
}
代码示例来源:origin: kaaproject/kaa
@Override
public void onClick(ClickEvent clickEvent) {
String url = Window.Location.getHref();
Window.open("/kaaAdmin/servlet/kaaConfigurationDownloadServlet?schemaId="
+ Utils.getSchemaIdFromUrl(url)
+ "&endGroupId=" + Utils.getEndpointGroupIdFromUrl(url),
"_blank", "status=0,toolbar=0,menubar=0,location=0");
}
});
代码示例来源:origin: kaaproject/kaa
/**
* Download the SDK.
*
* @param key the SDK key
*/
public static void downloadSdk(String key) {
String getUrl = composeUrl(KAA_SDK_SERVLET_PATH,
SDK_KEY_PARAMETER + "=" + URL.encodeQueryString(key));
String url = GWT.getModuleBaseURL() + getUrl;
Window.open(url, "_self", "enabled");
}
代码示例来源:origin: kaaproject/kaa
/**
* Download endpoint configuration.
*
* @param endpointKeyHash the endpoint key hash
*/
public static void downloadEndpointConfiguration(String endpointKeyHash) {
String getUrl = composeUrl(EP_CONF_SERVLET_PATH,
ENDPOINT_KEY_PARAMETER + "=" + URL.encodeQueryString(endpointKeyHash));
String url = GWT.getModuleBaseURL() + getUrl;
Window.open(url, "_self", "enabled");
}
代码示例来源:origin: kaaproject/kaa
/**
* Download record library.
*
* @param key the record library key
*/
public static void downloadRecordLibrary(String key) {
String getUrl = composeUrl(KAA_RECORD_LIBRARY_SERVLET_PATH, RECORD_KEY_PARAMETER
+ "=" + URL.encodeQueryString(key));
String url = GWT.getModuleBaseURL() + getUrl;
Window.open(url, "_self", "enabled");
}
代码示例来源:origin: kaaproject/kaa
/**
* Download endpoint profile.
*
* @param endpointKey the endpoint key
* @param type the type of an endpoint
*/
public static void downloadEndpointProfile(String endpointKey, ProfileType type) {
String getUrl = composeUrl(KAA_PROFILE_DOWNLOAD_SERVLET_PATH,
ENDPOINT_KEY_PARAMETER + "=" + URL.encodeQueryString(endpointKey),
PROFILE_TYPE_PARAMETER + "=" + URL.encodeQueryString(type.name()));
String url = GWT.getModuleBaseURL() + getUrl;
Window.open(url, "_self", "enabled");
}
代码示例来源:origin: kaaproject/kaa
/**
* Download user configuration.
*
* @param externalUId the external user identifier
* @param schemaVersion the configuration schema version
* @param appId the application identifier
*/
public static void downloadUserConfiguration(String externalUId, String schemaVersion,
String appId) {
String getUrl = composeUrl(KAA_USER_CONFIGURATION_SERVLET_PATH,
APPLICATION_ID_PARAMETER + "=" + URL.encodeQueryString(appId),
USER_EXTERNAL_ID_PARAMETER + "=" + URL.encodeQueryString(externalUId),
CONFIGURATION_SCHEMA_ID + "=" + URL.encodeQueryString(schemaVersion));
String url = GWT.getModuleBaseURL() + getUrl;
Window.open(url, "_self", "enabled");
}
代码示例来源:origin: com.ebmwebsourcing.petalsbpm/bpmn-plugins
@Override
public void onClick(ClickEvent event) {
Window.open("http://research.petalslink.org/display/petalsbpm", "_blank", "");
}
});
代码示例来源:origin: threerings/playn
/**
* @see playn.core.Platform#openURL(java.lang.String)
*/
@Override
public void openURL(String url) {
Window.open(url, "_blank", "");
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
public void viewDocumentById(String resourceId) {
final String url = getResourceUrl(resourceId);
if (url != null && !url.isEmpty()) {
Window.open(url, "_blank", "");
}
}
}
代码示例来源:origin: org.codehaus.sonar/sonar-gwt-api
public static void openRulePopup(final String ruleIdOrKey, final String htmlFeatures) {
String url = urlForRule(ruleIdOrKey, false);
Window.open(url, "rule", htmlFeatures);
}
}
代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui
public void onClick(ClickEvent event) {
String helpUrl = GWT.getHostPageBaseURL() + i18n.helpPath();
Window.open(helpUrl, "", "");
}
});
代码示例来源:origin: org.n52.sensorweb/sensorwebclient-ui
public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) {
String helpUrl = GWT.getHostPageBaseURL() + i18n.helpPath();
Window.open(helpUrl, "", "");
}
});
代码示例来源:origin: org.kie.guvnor/guvnor-m2repo-editor-client
public void update(int index,
JarListPageRow row,
String value) {
Window.open(getFileDownloadURL(row.getPath()),
"downloading",
"resizable=no,scrollbars=yes,status=no");
}
});
代码示例来源:origin: org.kuali.student.core/ks-common-ui
@Override
public void onSuccess(String result) {
// On success get documentID back from GWT Servlet//
// We need to get the base url and strip the gwt module name .
String baseUrl = GWT.getHostPageBaseURL();
baseUrl = baseUrl.replaceFirst(GWT.getModuleName() + "/", "");
KSBlockingProgressIndicator.removeTask(loadDataTask);
Window.open(baseUrl + "exportDownloadHTTPServlet?exportId="+result + "&format=" + format, "", "");
}
代码示例来源:origin: org.geomajas/geomajas-project-deskmanager-gwt
public void onRecordDoubleClick(RecordDoubleClickEvent event) {
String id = event.getRecord().getAttribute(FLD_GEODESKID);
//FIXME: preview URL
String url = GeodeskUrlUtil.createPreviewUrl(id);
com.google.gwt.user.client.Window.open(url, "_blank", null);
}
});
内容来源于网络,如有侵权,请联系作者删除!