Package welcome.client.ui.popup

Source Code of welcome.client.ui.popup.PopupForm

package welcome.client.ui.popup;


import welcome.client.ui.Content;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.ClickEvent;

public class PopupForm extends Content {
  private FlowPanel flowPanel;
  private Button btnNewButton;
  private Button btnNewButton_1;
  public PopupForm() {
   
    this.flowPanel = new FlowPanel();
    initWidget(this.flowPanel);
   
    this.btnNewButton = new Button("Open Center Popup");
    this.btnNewButton.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
       
        Popup pop = new Popup();
        pop.setContent(new Label("content"));
        pop.center();
     
      }
    });
    this.flowPanel.add(this.btnNewButton);
   
    this.btnNewButton_1 = new Button("Open Frame popup");
    this.btnNewButton_1.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
       
        Frame frame = new Frame("http://www.youtube.com/embed/3jlXnQEgbuw");
       
        frame.setVisible(true);
        //frame.setPixelSize(600, 600);
        frame.setHeight("100%");
        frame.setWidth("100%");
       
        Popup pop = new Popup();
        pop.setContent(frame.asWidget());
        pop.setSize("600px", "600px");
       
        pop.center();
       
      }
    });
    this.flowPanel.add(this.btnNewButton_1);
  }

 
 
 
}
TOP

Related Classes of welcome.client.ui.popup.PopupForm

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.