本文整理汇总了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();