Package org.geomajas.gwt.client.widget

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


   */
  public SearchPage(MapWidget map, final TabSet tabSet, FeatureListGrid featureGrid) {
    super("Search", map);

    // Create a SearchWidget, based upon a map's model:
    FeatureSearch searchWidget = new FeatureSearch(map.getMapModel(), true);

    // What to do when the result of a search comes in?
    // The DefaultSearchHandler will add all the features in the result to the given FeatureListGrid.
    searchWidget.addSearchHandler(new DefaultSearchHandler(featureGrid) {

      // After the features have been added to the FeatureListGrid, make sure the tab with the grid is visible:
      public void afterSearch() {
        tabSet.selectTab(1);
      }
    });

    // Limit the maximum number of features that a search may produce:
    searchWidget.setMaximumResultSize(20);
    mainLayout.addMember(searchWidget);
  }
View Full Code Here


    layout.setSize("100%", "100%");
    layout.setVisible(false);
    layout.setStyleName("search_panel_inner");

    // Create a SearchWidget, based upon a map's model:
    final FeatureSearch searchWidget = new FeatureSearch(mapModel, true);

    // What to do when the result of a search comes in?
    // The DefaultSearchHandler will add all the features in the result to the given FeatureListGrid.
    searchWidget.addSearchHandler(new DefaultSearchHandler(featureListGrid) {

      // After the features have been added to the FeatureListGrid, make sure the tab with the grid is visible:
      public void afterSearch() {
        showPanel(gridPanel);
      }
    });

    // Limit the maximum number of features that a search may produce:
    searchWidget.setMaximumResultSize(20);
    searchWidget.setBackgroundColor("#F0F0F0");
    layout.addMember(searchWidget);

    mapModel.addMapModelHandler(new MapModelHandler() {

      // On map initialization: Select the countries layer in the search panel.
      public void onMapModelChange(MapModelEvent event) {
        VectorLayer layer = mapModel.getVectorLayers().get(0);
        searchWidget.setLayer(layer);
      }
    });

    return layout;
  }
View Full Code Here

    layout.setSize("100%", "100%");
    layout.setVisible(false);
    layout.setStyleName("search_panel_inner");

    // Create a SearchWidget, based upon a map's model:
    final FeatureSearch searchWidget = new FeatureSearch(mapModel, true);

    // What to do when the result of a search comes in?
    // The DefaultSearchHandler will add all the features in the result to the given FeatureListGrid.
    searchWidget.addSearchHandler(new DefaultSearchHandler(featureListGrid) {

      // After the features have been added to the FeatureListGrid, make sure the tab with the grid is visible:
      public void afterSearch() {
        showPanel(gridPanel);
      }
    });

    // Limit the maximum number of features that a search may produce:
    searchWidget.setMaximumResultSize(20);
    searchWidget.setBackgroundColor("#F0F0F0");
    layout.addMember(searchWidget);

    mapModel.addMapModelHandler(new MapModelHandler() {

      // On map initialization: Select the countries layer in the search panel.
      public void onMapModelChange(MapModelEvent event) {
        VectorLayer layer = mapModel.getVectorLayers().get(0);
        searchWidget.setLayer(layer);
      }
    });

    return layout;
  }
View Full Code Here

   */
  public SearchPage(MapWidget map, final TabSet tabSet, FeatureListGrid featureGrid) {
    super("Search", map);

    // Create a SearchWidget, based upon a map's model:
    FeatureSearch searchWidget = new FeatureSearch(map.getMapModel(), true);

    // What to do when the result of a search comes in?
    // The DefaultSearchHandler will add all the features in the result to the given FeatureListGrid.
    searchWidget.addSearchHandler(new DefaultSearchHandler(featureGrid) {

      // After the features have been added to the FeatureListGrid, make sure the tab with the grid is visible:
      public void afterSearch() {
        tabSet.selectTab(1);
      }
    });

    // Limit the maximum number of features that a search may produce:
    searchWidget.setMaximumResultSize(20);
    mainLayout.addMember(searchWidget);
  }
View Full Code Here

   */
  public SearchPage(MapWidget map, final TabSet tabSet, FeatureListGrid featureGrid) {
    super("Search", map);

    // Create a SearchWidget, based upon a map's model:
    FeatureSearch searchWidget = new FeatureSearch(map.getMapModel(), true);

    // What to do when the result of a search comes in?
    // The DefaultSearchHandler will add all the features in the result to the given FeatureListGrid.
    searchWidget.addSearchHandler(new DefaultSearchHandler(featureGrid) {

      // After the features have been added to the FeatureListGrid, make sure the tab with the grid is visible:
      public void afterSearch() {
        tabSet.selectTab(1);
      }
    });

    // Limit the maximum number of features that a search may produce:
    searchWidget.setMaximumResultSize(20);
    mainLayout.addMember(searchWidget);
  }
View Full Code Here

    // Create a layout with a FeatureListGrid in it:
    final FeatureListGrid grid = new FeatureListGrid(map.getMapModel());
    grid.setShowEdges(true);

    // Create a search widget that displays it's results in the FeatureListGrid:
    final FeatureSearch search = new FeatureSearch(map.getMapModel(), true);
    search.addSearchHandler(new DefaultSearchHandler(grid) {

      public void afterSearch() {
      }
    });

    // Set the maximum number of features to retrieve.
    search.setMaximumResultSize(50);

    VLayout searchLayout = new VLayout();
    searchLayout.setHeight("30%");
    searchLayout.setShowEdges(true);
    searchLayout.addMember(search);
View Full Code Here

    // Create a layout with a FeatureListGrid in it:
    final FeatureListGrid grid = new FeatureListGrid(map.getMapModel());
    grid.setShowEdges(true);

    // Create a search widget that displays it's results in the FeatureListGrid:
    final FeatureSearch search = new FeatureSearch(map.getMapModel(), true);
    search.addSearchHandler(new DefaultSearchHandler(grid) {

      public void afterSearch() {
      }
    });
   
View Full Code Here

   */
  public SearchPage(MapWidget map, final TabSet tabSet, FeatureListGrid featureGrid) {
    super("Search", map);

    // Create a SearchWidget, based upon a map's model:
    FeatureSearch searchWidget = new FeatureSearch(map.getMapModel(), true);

    // What to do when the result of a search comes in?
    // The DefaultSearchHandler will add all the features in the result to the given FeatureListGrid.
    searchWidget.addSearchHandler(new DefaultSearchHandler(featureGrid) {

      // After the features have been added to the FeatureListGrid, make sure the tab with the grid is visible:
      public void afterSearch() {
        tabSet.selectTab(1);
      }
    });

    // Limit the maximum number of features that a search may produce:
    searchWidget.setMaximumResultSize(20);
    mainLayout.addMember(searchWidget);
  }
View Full Code Here

TOP

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

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.