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

The following are top voted examples for showing how to use com.google.gwt.resources.client.TextResource. 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: dangchat-sdk   File: JsAssetsProvider.java   Source Code and License 5 votes vote down vote up
@Override
public String loadAsset(String name) {
    name = name.replace('.', '_');

    Log.d("AssetsRuntime", "loadAsset: " + name);
    for (ClientBundleWithLookup b : bundles) {
        ResourcePrototype res = b.getResource(name);
        if (res != null) {
            Log.d("AssetsRuntime", "loadAsset " + res);
            return ((TextResource) res).getText();
        }
    }

    return null;
}
 
Example 2
Project: playn   File: AutoClientBundleGenerator.java   Source Code and License 5 votes vote down vote up
private Class<? extends ResourcePrototype> getResourcePrototype(String contentType) {
  Class<? extends ResourcePrototype> returnType;
  if (contentType.startsWith("image/")) {
    returnType = ImageResource.class;
  } else if (contentType.startsWith("text/")) {
    returnType = TextResource.class;
  } else {
    returnType = DataResource.class;
  }
  return returnType;
}
 
Example 3
Project: gwt-material   File: JQueryProvider.java   Source Code and License 5 votes vote down vote up
@Override
public TextResource jQuery() {
    if(resources == null) {
        resources = GWT.create(WithJQueryResources.class);
    }
    return resources.jQuery();
}
 
Example 4
Project: forplay   File: AutoClientBundleGenerator.java   Source Code and License 5 votes vote down vote up
private Class<? extends ResourcePrototype> getResourcePrototype(String contentType) {
  Class<? extends ResourcePrototype> returnType;
  if (contentType.startsWith("image/")) {
    returnType = ImageResource.class;
  } else if (contentType.startsWith("text/")) {
    returnType = TextResource.class;
  } else {
    returnType = DataResource.class;
  }
  return returnType;
}
 
Example 5
Project: gwt-jui   File: AbstractEntryPoint.java   Source Code and License 5 votes vote down vote up
protected void inject(TextResource resource, boolean removeTag, boolean sourceUrl) {
    String text = resource.getText() +
        (sourceUrl ? "//# sourceURL="+resource.getName()+".js" : "");

    // Inject the script resource
    ScriptInjector.fromString(text)
        .setWindow(ScriptInjector.TOP_WINDOW)
        .setRemoveTag(removeTag)
        .inject();
}
 
Example 6
Project: empiria.player   File: VersionResource.java   Source Code and License 4 votes vote down vote up
@Source("version.txt")
TextResource getVersionResource();
 
Example 7
Project: sig-seguimiento-vehiculos   File: SampleFileVectorLayerDef.java   Source Code and License 4 votes vote down vote up
public TextResource getFile() {
	return file;
}
 
Example 8
Project: sig-seguimiento-vehiculos   File: SampleFileVectorLayerDef.java   Source Code and License 4 votes vote down vote up
public void setFile(TextResource file) {
	this.file = file;
}
 
Example 9
Project: sig-seguimiento-vehiculos   File: SampleDataProvider.java   Source Code and License 4 votes vote down vote up
@Source("sampledata/session.json")
TextResource session();
 
Example 10
Project: sig-seguimiento-vehiculos   File: SampleDataProvider.java   Source Code and License 4 votes vote down vote up
@Source("sampledata/listVehicle.json")
TextResource listVehicle();
 
Example 11
Project: sig-seguimiento-vehiculos   File: SampleDataProvider.java   Source Code and License 4 votes vote down vote up
@Source("sampledata/listRegisterPoint.json")
TextResource listRegisterPoint();
 
Example 12
Project: sig-seguimiento-vehiculos   File: SampleDataProvider.java   Source Code and License 4 votes vote down vote up
@Source("sampledata/20-puntos_registrados_example.json")
TextResource list20RegisterPoint();
 
Example 13
Project: sig-seguimiento-vehiculos   File: SampleDataProvider.java   Source Code and License 4 votes vote down vote up
@Source("sampledata/500-puntos_registrados_example.json")
TextResource list500RegisterPoint();
 
Example 14
Project: sig-seguimiento-vehiculos   File: SampleDataProvider.java   Source Code and License 4 votes vote down vote up
@Source("sampledata/lastPointRegister.json")
TextResource lastPointRegister();
 
Example 15
Project: sig-seguimiento-vehiculos   File: ConfigResourceProvider.java   Source Code and License 4 votes vote down vote up
@Source("config/config.properties")
TextResource config();
 
Example 16
Project: appinventor-extensions   File: SimpleComponentDatabase.java   Source Code and License 4 votes vote down vote up
@Source("com/google/appinventor/simple_components.json")
TextResource getSimpleComponents();
 
Example 17
Project: gwt-promptly   File: Resources.java   Source Code and License 4 votes vote down vote up
@Source("links.txt")
TextResource linkTxt();
 
Example 18
Project: v-leaflet-rotatedmarker-parent   File: LeafletRotatedMarkerClientBundle.java   Source Code and License 4 votes vote down vote up
@Source("leaflet.rotatedMarker.js")
TextResource rotatedMarkerScript();
 
Example 19
Project: dangchat-sdk   File: Assets.java   Source Code and License 4 votes vote down vote up
@Source("AppText.json")
TextResource AppText_json();
 
Example 20
Project: dangchat-sdk   File: Assets.java   Source Code and License 4 votes vote down vote up
@Source("AppText_Ar.json")
TextResource AppText_Ar_json();
 
Example 21
Project: dangchat-sdk   File: Assets.java   Source Code and License 4 votes vote down vote up
@Source("AppText_Zn.json")
TextResource AppText_Zn_json();
 
Example 22
Project: dangchat-sdk   File: Assets.java   Source Code and License 4 votes vote down vote up
@Source("AppText_Es.json")
TextResource AppText_Es_json();
 
Example 23
Project: dangchat-sdk   File: Assets.java   Source Code and License 4 votes vote down vote up
@Source("AppText_Pt.json")
TextResource AppText_Pt_json();
 
Example 24
Project: dangchat-sdk   File: Assets.java   Source Code and License 4 votes vote down vote up
@Source("AppText_Ru.json")
TextResource AppText_Ru_json();
 
Example 25
Project: gwt-uploader   File: UploaderClientBundle.java   Source Code and License 4 votes vote down vote up
@Source("resources/swfupload.js")
TextResource swfupload();
 
Example 26
Project: gwt-uploader   File: UploaderClientBundle.java   Source Code and License 4 votes vote down vote up
@Source("resources/swfupload.speed.js")
TextResource swfuploadSpeed();
 
Example 27
Project: gwt-uploader   File: AppResources.java   Source Code and License 4 votes vote down vote up
@Source("ImageButtonAndProgressBar.java")
TextResource sourceImageButtonAndProgressBar();
 
Example 28
Project: gwt-uploader   File: AppResources.java   Source Code and License 4 votes vote down vote up
@Source("ImageButtonAndProgressText.java")
TextResource sourceImageButtonAndProgressText();
 
Example 29
Project: gwt-uploader   File: AppResources.java   Source Code and License 4 votes vote down vote up
@Source("MultiUploadWithProgressBar.java")
TextResource sourceMultiUploadWithProgressBar();
 
Example 30
Project: gwt-uploader   File: AppResources.java   Source Code and License 4 votes vote down vote up
@Source("MultiUploadWithProgressBarAndDragAndDrop.java")
TextResource sourceMultiUploadWithProgressBarAndDragAndDrop();
 
Example 31
Project: gwt-uploader   File: AppResources.java   Source Code and License 4 votes vote down vote up
@Source("TextButtonAndProgressText.java")
TextResource TextButtonAndProgressText();
 
Example 32
Project: Wiab.pro   File: CajolerFacade.java   Source Code and License 4 votes vote down vote up
@Source("supporting_js.jslib")
TextResource supportingJs();
 
Example 33
Project: Wiab.pro   File: CajolerFacade.java   Source Code and License 4 votes vote down vote up
@Source("taming.js")
TextResource taming();
 
Example 34
Project: gwt-material-table   File: MaterialTableBundle.java   Source Code and License 4 votes vote down vote up
@Source("js/jquery-ext.min.js")
TextResource jQueryExt();
 
Example 35
Project: gwt-material-table   File: MaterialTableBundle.java   Source Code and License 4 votes vote down vote up
@Source("js/stickyth.min.js")
TextResource stickyth();
 
Example 36
Project: gwt-material-table   File: MaterialTableBundle.java   Source Code and License 4 votes vote down vote up
@Source("js/table-subheaders.min.js")
TextResource tableSubHeaders();
 
Example 37
Project: gwt-material-table   File: MaterialTableBundle.java   Source Code and License 4 votes vote down vote up
@Source("js/greedyscroll.min.js")
TextResource greedyScroll();
 
Example 38
Project: gwt-material-table   File: MaterialTableBundle.java   Source Code and License 4 votes vote down vote up
@Source("css/style.min.css")
TextResource style();
 
Example 39
Project: gwt-material-table   File: MaterialTableDebugBundle.java   Source Code and License 4 votes vote down vote up
@Source("js/jquery-ext.js")
TextResource jQueryExt();
 
Example 40
Project: gwt-material-table   File: MaterialTableDebugBundle.java   Source Code and License 4 votes vote down vote up
@Source("js/stickyth.js")
TextResource stickyth();