com.google.gwt.resources.client.ClientBundle Java Examples

The following examples show how to use com.google.gwt.resources.client.ClientBundle. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FakeClientBundleProvider.java    From gwtmockito with Apache License 2.0 6 votes vote down vote up
/**
 * 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());
          }
        }
      });
}
 
Example #2
Source File: Dialog.java    From swellrt with Apache License 2.0 4 votes vote down vote up
@ClientBundle.Source("Dialog.css")
Css css();
 
Example #3
Source File: MainResources.java    From lumongo with Apache License 2.0 4 votes vote down vote up
@ClientBundle.Source("main.gss")
MainGSS mainGSS();
 
Example #4
Source File: Dialog.java    From incubator-retired-wave with Apache License 2.0 4 votes vote down vote up
@ClientBundle.Source("Dialog.css")
Css css();
 
Example #5
Source File: TypeaheadClientBundle.java    From gwtbootstrap3-extras with Apache License 2.0 4 votes vote down vote up
@ClientBundle.Source("resource/js/typeahead.jquery-0.10.5.min.cache.js")
TextResource typeahead();
 
Example #6
Source File: TextResources.java    From core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@ClientBundle.Source("compat.nocache.js")
TextResource compat();