當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。