Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.PushButton


    popup.show();
  }

 
  private void createDetailsButton() {
    detailsButton = new PushButton("Details", new ClickListener() {
      public void onClick(Widget sender) {
        showDetails(details);
      }
    });
    detailsButton.setEnabled(false);
View Full Code Here


      }
      return params;
  }
 
  static ButtonBase createButton(String str) {
      PushButton obj = new PushButton(str);
      setFontSize(obj, 10);
      return obj;
  }
View Full Code Here

    super();
   
    Label label = new Label("Select: ");
    add(label);
   
    PushButton all = new PushButton("All", new ClickListener() {
      public void onClick(Widget sender) {
        updateAllNone(true);
      }
    });
    DOM.setElementAttribute(all.getElement(), "id", "my-button-id");
    add(all);

    PushButton none = new PushButton("None", new ClickListener() {
      public void onClick(Widget sender) {
        updateAllNone(false);
      }
    });
    DOM.setElementAttribute(none.getElement(), "id", "my-button-id");
    add(none);

    if ( btns.length > 0 ) {
      // put some separation:
      Widget filler = new HTML(" ");
      add(filler);
     
      // add the "client" buttons:
      for ( final String str : btns ) {
        PushButton pb = new PushButton(str, new ClickListener() {
          public void onClick(Widget sender) {
            clientButtonClicked(str);
          }
        });
        DOM.setElementAttribute(pb.getElement(), "id", "my-button-id");
        add(pb);
      }
    }
  }
View Full Code Here

   *          a click handler to which to bind the button
   * @return the button
   */
  public static PushButton createPushButtonWithImageStates(Image upImage,
      Image hvImage, Image dnImage, String styleName, ClickHandler handler) {
    final PushButton button = createPushButtonWithImageStates(upImage, hvImage,
        styleName, handler);
    button.getDownFace().setImage(dnImage);
    return button;
  }
View Full Code Here

   *          a click handler to which to bind the button
   * @return the button
   */
  public static PushButton createPushButtonWithImageStates(Image upImage,
      Image hvImage, String styleName, ClickHandler handler) {
    final PushButton button = createPushButtonWithImageStates(upImage,
        styleName, handler);
    button.getUpHoveringFace().setImage(hvImage);
    return button;
  }
View Full Code Here

   *          a click handler to which to bind the button
   * @return the button
   */
  public static PushButton createPushButtonWithImageStates(Image upImage,
      String styleName, ClickHandler handler) {
    final PushButton button = new PushButton(upImage, handler);
    button.setStyleName(styleName);
    return button;
  }
View Full Code Here

    ((Label)widget).setText(s);
    widget.setVisible(_size > 0);
  }

  protected Widget createLoadingWidget() {
    PushButton loading = new PushButton();
    loading.setStylePrimaryName(STYLE_LOADING);
    return loading;
  }
View Full Code Here

            break;
        }
        fireChange();
      }
    };
    PushButton button = new PushButton();
    button.setStylePrimaryName(STYLES_BROWSER[type]);
    button.setEnabled(enabled);
    if(enabled) button.addClickHandler(clickHandler);
    return button;
  }
View Full Code Here

  protected Widget createGotoWidget() {
    final TextBox gotoPage = new TextBox();
    int maxlen = String.valueOf(computeNumPages()).length();
    gotoPage.setMaxLength(maxlen);
    gotoPage.setVisibleLength(maxlen);
    final PushButton go = new PushButton();
    go.setStylePrimaryName(STYLE_GOTO_BUTTON);
    go.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        setPage(Integer.parseInt(gotoPage.getText()) - 1);
        gotoPage.setText("");
        go.setEnabled(false);
        fireChange();
      }
    });
    go.setEnabled(false);
    gotoPage.addKeyDownHandler(new KeyDownHandler() {
      public void onKeyDown(final KeyDownEvent event) {
        final int keyCode = event.getNativeKeyCode();
        DeferredCommand.addCommand(new Command() {
          public void execute() {
            int page = -1;
            try {
              page = Integer.parseInt(gotoPage.getText()) - 1;
            } catch(NumberFormatException e) {
            }
            go.setEnabled(page >= 0 && page < computeNumPages());
            if(keyCode == KeyCodes.KEY_ENTER && go.isEnabled()) {
              setPage(Integer.parseInt(gotoPage.getText()) - 1);
              gotoPage.setText("");
              go.setEnabled(false);
              fireChange();
            }
          }
        });
      }
View Full Code Here

    int col = 0;

    table.setWidget(row, col++, link(ad.getAccount()));

    if (ad.canRemove()) {
      final PushButton remove = new PushButton( //
          new Image(Util.R.removeReviewerNormal()), //
          new Image(Util.R.removeReviewerPressed()));
      remove.setTitle(Util.M.removeReviewer( //
          FormatUtil.name(accountCache.get(ad.getAccount()))));
      remove.setStyleName(Gerrit.RESOURCES.css().removeReviewer());
      remove.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          doRemove(ad, remove);
        }
      });
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.PushButton

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.