Java Code Examples for com.google.gwt.resources.client.CssResource

The following are top voted examples for showing how to use com.google.gwt.resources.client.CssResource. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: xapi   File: ShadowDomStyleInjectorGenerator.java   View source code 6 votes vote down vote up
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();
}
 
Example 2
Project: gwtmockito   File: FakeClientBundleProvider.java   View source code 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 3
Project: Wiab.pro   File: UiBuilderTestHelper.java   View source code 5 votes vote down vote up
/** @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++;
    }
  }));
}
 
Example 4
Project: ahome-core   File: UiBinderParser.java   View source code 5 votes vote down vote up
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;
}
 
Example 5
Project: incubator-wave   File: UiBuilderTestHelper.java   View source code 5 votes vote down vote up
/** @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++;
    }
  }));
}
 
Example 6
Project: xapi   File: ShadowDomStyleInjectorGenerator.java   View source code 5 votes vote down vote up
public InjectionResult(ShadowDomStyle style, String genClass) {
  providerClass = genClass;
  bundle = style.bundle();
  resources = new LinkedHashSet<>();
  for (Class<? extends CssResource> cls : style.styles()) {
    resources.add(cls);
  }
}
 
Example 7
Project: mentor   File: MentorBundle.java   View source code 4 votes vote down vote up
@NotStrict
@Source("gwt-style.gss")
public CssResource gwtStyle();
 
Example 8
Project: Wiab.pro   File: EditorImpl.java   View source code 4 votes vote down vote up
/** 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();
 
Example 9
Project: ephesoft   File: DCMAEntryPoint.java   View source code 4 votes vote down vote up
@NotStrict
@Source("global.css")
CssResource css();
 
Example 10
Project: teiid-webui   File: AppCss.java   View source code 4 votes vote down vote up
@NotStrict
@Source("css/CustomToggle.css")
CssResource customToggleStyle();
 
Example 11
Project: teiid-webui   File: AppCss.java   View source code 4 votes vote down vote up
@NotStrict
@Source("css/JoinToggle.css")
CssResource joinToggleStyle();
 
Example 12
Project: teiid-webui   File: AppCss.java   View source code 4 votes vote down vote up
@NotStrict
@Source("css/DataGrid.css")
CssResource customDataGridStyle();
 
Example 13
Project: teiid-webui   File: AppCss.java   View source code 4 votes vote down vote up
@NotStrict
@Source("css/VCenter.css")
CssResource vcenterStyle();
 
Example 14
Project: teiid-webui   File: AppCss.java   View source code 4 votes vote down vote up
@NotStrict
@Source("css/teiid-webui.css")
CssResource teiidWebUiStyle();
 
Example 15
Project: dataworks-zeus   File: CodeMirror.java   View source code 4 votes vote down vote up
@Source("CodeMirror.css")
@NotStrict
CssResource style();
 
Example 16
Project: gwt-chronoscope   File: ThemeStyleInjector.java   View source code 4 votes vote down vote up
@Source("chrome.css")
CssResource css();
 
Example 17
Project: che   File: OrionResource.java   View source code 4 votes vote down vote up
@Source({"orion-codenvy-theme.css", "org/eclipse/che/ide/api/ui/style.css"})
CssResource editorStyle();
 
Example 18
Project: che   File: DialogBoxResources.java   View source code 4 votes vote down vote up
@Source({"DialogBox.css", "org/eclipse/che/ide/api/ui/style.css"})
@CssResource.NotStrict
Css dialogBox();
 
Example 19
Project: g-leaflet-awesome-markers   File: LeafletAwesomeMarkersClientBundle.java   View source code 4 votes vote down vote up
@Source("awesome-markers-2.0.2.css")
@CssResource.NotStrict
CssResource awesomeMarkersCss();
 
Example 20
Project: OpenTripPlanner-client-gwt   File: PlannerResources.java   View source code 4 votes vote down vote up
@Source("css/OpenTripPlannerClient.css")
@CssResource.NotStrict
CssResource css();
 
Example 21
Project: gerrit   File: GerritResources.java   View source code 4 votes vote down vote up
@Source("gwt_override.css")
CssResource gwt_override();
 
Example 22
Project: mvp4g-examples   File: Mvp4gHyperlink.java   View source code 4 votes vote down vote up
@CssResource.NotStrict
@Source("resources/global.css")
GlobelCSS css();
 
Example 23
Project: mvp4g-examples   File: MailEntryPoint.java   View source code 4 votes vote down vote up
@NotStrict
@Source("resources/global.css")
CssResource css();
 
Example 24
Project: qafe-platform   File: Resources.java   View source code 4 votes vote down vote up
@NotStrict
@Source("com/qualogy/qafe/gwt/client/css/qafe-gwt.css")
public CssResource css();
 
Example 25
Project: plugin-editor-codemirror   File: CodeMirrorResource.java   View source code 4 votes vote down vote up
@Source({"cm_highlight.css", "org/eclipse/che/ide/api/ui/style.css"})
CssResource highlightStyle();
 
Example 26
Project: plugin-editor-codemirror   File: CodeMirrorResource.java   View source code 4 votes vote down vote up
@Source({"cm_theme.css", "org/eclipse/che/ide/api/ui/style.css"})
CssResource editorStyle();
 
Example 27
Project: plugin-editor-codemirror   File: CodeMirrorResource.java   View source code 4 votes vote down vote up
@Source({"cm_gutters.css", "org/eclipse/che/ide/api/ui/style.css"})
CssResource gutterStyle();
 
Example 28
Project: plugin-editor-codemirror   File: CodeMirrorResource.java   View source code 4 votes vote down vote up
@Source({"cm_simplescrollbars.css", "org/eclipse/che/ide/common/constants.css", "org/eclipse/che/ide/api/ui/style.css"})
CssResource scrollStyle();
 
Example 29
Project: plugin-editor-codemirror   File: CodeMirrorResource.java   View source code 4 votes vote down vote up
@Source({"cm_highlight_dockerfile.css", "org/eclipse/che/ide/api/ui/style.css"})
CssResource dockerfileModeStyle();
 
Example 30
Project: zeus3   File: CodeMirror.java   View source code 4 votes vote down vote up
@Source("CodeMirror.css")
@NotStrict
CssResource style();
 
Example 31
Project: root   File: Resources.java   View source code 4 votes vote down vote up
@Source("my.css")
@NotStrict
public CssResource css();
 
Example 32
Project: root   File: Resources.java   View source code 4 votes vote down vote up
@Source("base.css")
@NotStrict
public CssResource baseCss();
 
Example 33
Project: root   File: Resources.java   View source code 4 votes vote down vote up
@Source("touchkit.css")
@NotStrict
public CssResource touchkitCss();
 
Example 34
Project: atom   File: SliderBar.java   View source code 4 votes vote down vote up
@NotStrict
@Source("SliderBar.css")
CssResource sliderBarCss();
 
Example 35
Project: funWithGwt   File: Classroom.java   View source code 4 votes vote down vote up
@NotStrict
@Source("global.css")
CssResource css();
 
Example 36
Project: cloud-dev-studio   File: CoreExtensionResources.java   View source code 4 votes vote down vote up
@CssResource.NotStrict //not restricted to styles that are being used in the application.
@Source("style.css") CssResource styleCSS();
 
Example 37
Project: mgwt-paper   File: InputPopup.java   View source code 4 votes vote down vote up
@CssResource.ClassName("popup")
String popup();
 
Example 38
Project: mgwt-paper   File: InputPopup.java   View source code 4 votes vote down vote up
@CssResource.ClassName("text-area")
String textArea();
 
Example 39
Project: RedQueryBuilder   File: MyResources.java   View source code 4 votes vote down vote up
@Source("core.css")
CssResource css();
 
Example 40
Project: incubator-wave   File: EditorImpl.java   View source code 4 votes vote down vote up
/** 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();