本文整理匯總了Java中com.google.gwt.resources.client.TextResource類的典型用法代碼示例。如果您正苦於以下問題:Java TextResource類的具體用法?Java TextResource怎麽用?Java TextResource使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TextResource類屬於com.google.gwt.resources.client包,在下文中一共展示了TextResource類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadAsset
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
@Override
public String loadAsset(String name) {
name = name.replace('.', '_');
Log.d("AssetsRuntime", "loadAsset: " + name);
for (ClientBundleWithLookup b : bundles) {
ResourcePrototype res = b.getResource(name);
if (res != null) {
Log.d("AssetsRuntime", "loadAsset " + res);
return ((TextResource) res).getText();
}
}
return null;
}
示例2: getResourcePrototype
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
private Class<? extends ResourcePrototype> getResourcePrototype(String contentType) {
Class<? extends ResourcePrototype> returnType;
if (contentType.startsWith("image/")) {
returnType = ImageResource.class;
} else if (contentType.startsWith("text/")) {
returnType = TextResource.class;
} else {
returnType = DataResource.class;
}
return returnType;
}
示例3: jQuery
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
@Override
public TextResource jQuery() {
if(resources == null) {
resources = GWT.create(WithJQueryResources.class);
}
return resources.jQuery();
}
示例4: inject
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
protected void inject(TextResource resource, boolean removeTag, boolean sourceUrl) {
String text = resource.getText() +
(sourceUrl ? "//# sourceURL="+resource.getName()+".js" : "");
// Inject the script resource
ScriptInjector.fromString(text)
.setWindow(ScriptInjector.TOP_WINDOW)
.setRemoveTag(removeTag)
.inject();
}
示例5: getVersionResource
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
@Source("version.txt")
TextResource getVersionResource();
示例6: getFile
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
public TextResource getFile() {
return file;
}
示例7: setFile
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
public void setFile(TextResource file) {
this.file = file;
}
示例8: session
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
@Source("sampledata/session.json")
TextResource session();
示例9: listVehicle
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
@Source("sampledata/listVehicle.json")
TextResource listVehicle();
示例10: listRegisterPoint
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
@Source("sampledata/listRegisterPoint.json")
TextResource listRegisterPoint();
示例11: list20RegisterPoint
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
@Source("sampledata/20-puntos_registrados_example.json")
TextResource list20RegisterPoint();
示例12: list500RegisterPoint
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
@Source("sampledata/500-puntos_registrados_example.json")
TextResource list500RegisterPoint();
示例13: lastPointRegister
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
@Source("sampledata/lastPointRegister.json")
TextResource lastPointRegister();
示例14: config
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
@Source("config/config.properties")
TextResource config();
示例15: getSimpleComponents
import com.google.gwt.resources.client.TextResource; //導入依賴的package包/類
@Source("com/google/appinventor/simple_components.json")
TextResource getSimpleComponents();