Package com.google.gwt.gadgets.client.ui

Examples of com.google.gwt.gadgets.client.ui.GadgetImage


    vp.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);

    // Using GadgetImage instead of Image will cache your images on the
    // Gadget's Container server. It is a Gadget Ads requirement that all
    // embedded assets must be cached.
    vp.add(new GadgetImage(
        "http://code.google.com/webtoolkit/images/gwt-logo.png"));

    // Adding a waiting message to the RootPanel
    Label disclaimer = new Label("Use GWT for your Gadget Ads!");
    vp.add(disclaimer);

    // Another Logo
    vp.add(new GadgetImage(
        "http://code.google.com/webtoolkit/images/gwt-logo.png"));

    // Adding the button to go to the GWT website
    Button button = new Button("Visit the GWT Website NOW!!");
    vp.add(button);

    // When clicking the button, we are redirected to the GWT website.
    // We use the AdsFeature.clickDestinationUrl() which will redirect to the
    // URL and report the clickthrough hit.
    // It is a GadgetAds requirement to use some AdsFeature.reportInteraction()
    // or AdsFeature.clickDestinationUrl()
    button.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        adsFeature.clickDestinationUrl("http://code.google.com/webtoolkit/");
      }
    });

    // Another Logo
    vp.add(new GadgetImage(
        "http://code.google.com/webtoolkit/images/gwt-logo.png"));

    // Some styling
    vp.setHeight("100%");
    vp.setWidth("100%");
View Full Code Here

TOP

Related Classes of com.google.gwt.gadgets.client.ui.GadgetImage

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.