Package org.geomajas.gwt.client.widget

Examples of org.geomajas.gwt.client.widget.Toolbar


    // ---------------------------------------------------------------------
    // Create the left-side (map and tabs):
    // ---------------------------------------------------------------------
    final MapWidget map = new MapWidget("mapMain", "app");
    final Toolbar toolbar = new Toolbar(map);
    toolbar.setButtonSize(Toolbar.BUTTON_SIZE_BIG);
    toolbar.setBackgroundColor("#647386");
    toolbar.setBackgroundImage("");
    toolbar.setBorder("0px");

    map.getMapModel().addMapModelHandler(new MapModelHandler() {

      public void onMapModelChange(MapModelEvent event) {
        Label title = new Label("Geomajas GWT: hello world");
        title.setStyleName("appTitle");
        title.setWidth(260);
        toolbar.addFill();
        toolbar.addMember(title);
      }
    });

    VLayout mapLayout = new VLayout();
    mapLayout.addMember(toolbar);
View Full Code Here


    // ---------------------------------------------------------------------
    // Create the left-side (map and tabs):
    // ---------------------------------------------------------------------
    final MapWidget map = new MapWidget("mapMain", "app");
    final Toolbar toolbar = new Toolbar(map);
    toolbar.setButtonSize(Toolbar.BUTTON_SIZE_BIG);
    toolbar.setBackgroundColor("#647386");
    toolbar.setBackgroundImage("");
    toolbar.setBorder("0px");

    map.getMapModel().addMapModelHandler(new MapModelHandler() {

      public void onMapModelChange(MapModelEvent event) {
        Label title = new Label("Geomajas GWT: hello world");
        title.setStyleName("appTitle");
        title.setWidth(260);
        toolbar.addFill();
        toolbar.addMember(title);
        GetMapImageAction getMapImage = new GetMapImageAction(map);
        toolbar.addSeparator();
        toolbar.addActionButton(getMapImage);
        GetLegendImageAction getLegendImageAll = new GetLegendImageAction(map, true);
        toolbar.addSeparator();
        toolbar.addActionButton(getLegendImageAll);
        GetLegendImageAction getLegendImage = new GetLegendImageAction(map, false);
        toolbar.addSeparator();
        toolbar.addActionButton(getLegendImage);
        // switch all labels on
        for (Layer layer : map.getMapModel().getLayers()) {
          layer.setLabeled(true);
        }
      }
View Full Code Here

    // create the map and toolbar

    // @extract-start createGwtWidget, Create GWT widget in toolbar
    MapWidget map = new MapWidget("mapOsm", "app");
    Toolbar toolbar = new Toolbar(map);
    // @extract-skip-start
    toolbar.setButtonSize(Toolbar.BUTTON_SIZE_BIG);
    // @extract-skip-end

    toolbar.addMember(new GeocoderWidget(map, "description", "Geocoder"));

    VLayout mapLayout = new VLayout();
    mapLayout.addMember(toolbar);
    mapLayout.addMember(map);
    mapLayout.setHeight("100%");
View Full Code Here

    // ---------------------------------------------------------------------
    // Create the left-side (map and tabs):
    // ---------------------------------------------------------------------
    final MapWidget map = new MapWidget("mapMain", "app");
    final Toolbar toolbar = new Toolbar(map);
    toolbar.setButtonSize(Toolbar.BUTTON_SIZE_BIG);

    VLayout mapLayout = new VLayout();
    mapLayout.setShowResizeBar(true);
    mapLayout.setResizeBarTarget("tabs");
    mapLayout.addMember(toolbar);
View Full Code Here

    // ---------------------------------------------------------------------
    // Create the left-side (map and tabs):
    // ---------------------------------------------------------------------
    final MapWidget map = new MapWidget("mapMain", "app");
    final Toolbar toolbar = new Toolbar(map);
    toolbar.setButtonSize(Toolbar.BUTTON_SIZE_BIG);

    VLayout mapLayout = new VLayout();
    mapLayout.setShowResizeBar(true);
    mapLayout.setResizeBarTarget("tabs");
    mapLayout.addMember(toolbar);
View Full Code Here

    layout.setWidth100();
    layout.setHeight100();

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

    final Toolbar toolbar = new Toolbar(map);
    toolbar.setButtonSize(Toolbar.BUTTON_SIZE_BIG);
    final GeocoderWidget geocoderWidget = new GeocoderWidget(map, "description", "Geocoder");
    toolbar.addMember(geocoderWidget);

    SelectItem geocoderSource = new SelectItem("geocoderSource", "");
    geocoderSource.setDefaultToFirstOption(true);
    geocoderSource.setOptionDataSource(getGeocoderSelectDataSource());
    geocoderSource.setDisplayField(FIELD_LABEL);
    geocoderSource.setValueField(FIELD_REGEX);
    geocoderSource.addChangeHandler(new ChangeHandler() {
      public void onChange(ChangeEvent event) {
        geocoderWidget.setServicePattern((String) event.getValue());
      }
    });
    DynamicForm geocoderSourceForm = new DynamicForm();
    geocoderSourceForm.setFields(geocoderSource);
    toolbar.addMember(geocoderSourceForm);

    layout.addMember(toolbar);
    layout.addMember(map);
    return layout;
  }
View Full Code Here

        map.getMapModel().selectLayer(map.getMapModel().getLayer("clientLayerEditablePolygon"));
      }
    });

    // Create a tool-bar for this map:
    final Toolbar toolbar = new Toolbar(map);
    toolbar.setButtonSize(Toolbar.BUTTON_SIZE_BIG);

    mapLayout.addMember(toolbar);
    mapLayout.addMember(map);

    // Add an explanation to the page that explains how editing is done:
View Full Code Here

        map.getMapModel().selectLayer(map.getMapModel().getLayer("clientLayerEditableAirports"));
      }
    });

    // Create a toolbar for this map:
    final Toolbar toolbar = new Toolbar(map);
    toolbar.setButtonSize(Toolbar.BUTTON_SIZE_BIG);

    mapLayout.addMember(toolbar);
    mapLayout.addMember(map);

    // Add an explanation to the page that explains how editing is done:
View Full Code Here

    final VLayout mapLayout = new VLayout();
    mapLayout.setShowEdges(true);
    mapLayout.setHeight("60%");
    map = new MapWidget("mapToolbarSecurity", "gwt-samples");
    map.setController(new PanController(map));
    toolbar = new Toolbar(map);
    mapLayout.addMember(toolbar);
    mapLayout.addMember(map);

    // Create horizontal layout for login buttons:
    HLayout buttonLayout = new HLayout();
    buttonLayout.setMembersMargin(10);

    // Create login handler that re-initializes the map on a successful login:
    final BooleanCallback initMapCallback = new BooleanCallback() {

      public void execute(Boolean value) {
        if (value) {
          toolbar.destroy();
          map.destroy();
          map = new MapWidget("mapToolbarSecurity", "gwt-samples");
          toolbar = new Toolbar(map);
          mapLayout.addMember(toolbar);
          mapLayout.addMember(map);
        }
      }
    };
View Full Code Here

    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;
  }
View Full Code Here

TOP

Related Classes of org.geomajas.gwt.client.widget.Toolbar

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.