Package com.smartgwt.client.widgets

Examples of com.smartgwt.client.widgets.IButton.addClickHandler()


    });
    lineButton.setWidth100();
    buttonLayout.addMember(lineButton);

    IButton polygonButton = new IButton("Toggle Polygon layer");
    polygonButton.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Layer<?> layer = map.getMapModel().getLayer("clientLayerCountries110m");
        layer.setVisible(!layer.isShowing());
      }
View Full Code Here


    });
    polygonButton.setWidth100();
    buttonLayout.addMember(polygonButton);

    IButton pointButton = new IButton("Toggle Point layer");
    pointButton.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Layer<?> layer = map.getMapModel().getLayer("clientLayerPopulatedPlaces110m");
        layer.setVisible(!layer.isShowing());
      }
View Full Code Here

    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() {

      public void onClick(ClickEvent event) {
        map.getMapModel().getMapView().setCenterPosition(new Coordinate(-10000000, 2000000));
      }
    });
View Full Code Here

    });

    // Create a button that translate the map:
    IButton translateBTN = new IButton(I18nProvider.getSampleMessages().navigationBtnTranslate());
    translateBTN.setWidth100();
    translateBTN.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        map.getMapModel().getMapView().translate(1000000, -500000);
      }
    });
View Full Code Here

    });

    // Create a button that applies a bounding box to zoom to:
    IButton bboxBTN = new IButton(I18nProvider.getSampleMessages().navigationBtnBbox());
    bboxBTN.setWidth100();
    bboxBTN.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        map.getMapModel().getMapView().applyBounds(new Bbox(1200000, 4600000, 1400000, 1400000),
            ZoomOption.EXACT);
      }
View Full Code Here

    });

    // Create a button that zooms out:
    IButton zoomOutBTN = new IButton(I18nProvider.getSampleMessages().navigationBtnZoomOut());
    zoomOutBTN.setWidth100();
    zoomOutBTN.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        map.getMapModel().getMapView().scale(0.5, ZoomOption.LEVEL_CHANGE);
      }
    });
View Full Code Here

    });

    // Create a button that zooms in:
    IButton zoomInBTN = new IButton(I18nProvider.getSampleMessages().navigationBtnZoomIn());
    zoomInBTN.setWidth100();
    zoomInBTN.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        map.getMapModel().getMapView().scale(2, ZoomOption.LEVEL_CHANGE);
      }
    });
View Full Code Here

    };

    // Create a button that logs in user "marino":
    IButton loginButtonMarino = new IButton(I18nProvider.getSampleMessages().securityLogInWith("jan"));
    loginButtonMarino.setWidth("50%");
    loginButtonMarino.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Authentication.getInstance().login("jan", "jan", initMapCallback);
      }
    });
View Full Code Here

    buttonLayout.addMember(loginButtonMarino);

    // Create a button that logs in user "luc":
    IButton loginButtonLuc = new IButton(I18nProvider.getSampleMessages().securityLogInWith("luc"));
    loginButtonLuc.setWidth("50%");
    loginButtonLuc.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Authentication.getInstance().login("luc", "luc", initMapCallback);
      }
    });
View Full Code Here

    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);
      }
    });
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.