예제 #1
0
  /** When the login button is clicked blabla happens */
  @UiHandler("loginButton")
  void onClick(ClickEvent e) {

    if (loginButton.getText().equals("Login")) {
      login();
    } else if (loginButton.getText().equals("Logout")) logout();
  }
  @Override
  public void onClick(ClickEvent event) {
    if (activated_btn.getText().equals("Deactivate")) med.deregisterIndicator(name_lbl.getText());
    else med.registerIndicator(name_lbl.getText());

    med.addExistingIndicators();
  }
예제 #3
0
  public String getButtonText(Object obj) {
    for (int i = 0; i < panel.getWidgetCount(); i++) {
      Button b = (Button) panel.getWidget(i);
      if (b.getElement().getPropertyObject("object") == obj) return b.getText();
    }

    return null;
  }
예제 #4
0
  @Override
  public void onClick(ClickEvent event) {
    Button source = (Button) event.getSource();
    if (buttons.contains(source)) {
      // 文字ボタン
      String letter = source.getText();
      addLetterToAnswer(letter);

    } else if (source == buttonDelete) {
      // 消すボタン
      onErase();

    } else if (source == buttonOk) {
      // OKボタン
      onOk();

    } else {
      throw new AssertionError();
    }
  }
예제 #5
0
 /** Returns the text of the Button */
 public String getText() {
   return loginButton.getText();
 }
예제 #6
0
 public String getText() {
   return button.getText();
 }
예제 #7
0
 ActionMessageBox(Button button) {
   this.activatingButton = button;
   initWidget(uiBinder.createAndBindUi(this));
   send.setText(button.getText());
 }