Examples of VLayout


Examples of com.smartgwt.client.widgets.layout.VLayout

      return new NavigationSample();
    }
  };

  public Canvas getViewPanel() {
    VLayout layout = new VLayout();
    layout.setWidth100();
    layout.setHeight100();
    layout.setMembersMargin(10);

    // Create a 3-column layout for buttons:
    HLayout hLayout = new HLayout();
    hLayout.setMembersMargin(15);
    hLayout.setPadding(5);
    VLayout firstColumn = new VLayout();
    firstColumn.setMembersMargin(5);
    VLayout secondColumn = new VLayout();
    secondColumn.setMembersMargin(5);
    VLayout thirdColumn = new VLayout();
    thirdColumn.setMembersMargin(5);

    // Map with ID mapOsm is defined in the XML configuration. (mapOsm.xml)
    final MapWidget map = new MapWidget("mapOsm", "gwt-samples");

    // Set a panning controller on the map:
    map.setController(new PanController(map));

    VLayout mapLayout = new VLayout();
    mapLayout.setShowEdges(true);
    mapLayout.setHeight("60%");
    mapLayout.addMember(map);

    // Create a button that centers the map to (0,0):
    IButton centerBTN = new IButton(I18nProvider.getSampleMessages().navigationBtnPosition());
    centerBTN.setWidth100();
    centerBTN.addClickHandler(new ClickHandler() {
View Full Code Here

Examples of com.smartgwt.client.widgets.layout.VLayout

      }
    }, null);
    // @extract-end

    // Now we continue as usual:
    final VLayout layout = new VLayout();
    layout.setMembersMargin(10);
    layout.setWidth100();
    layout.setHeight100();

    // Map with ID beansMap is defined in the XML configuration. (contains any type of attribute)
    final MapWidget map = new MapWidget("mapBeansCustomType", "gwt-samples");
    map.setVisible(false);
    layout.addMember(map);
    map.init();

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

      public void onMapModelChange(MapModelEvent event) {
        VectorLayer layer = (VectorLayer) map.getMapModel().getLayer("beansLayerCustomType");
        FeatureAttributeEditor editor = new FeatureAttributeEditor(layer, false);
        editor.setWidth(400);
        layout.addMember(editor);
      }
    });

    return layout;
  }
View Full Code Here

Examples of com.smartgwt.client.widgets.layout.VLayout

  private MapWidget googleSatMap;

  private MapWidget googleTerrainMap;

  public Canvas getViewPanel() {
    VLayout layout = new VLayout();
    layout.setWidth100();
    layout.setHeight100();
    layout.setMembersMargin(10);

    // Create map with Google layer, and add a PanController to it:
    VLayout mapLayout1 = new VLayout();
    mapLayout1.setShowEdges(true);
    googleMap = new MapWidget("mapGoogle", "gwt-samples");
    googleMap.setController(new PanController(googleMap));
    mapLayout1.addMember(googleMap);

    // Create map with Google layer (satellite), and add a PanController to it:
    VLayout mapLayout2 = new VLayout();
    mapLayout2.setShowEdges(true);
    googleSatMap = new MapWidget("mapGoogleSat", "gwt-samples");
    googleSatMap.setController(new PanController(googleSatMap));
    mapLayout2.addMember(googleSatMap);

    // Create map with Google layer (terrain), and add a PanController to it:
    VLayout mapLayout3 = new VLayout();
    mapLayout3.setShowEdges(true);
    googleTerrainMap = new MapWidget("mapGoogleTerrain", "gwt-samples");
    googleTerrainMap.setController(new PanController(googleTerrainMap));
    mapLayout3.addMember(googleTerrainMap);

    // Place all three in the layout:
    layout.addMember(mapLayout1);
    layout.addMember(mapLayout2);
    layout.addMember(mapLayout3);
View Full Code Here

Examples of com.smartgwt.client.widgets.layout.VLayout

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

    // Create the map, using the wmsMap configuration (mapOsm.xml):
    final MapWidget map = new MapWidget("mapOsm", "gwt-samples");

    VLayout mapLayout = new VLayout();
    mapLayout.setShowEdges(true);
    mapLayout.setHeight("50%");
    mapLayout.addMember(map);
    layout.addMember(mapLayout);

    final PortalLayout portalLayout = new PortalLayout(3);
    portalLayout.setWidth100();
    portalLayout.setHeight("50%");
View Full Code Here

Examples of com.smartgwt.client.widgets.layout.VLayout

      return new EditPolygonLayerSample();
    }
  };

  public Canvas getViewPanel() {
    VLayout layout = new VLayout();
    layout.setWidth100();
    layout.setHeight100();

    VLayout mapLayout = new VLayout();
    mapLayout.setShowEdges(true);
    mapLayout.setShowResizeBar(true);

    // Map with ID editPolygonLayerMap is defined in the XML configuration.
    final MapWidget map = new MapWidget("mapEditPolygon", "gwt-samples");
    map.getMapModel().addMapModelHandler(new MapModelHandler() {

      // When the map is initialized: select the cities layer - so that new features are created in this layer:
      public void onMapModelChange(MapModelEvent event) {
        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:
    HLayout infoLayout = new HLayout();
    infoLayout.setHeight("35%");
    infoLayout.setShowEdges(true);
View Full Code Here

Examples of com.smartgwt.client.widgets.layout.VLayout

      return new FilterSecuritySample();
    }
  };

  public Canvas getViewPanel() {
    final VLayout layout = new VLayout();
    layout.setMembersMargin(10);
    layout.setWidth100();
    layout.setHeight100();

    // Map with ID duisburgMap is defined in the XML configuration. (mapDuisburg.xml)
    final VLayout mapLayout = new VLayout();
    mapLayout.setShowEdges(true);
    mapLayout.setHeight("60%");
    map = new MapWidget("mapVectorSecurity", "gwt-samples");
    map.setController(new PanController(map));
    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) {
          map.destroy();
          map = new MapWidget("mapVectorSecurity", "gwt-samples");
          mapLayout.addMember(map);
          map.setController(new PanController(map));
        }
      }
    };
View Full Code Here

Examples of com.smartgwt.client.widgets.layout.VLayout

        SC.say(I18nProvider.getSampleMessages().rectangeControllerOutput(roundedKmWidth, roundedKmHeight,
            roundedArea));
      }
    }

    VLayout layout = new VLayout();
    layout.setWidth100();
    layout.setHeight100();

    // Map with ID wmsMap is defined in the XML configuration. (mapWms.xml)
    final MapWidget map = new MapWidget("mapWms", "gwt-samples");
    map.addDrawHandler(new DrawHandler() {

      public void onDraw(DrawEvent event) {
        AreaController areaController = new AreaController(map);
        map.setController(areaController);
      }
    });

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

Examples of com.smartgwt.client.widgets.layout.VLayout

      return new EditAttributeSample();
    }
  };

  public Canvas getViewPanel() {
    final VLayout layout = new VLayout();
    layout.setMembersMargin(10);
    layout.setWidth100();
    layout.setHeight100();

    // Map with ID beansMap is defined in the XML configuration. (contains any type of attribute)
    final MapWidget map = new MapWidget("mapBeansAssociation", "gwt-samples");
    map.setVisible(false);
    layout.addMember(map);
    map.init();

    HLayout hLayout = new HLayout(10);
    hLayout.setHeight(40);
    IButton disabledBtn = new IButton("Disable form");
    disabledBtn.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        editor.setDisabled(true);
      }
    });
    hLayout.addMember(disabledBtn);
    IButton enabledBtn = new IButton("Enable form");
    enabledBtn.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        editor.setDisabled(false);
      }
    });
    hLayout.addMember(enabledBtn);
    layout.addMember(hLayout);

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

      public void onMapModelChange(MapModelEvent event) {
        VectorLayer layer = (VectorLayer) map.getMapModel().getLayer("beansAssociationLayer");
        editor = new FeatureAttributeEditor(layer, false);
        editor.setWidth(400);
        layout.addMember(editor);
      }
    });

    return layout;
  }
View Full Code Here

Examples of com.smartgwt.client.widgets.layout.VLayout

      return new EditPointLayerSample();
    }
  };

  public Canvas getViewPanel() {
    VLayout layout = new VLayout();
    layout.setWidth100();
    layout.setHeight100();

    VLayout mapLayout = new VLayout();
    mapLayout.setShowEdges(true);
    mapLayout.setShowResizeBar(true);

    // Map with ID editPointLayerMap is defined in the XML configuration.
    final MapWidget map = new MapWidget("mapEditPoint", "gwt-samples");
    map.getMapModel().addMapModelHandler(new MapModelHandler() {

      // When the map is initialized: select the cities layer - so that new features are created in this layer:
      public void onMapModelChange(MapModelEvent event) {
        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:
    HLayout infoLayout = new HLayout();
    infoLayout.setHeight("35%");
    infoLayout.setShowEdges(true);
View Full Code Here

Examples of com.smartgwt.client.widgets.layout.VLayout

      return new WmsSample();
    }
  };

  public Canvas getViewPanel() {
    VLayout layout = new VLayout();
    layout.setWidth100();
    layout.setHeight100();

    // Map with ID wmsMap is defined in the XML configuration. (mapWms.xml)
    final MapWidget map = new MapWidget("mapWms", "gwt-samples");

    // Set a panning controller on the map:
    map.setController(new PanController(map));
    layout.addMember(map);

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