Ejemplo n.º 1
0
 private void addPanelForPopups() {
   HorizontalPanel buttonPanel = new HorizontalPanel();
   buttonPanel.setSpacing(10);
   Button button1 = new Button("DialogBox");
   button1.addClickHandler(new DialogHandler());
   buttonPanel.add(button1);
   Button button2 = new Button("PopupPanel");
   button2.addClickHandler(new PopupHandler());
   buttonPanel.add(button2);
   Button button3 = new Button("Native Dialog (Alert) Box");
   button3.addClickHandler(new AlertHandler());
   buttonPanel.add(button3);
   RootPanel.get("popup-buttons").add(buttonPanel);
 }
Ejemplo n.º 2
0
 private void addSuggestPanel() {
   HorizontalPanel langPanel = new HorizontalPanel();
   langPanel.setSpacing(5);
   langPanel.add(new HTML("Enter language:"));
   MultiWordSuggestOracle langChoices = new ProgrammingLanguageOracle();
   SuggestBox langBox = new SuggestBox(langChoices);
   langPanel.add(langBox);
   Button searchButton = new Button("Send to Google");
   searchButton.addClickHandler(new SearchHandler(langBox));
   langPanel.add(searchButton);
   RootPanel.get("suggest-panel").add(langPanel);
 }
Ejemplo n.º 3
0
 private Button buildRemoveParameterButton(final HorizontalPanel entry) {
   Button remButton = new Button();
   remButton.setStyleName(removeParamButton.getStyleName());
   remButton.setHTML(removeParamButton.getHTML());
   remButton.addClickHandler(
       new ClickHandler() {
         public void onClick(ClickEvent event) {
           removeParameter(entry);
           enableSaveButton();
         }
       });
   return remButton;
 }