本文整理汇总了Java中com.google.gwt.resources.client.DataResource类的典型用法代码示例。如果您正苦于以下问题:Java DataResource类的具体用法?Java DataResource怎么用?Java DataResource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataResource类属于com.google.gwt.resources.client包,在下文中一共展示了DataResource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadSound
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@Override
protected Sound loadSound(String path) {
String url = pathPrefix + path;
AutoClientBundleWithLookup clientBundle = getBundle(path);
if (clientBundle != null) {
String key = getKey(path);
DataResource resource = (DataResource) getResource(key, clientBundle);
if (resource != null) {
url = resource.getUrl();
}
} else {
url += ".mp3";
}
return adaptSound(url);
}
示例2: getResourcePrototype
import com.google.gwt.resources.client.DataResource; //导入依赖的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: getSound
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@Override
public Sound getSound(String path) {
String url = pathPrefix + path;
AutoClientBundleWithLookup clientBundle = getBundle(path);
if (clientBundle != null) {
String key = getKey(path);
DataResource resource = (DataResource) getResource(key, clientBundle);
if (resource != null) {
url = resource.getSafeUri().asString();
}
} else {
url += ".mp3";
}
return plat.audio().createSound(url);
}
示例4: music
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@Source("music.ogg")
DataResource music();
示例5: chromeLoadingSlow
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
/** Loading images are animated GIF images.
* DataResource is used instead of ImageResource to prevent conversion to PNG.
*/
@Source("slow_loading.gif")
@ImageOptions(flipRtl = true)
DataResource chromeLoadingSlow();
示例6: chromeLoadingFast
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@Source("slow_loading_fast.gif")
@ImageOptions(flipRtl = true)
DataResource chromeLoadingFast();
示例7: chromeLoadingAttachment
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@Source("att_loading.gif")
@ImageOptions(flipRtl = true)
DataResource chromeLoadingAttachment();
示例8: brokenGadget
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@Source("broken_gadget.png")
DataResource brokenGadget();
示例9: undoIcon
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@Source("icon_undo.png")
DataResource undoIcon();
示例10: hoverUndoIcon
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@Source("icon_undo_hover.png")
DataResource hoverUndoIcon();
示例11: barImage
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@Source("progress_mini_bar.gif")
DataResource barImage();
示例12: grooveImage
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@Source("progress_mini_groove.gif")
DataResource grooveImage();
示例13: userVoice
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@DataResource.MimeType("text/javascript")
@Source("userVoice.js")
DataResource userVoice();
示例14: docker
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@Source("images/docker.png")
DataResource docker();
示例15: dockerIcon
import com.google.gwt.resources.client.DataResource; //导入依赖的package包/类
@Source("images/docker_icon.png")
DataResource dockerIcon();