List of usage examples for com.google.gwt.core.ext.linker StylesheetReference getSrc
public final String getSrc()
src attribute of the resource. From source file:com.ait.toolkit.flash.linker.InjectionUtil.java
License:Open Source License
/** * Installs stylesheets and scripts.//from w w w.ja v a 2s. c om */ public static StringBuffer injectResources(StringBuffer selectionScript, ArtifactSet artifacts) { // Add external dependencies int startPos = selectionScript.indexOf("// __MODULE_STYLES_END__"); if (startPos != -1) { for (StylesheetReference resource : artifacts.find(StylesheetReference.class)) { String text = generateStylesheetInjector(resource.getSrc()); selectionScript.insert(startPos, text); startPos += text.length(); } } startPos = selectionScript.indexOf("// __MODULE_SCRIPTS_END__"); if (startPos != -1) { for (ScriptReference resource : artifacts.find(ScriptReference.class)) { String text = generateScriptInjector(resource.getSrc()); selectionScript.insert(startPos, text); startPos += text.length(); } } return selectionScript; }
From source file:com.ait.toolkit.flash.linker.InjectionUtil.java
License:Open Source License
/** * Installs stylesheets using the installOneStylesheet method, which is * assumed to be defined on the page. The installOneStylesheet() helper * function is invoked as follows://from ww w . ja va 2 s . c o m * * <pre> * installOneStylesheet(URL); * </pre> */ public static StringBuffer injectStylesheets(StringBuffer selectionScript, ArtifactSet artifacts) { int startPos = selectionScript.indexOf("// __MODULE_STYLES__"); if (startPos != -1) { for (StylesheetReference resource : artifacts.find(StylesheetReference.class)) { String text = "installOneStylesheet('" + resource.getSrc() + "');\n"; selectionScript.insert(startPos, text); startPos += text.length(); } } return selectionScript; }