Package com.smartgwt.client.widgets.layout

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


    add.setLayoutAlign(VerticalAlignment.CENTER);
    add.setAutoFit(true);
    add.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        final Portlet portlet = new Portlet();
        portlet.setTitle(I18nProvider.getSampleMessages().multipleListenersPortletTitle());

        final Label label = new Label();
        label.setHeight(30);
        label.setContents(I18nProvider.getSampleMessages().multipleListenersPortletText() + " = ?");
        portlet.setHeight(70);
        portlet.addItem(label);
        portalLayout.addPortlet(portlet, (column++) % 3, 0);

        final Listener listener = new AbstractListener() {

          public void onMouseMove(ListenerEvent event) {
            label.setContents(I18nProvider.getSampleMessages().multipleListenersPortletText() + " = "
                + event.getScreenPosition());
          }
        };
        map.addListener(listener);
        portlet.addCloseClickHandler(new CloseClickHandler() {

          public void onCloseClick(CloseClientEvent event) {
            map.removeListener(listener);
            if (map.getListeners() != null) {
              SC.say(I18nProvider.getSampleMessages().multipleListenersCount(map.getListeners().size()));
            }
            portlet.destroy();
          }
        });
        SC.say(I18nProvider.getSampleMessages().multipleListenersCount(map.getListeners().size()));
      }
    });
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.layout.Portlet

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.