本文整理了Java中com.google.gwt.core.client.GWT.getModuleBaseForStaticFiles()
方法的一些代码示例,展示了GWT.getModuleBaseForStaticFiles()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GWT.getModuleBaseForStaticFiles()
方法的具体详情如下:
包路径:com.google.gwt.core.client.GWT
类名称:GWT
方法名:getModuleBaseForStaticFiles
[英]Gets the URL prefix that should be prepended to URLs that point to static files generated by the GWT compiler, such as files in the module's public path.
Normally this will be the same value as #getModuleBaseURL, but may be different when a GWT app is configured to get its static resources from a different server.
[中]获取URL前缀,该前缀应在指向GWT编译器生成的静态文件(例如模块公共路径中的文件)的URL前面。
通常,该值与#getModuleBaseURL值相同,但当GWT应用程序配置为从不同服务器获取其静态资源时,该值可能不同。
代码示例来源:origin: errai/errai
private String getScriptUrl() {
final String scriptUrl = GWT.getModuleBaseForStaticFiles() + "native.js";
return scriptUrl;
}
}
代码示例来源:origin: fr.putnami.pwt/pwt
/**
* Instantiates a new css link.
*
* @param href the link of the Css
* @param precedence the css, lower is the precedence value, higher is the priority.
*/
public CssLink(String href, int precedence) {
super();
this.precedence = precedence;
this.link.setRel("stylesheet");
this.link.setHref(GWT.getModuleBaseForStaticFiles() + href);
}
代码示例来源:origin: Putnami/putnami-web-toolkit
/**
* Instantiates a new css link.
*
* @param href the link of the Css
* @param precedence the css, lower is the precedence value, higher is the priority.
*/
public CssLink(String href, int precedence) {
super();
this.precedence = precedence;
this.link.setRel("stylesheet");
this.link.setHref(GWT.getModuleBaseForStaticFiles() + href);
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-api
/**
* Returns {@link Image} widget.
*
* @return {@link Image} widget
*/
@Nullable
public Image getImage() {
if (sourcePath != null) {
return new Image(GWT.getModuleBaseForStaticFiles() + sourcePath);
} else if (imageResource != null) {
return new Image(imageResource);
} else {
return null;
}
}
代码示例来源:origin: fr.putnami.pwt/pwt
/**
* Ensure respond js script element.
*/
private void ensureRespondJsScriptElement() {
if (this.respondJsScript == null) {
this.respondJsScript = Document.get().createScriptElement();
this.respondJsScript.setSrc(GWT.getModuleBaseForStaticFiles() + DefaultIE8ThemeController.RESPOND_JS_LOCATION);
this.respondJsScript.setType("text/javascript");
}
}
代码示例来源:origin: Putnami/putnami-web-toolkit
/**
* Ensure respond js script element.
*/
private void ensureRespondJsScriptElement() {
if (this.respondJsScript == null) {
this.respondJsScript = Document.get().createScriptElement();
this.respondJsScript.setSrc(GWT.getModuleBaseForStaticFiles() + DefaultIE8ThemeController.RESPOND_JS_LOCATION);
this.respondJsScript.setType("text/javascript");
}
}
代码示例来源:origin: de.esoco/gewt
new ImageRef(GWT.getModuleBaseForStaticFiles() +
sImageName);
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
public FontAwesomeInjector() {
LinkElement link = Document.get().createLinkElement();
link.setRel("stylesheet");
link.setHref(GWT.getModuleBaseForStaticFiles() + "font-awesome-4.5.0/css/font-awesome.min.css");
Document.get().getHead().appendChild(link);
}
}
代码示例来源:origin: org.opennms.features/vaadin-node-maps
private void initializeIcons() {
if (m_icons == null) {
m_icons = new HashMap<String, Icon>();
for (final String severity : new String[]{"Normal", "Warning", "Minor", "Major", "Critical"}) {
IconOptions options = new IconOptions();
options.setIconSize(new Point(25, 41));
options.setIconAnchor(new Point(12, 41));
options.setPopupAnchor(new Point(1, -34));
options.setShadowUrl(new Point(41, 41));
String basePath = GWT.getModuleBaseForStaticFiles() + "images/";
if (isRetina()) {
options.setIconUrl(basePath + severity + "@2x.png");
} else {
options.setIconUrl(basePath + severity + ".png");
}
Icon icon = new Icon(options);
m_icons.put(severity, icon);
}
}
}
代码示例来源:origin: OpenNMS/opennms
private void initializeIcons() {
if (m_icons == null) {
m_icons = new HashMap<String, Icon>();
for (final String severity : new String[]{"Normal", "Warning", "Minor", "Major", "Critical"}) {
IconOptions options = new IconOptions();
options.setIconSize(new Point(25, 41));
options.setIconAnchor(new Point(12, 41));
options.setPopupAnchor(new Point(1, -34));
options.setShadowUrl(new Point(41, 41));
String basePath = GWT.getModuleBaseForStaticFiles() + "images/";
if (isRetina()) {
options.setIconUrl(basePath + severity + "@2x.png");
} else {
options.setIconUrl(basePath + severity + ".png");
}
Icon icon = new Icon(options);
m_icons.put(severity, icon);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!