本文整理汇总了Java中com.google.gwt.resources.client.ClientBundle类的典型用法代码示例。如果您正苦于以下问题:Java ClientBundle类的具体用法?Java ClientBundle怎么用?Java ClientBundle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ClientBundle类属于com.google.gwt.resources.client包,在下文中一共展示了ClientBundle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillStyles
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
private void fillStyles(final TreeLogger logger,
final Many<Style> styles,
final Set<CssFile> files,
final Set<Class<? extends ClientBundle>> resourceTypes,
final Css ... csses) {
for (final Css css : csses) {
for (final Style style : css.style()) {
if (style.names().length > 0) {
styles.add(style.priority(), style);
}
}
for (final Class<? extends ClientBundle> cls : css.resources()) {
resourceTypes.add(cls);
}
for (final CssFile file : css.files()) {
files.add(file);
}
}
}
示例2: getFake
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
/**
* Returns a new instance of the given type that implements methods as
* described in the class description.
*
* @param type interface to be implemented by the returned type.
*/
@Override
public ClientBundle getFake(Class<?> type) {
return (ClientBundle) Proxy.newProxyInstance(
FakeClientBundleProvider.class.getClassLoader(),
new Class<?>[] {type},
new InvocationHandler() {
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Exception {
Class<?> returnType = method.getReturnType();
if (CssResource.class.isAssignableFrom(returnType)) {
return GWT.create(returnType);
} else {
return createFakeResource(returnType, method.getName());
}
}
});
}
示例3: generateGwtBundle
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
public static void generateGwtBundle(TypeElement sourceType, ClassName bundleClassName,
String bundleMethodName, TypeName resourceType, String resourceExtension, Filer filer)
{
Builder bundleClassBuilder = TypeSpec
.interfaceBuilder(bundleClassName)
.addModifiers(Modifier.PUBLIC)
.addSuperinterface(ClientBundle.class);
bundleClassBuilder.addField(FieldSpec
.builder(bundleClassName, "INSTANCE", Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL)
.initializer(CodeBlock.of("$T.create($T.class)", GWT.class, bundleClassName))
.build());
String typeElementName = sourceType.getQualifiedName().toString();
String resourcePath = typeElementName.replaceAll("\\.", "/") + "." + resourceExtension;
AnnotationSpec annotationSpec = AnnotationSpec
.builder(Source.class)
.addMember("value", CodeBlock.of("$S", resourcePath))
.build();
bundleClassBuilder.addMethod(MethodSpec
.methodBuilder(bundleMethodName)
.addAnnotation(annotationSpec)
.addModifiers(Modifier.PUBLIC, Modifier.ABSTRACT)
.returns(resourceType)
.build());
GenerationUtil.toJavaFile(filer, bundleClassBuilder, bundleClassName, sourceType);
}
示例4: CssMapProxy
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
public CssMapProxy(String cssMapRoot, Class<? extends ClientBundle> resourceType, String methodName, Class<? extends Css> cssType) {
this.proxy = Lazy.deferred1(this::createProxy);
this.mapFile = Paths.get(cssMapRoot, resourceType.getCanonicalName() + "." + methodName + ".cssmap");
this.cssType = cssType;
onMapFileChanged = Do.NOTHING;
knownNames= X_Collect.newStringMap(String.class);
this.handler = new ProxyHandler();
refreshNames();
watchFile();
}
示例5: css
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("Render.css")
Css css();
示例6: css
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("ViewToolbar.css")
ViewToolbarResources.Css css();
示例7: css
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("Dialog.css")
Css css();
示例8: dataPagerDebugCss
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("resources/css/data-pager.css")
TextResource dataPagerDebugCss();
示例9: dataPagerCss
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("resources/css/data-pager.min.css")
TextResource dataPagerCss();
示例10: cellTreeStyle
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@Override
@ClientBundle.Source({"cellTree.css", "org/eclipse/che/ide/api/ui/style.css"})
CellTreeStyle cellTreeStyle();
示例11: getFireflyCss
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("firefly-bundle.css")
FireflyCss getFireflyCss();
示例12: employeeAdmin
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("EmployeeAdmin.css")
public EmployeeAdminCssStyles employeeAdmin();
示例13: mainGSS
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("main.gss")
MainGSS mainGSS();
示例14: getBundle
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
public Class<? extends ClientBundle> getBundle() {
return bundle;
}
示例15: allBundles
import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@Override
public Class<? extends ClientBundle>[] allBundles() {
return new Class[]{DemoResources.class};
}