当前位置: 首页>>代码示例>>Java>>正文


Java ClientBundle类代码示例

本文整理汇总了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);
    }
  }
}
 
开发者ID:WeTheInternet,项目名称:xapi,代码行数:20,代码来源:CssInjectorGenerator.java

示例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());
          }
        }
      });
}
 
开发者ID:google,项目名称:gwtmockito,代码行数:24,代码来源:FakeClientBundleProvider.java

示例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);
}
 
开发者ID:Axellience,项目名称:vue-gwt,代码行数:30,代码来源:GenerationUtil.java

示例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();

}
 
开发者ID:WeTheInternet,项目名称:xapi,代码行数:12,代码来源:CssMapProxy.java

示例5: css

import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("Render.css")
Css css();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:3,代码来源:DynamicRendererImpl.java

示例6: css

import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("ViewToolbar.css")
ViewToolbarResources.Css css();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:3,代码来源:ViewToolbarResources.java

示例7: css

import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("Dialog.css")
Css css();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:3,代码来源:Dialog.java

示例8: dataPagerDebugCss

import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("resources/css/data-pager.css")
TextResource dataPagerDebugCss();
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-table,代码行数:3,代码来源:MaterialDataPagerClientBundle.java

示例9: dataPagerCss

import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("resources/css/data-pager.min.css")
TextResource dataPagerCss();
 
开发者ID:GwtMaterialDesign,项目名称:gwt-material-table,代码行数:3,代码来源:MaterialDataPagerClientBundle.java

示例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();
 
开发者ID:eclipse,项目名称:che,代码行数:4,代码来源:CellTreeResources.java

示例11: getFireflyCss

import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("firefly-bundle.css")
FireflyCss getFireflyCss();
 
开发者ID:lsst,项目名称:firefly,代码行数:3,代码来源:CssData.java

示例12: employeeAdmin

import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("EmployeeAdmin.css")
public EmployeeAdminCssStyles employeeAdmin();
 
开发者ID:mvp4g,项目名称:mvp4g-examples,代码行数:3,代码来源:Resources.java

示例13: mainGSS

import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@ClientBundle.Source("main.gss")
MainGSS mainGSS();
 
开发者ID:lumongo,项目名称:lumongo,代码行数:3,代码来源:MainResources.java

示例14: getBundle

import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
public Class<? extends ClientBundle> getBundle() {
  return bundle;
}
 
开发者ID:WeTheInternet,项目名称:xapi,代码行数:4,代码来源:ShadowDomStyleInjectorGenerator.java

示例15: allBundles

import com.google.gwt.resources.client.ClientBundle; //导入依赖的package包/类
@Override
public Class<? extends ClientBundle>[] allBundles() {
    return new Class[]{DemoResources.class};
}
 
开发者ID:WeTheInternet,项目名称:xapi,代码行数:5,代码来源:DemoStyles.java


注:本文中的com.google.gwt.resources.client.ClientBundle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。