本文整理匯總了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};
}