Package com.google.gwt.ajaxloader.client.AjaxLoader

Examples of com.google.gwt.ajaxloader.client.AjaxLoader.AjaxLoaderOptions


    return "com.google.gwt.ajaxloader.AjaxLoader";
  }

  public void testClientLocation() {
    delayTestFinish(ASYNC_DELAY_MSEC);
    AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
    Runnable onLoad = new Runnable() {
      public void run() {
        ClientLocation clientLocation = AjaxLoader.getClientLocation();
        if (clientLocation == null) {
          fail("Client's location cannot be resolved.");
View Full Code Here


    return "com.google.gwt.ajaxloader.AjaxLoader";
  }

  public void testLoadApi() {
    delayTestFinish(ASYNC_DELAY_MSEC);
    AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
    Runnable onLoad = new Runnable() {
      public void run() {
        finishTest();
      }     
    };
View Full Code Here

   * @param packages the GData packages that should be loaded (e.g. Calendar,
   * Blogger, etc.)
   */
  public static void loadGDataApi(String key,
      Runnable onLoad, GDataPackage... packages) {
    AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
    String[] packageNames = new String[packages.length];
    for (int i = 0; i < packages.length; i++) {
      packageNames[i] = packages[i].getValue();
    }
    options.setPackages(packageNames);
    loadGDataApi(key, targetGDataJsApiVersion, options, onLoad);
  }
View Full Code Here

   * @param language language to use in for the UI components.
   * @param noCss turns off loading of the css stylesheets. 
   */
  public static void loadSearchApi(Runnable onLoad, String language, boolean noCss) {
    assert (onLoad != null);
    AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
    options.setLanguage(language);
    options.setNoCss(noCss);
    AjaxLoader.loadApi(SEARCH_API_NAME, SEARCH_API_VERSION, onLoad, options);
  }
View Full Code Here

      public void run() {
        mapsLoaded();
      }
    }, null);

    AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
    options.setPackages("imagepiechart");
    AjaxLoader.loadApi("visualization", "1", new Runnable() {  

      public void run() {
        pieChartLoaded();
      }
View Full Code Here

   * To specify extra options for loading transliteration API, you can
   * use {@code AjaxLoader.loadApi()} directly.
   */
  public static void loadTransliteration(Runnable onLoad) {
    assert (onLoad != null);
    AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
    options.setPackages("transliteration");
    AjaxLoader.loadApi(TRANSLITERATION_API_NAME, "1", onLoad, options);
  }
View Full Code Here

  public static void loadVisualizationApi(String version, Runnable onLoad,
      JsArrayString packages) {
    // TODO: map which packages have already been loaded, so that we can
    // call the loader only when necessary
    AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
    options.setPackages(packages);
    AjaxLoader.loadApi("visualization", version, onLoad, options);
  }
View Full Code Here

    geocodeButton.setEnabled(false);
    buttonPanel.add(geocodeButton);
    geocoderStatus = new Label("");
    buttonPanel.add(geocoderStatus);   
   
    AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
    options.setOtherParms(mapsKey + "&sensor=false");
    AjaxLoader.loadApi("maps", "2", new Runnable() {
      @Override
      public void run() {
        map = new MapWidget();
        map.setSize(MAP_WIDTH + "px", MAP_HEIGHT + "px");
View Full Code Here

  public LocationView(Location location) {
    this.location = location;
   
    initWidget(uiBinder.createAndBindUi(this));

    AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
    options.setOtherParms(LivingStoryData.getMapsKey() + "&sensor=false");
   
    // Instantiating the map via a runnable breaks horribly on firefox, for reasons
    // that are still mysterious to us. If we introduce some delay, though,
    // it works fine, and doesn't greatly hurt overall page functionality.
    AjaxLoader.loadApi("maps", "2", new Runnable() {
View Full Code Here

  public static void loadVisualizationApi(String version, Runnable onLoad,
      JsArrayString packages) {
    // TODO: map which packages have already been loaded, so that we can
    // call the loader only when necessary
    AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
    options.setPackages(packages);
    AjaxLoader.loadApi("visualization", version, onLoad, options);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.ajaxloader.client.AjaxLoader.AjaxLoaderOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.