本文整理汇总了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();
}
示例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());
}
}
});
}
示例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++;
}
}));
}
示例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;
}
示例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);
}
}
示例6: gwtStyle
import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("gwt-style.gss")
public CssResource gwtStyle();
示例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();
示例8: css
import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("global.css")
CssResource css();
示例9: customToggleStyle
import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("css/CustomToggle.css")
CssResource customToggleStyle();
示例10: joinToggleStyle
import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("css/JoinToggle.css")
CssResource joinToggleStyle();
示例11: customDataGridStyle
import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("css/DataGrid.css")
CssResource customDataGridStyle();
示例12: vcenterStyle
import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("css/VCenter.css")
CssResource vcenterStyle();
示例13: teiidWebUiStyle
import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@NotStrict
@Source("css/teiid-webui.css")
CssResource teiidWebUiStyle();
示例14: style
import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@Source("CodeMirror.css")
@NotStrict
CssResource style();
示例15: css
import com.google.gwt.resources.client.CssResource; //导入依赖的package包/类
@Source("chrome.css")
CssResource css();