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


Java CssResource类代码示例

本文整理汇总了Java中com.google.gwt.resources.client.CssResource的典型用法代码示例。如果您正苦于以下问题:Java CssResource类的具体用法?Java CssResource怎么用?Java CssResource使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CssResource类属于com.google.gwt.resources.client包,在下文中一共展示了CssResource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: matches

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
protected boolean matches(ShadowDomStyle style) {
  if (style.bundle() != bundle) {
    return false;
  }
  if (style.styles().length != resources.size()) {
    return false;
  }
  final Set<Class<? extends CssResource>> test = new LinkedHashSet<>(resources);
  final Set<Class<? extends CssResource>> seen = new HashSet<>(); // in case someone sends the same class twice...
  for (Class<? extends CssResource> cls : style.styles()) {
      // make sure we ignore duplicate classes
    if (seen.add(cls)) {
      // make sure we have the class you are requesting
      if (!test.remove(cls)) {
        return false;
      }
    }
  }
  // make sure we don't have more classes than you (else we would add extra css, and our signatures would not line up).
  return test.isEmpty();
}
 
开发者ID:WeTheInternet,项目名称:xapi,代码行数:22,代码来源:ShadowDomStyleInjectorGenerator.java

示例2: getFake

import com.google.gwt.resources.client.CssResource; //导入依赖的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: mockCss

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
/** @return a mock CSS resouces */
public static <T extends CssResource> T mockCss(Class<T> cssClass) {
  return Mockito.mock(cssClass, Mockito.withSettings().defaultAnswer( // \u2620
  new Answer<String>() {
    int i;

    @Override
    public String answer(InvocationOnMock invocation) throws Throwable {
      return "asdf" + i++;
    }
  }));
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:13,代码来源:UiBuilderTestHelper.java

示例4: UiBinderParser

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
public UiBinderParser(UiBinderWriter writer, MessagesWriter messagesWriter,
    FieldManager fieldManager, TypeOracle oracle, ImplicitClientBundle bundleClass,
    String binderUri, UiBinderContext uiBinderContext, ResourceOracle resourceOracle) {
  this.writer = writer;
  this.oracle = oracle;
  this.messagesWriter = messagesWriter;
  this.fieldManager = fieldManager;
  this.bundleClass = bundleClass;
  this.uiBinderContext = uiBinderContext;
  this.cssResourceType = oracle.findType(CssResource.class.getCanonicalName());
  this.imageResourceType = oracle.findType(ImageResource.class.getCanonicalName());
  this.dataResourceType = oracle.findType(DataResource.class.getCanonicalName());
  this.binderUri = binderUri;
  this.resourceOracle = resourceOracle;
}
 
开发者ID:ahome-it,项目名称:ahome-core,代码行数:16,代码来源:UiBinderParser.java

示例5: InjectionResult

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
public InjectionResult(ShadowDomStyle style, String genClass) {
  providerClass = genClass;
  bundle = style.bundle();
  resources = new LinkedHashSet<>();
  for (Class<? extends CssResource> cls : style.styles()) {
    resources.add(cls);
  }
}
 
开发者ID:WeTheInternet,项目名称:xapi,代码行数:9,代码来源:ShadowDomStyleInjectorGenerator.java

示例6: gwtStyle

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("gwt-style.gss")
public CssResource gwtStyle();
 
开发者ID:vsite-hr,项目名称:mentor,代码行数:4,代码来源:MentorBundle.java

示例7: TODO

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
/** Css resource */
// TODO(danilatos): extends CssResource to get obfuscated class name
// TODO(danilatos): factor our CSS into per-widget bundles (e.g., image thumbnail, paragraph)
@Source("Editor.css")
@NotStrict  // TODO(danilatos): make Strict by including all classes in the CssResource
CssResource css();
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:7,代码来源:EditorImpl.java

示例8: css

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("global.css")
CssResource css();
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:4,代码来源:DCMAEntryPoint.java

示例9: customToggleStyle

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("css/CustomToggle.css")
CssResource customToggleStyle();
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:4,代码来源:AppCss.java

示例10: joinToggleStyle

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("css/JoinToggle.css")
CssResource joinToggleStyle();
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:4,代码来源:AppCss.java

示例11: customDataGridStyle

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("css/DataGrid.css")
CssResource customDataGridStyle();
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:4,代码来源:AppCss.java

示例12: vcenterStyle

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("css/VCenter.css")
CssResource vcenterStyle();
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:4,代码来源:AppCss.java

示例13: teiidWebUiStyle

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("css/teiid-webui.css")
CssResource teiidWebUiStyle();
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:4,代码来源:AppCss.java

示例14: style

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@Source("CodeMirror.css")
@NotStrict
CssResource style();
 
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:4,代码来源:CodeMirror.java

示例15: css

import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@Source("chrome.css")
CssResource css();
 
开发者ID:codeaudit,项目名称:gwt-chronoscope,代码行数:3,代码来源:ThemeStyleInjector.java


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