private String getScriptUrl() { final String scriptUrl = GWT.getModuleBaseForStaticFiles() + "native.js"; return scriptUrl; } }
/** * 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); }
/** * 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); }
/** * 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; } }
/** * 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"); } }
/** * 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"); } }
new ImageRef(GWT.getModuleBaseForStaticFiles() + sImageName);
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); } }
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); } } }
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); } } }