Package org.geomajas.example.gwt.client.samples.plugin

Source Code of org.geomajas.example.gwt.client.samples.plugin.DefaultPrintingSample

/*
* This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
*
* Copyright 2008-2011 Geosparc nv, http://www.geosparc.com/, Belgium.
*
* The program is available in open source according to the GNU Affero
* General Public License. All contributions in this program are covered
* by the Geomajas Contributors License Agreement. For full licensing
* details, see LICENSE.txt in the project root.
*/
package org.geomajas.example.gwt.client.samples.plugin;

import org.geomajas.example.gwt.client.samples.base.SamplePanel;
import org.geomajas.example.gwt.client.samples.base.SamplePanelFactory;
import org.geomajas.example.gwt.client.samples.i18n.I18nProvider;
import org.geomajas.gwt.client.widget.MapWidget;
import org.geomajas.gwt.client.widget.Toolbar;

import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.layout.VLayout;

/**
* Sample to demonstrate default printing action.
*
* @author Jan De Moerloose
*
*/
public class DefaultPrintingSample extends SamplePanel {

  public static final String TITLE = "DefaultPrinting";

  public static final SamplePanelFactory FACTORY = new SamplePanelFactory() {

    public SamplePanel createPanel() {
      return new DefaultPrintingSample();
    }
  };

  /**
   * @return The viewPanel Canvas
   */
  public Canvas getViewPanel() {
    VLayout layout = new VLayout();
    layout.setWidth100();
    layout.setHeight100();

    final MapWidget map = new MapWidget("mapPrinting", "gwt-samples");

    final Toolbar toolbar = new Toolbar(map);
    toolbar.setButtonSize(Toolbar.BUTTON_SIZE_BIG);

    layout.addMember(toolbar);
    layout.addMember(map);
    return layout;
  }

  public String getDescription() {
    return I18nProvider.getSampleMessages().printingDescription();
  }

  public String getSourceFileName() {
    return "classpath:org/geomajas/example/gwt/client/samples/plugin/DefaultPrintingSample.txt";
  }

  public String[] getConfigurationFiles() {
    return new String[] { "WEB-INF/layerWmsBluemarble.xml",
        "WEB-INF/layerCountries110m.xml",
        "WEB-INF/mapPrinting.xml" };
  }

  public String ensureUserLoggedIn() {
    return "luc";
  }
}
TOP

Related Classes of org.geomajas.example.gwt.client.samples.plugin.DefaultPrintingSample

TOP
Copyright © 2018 www.massapi.com. 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.