com.extjs.gxt.ui.client.widget.button.Button.setText()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(177)

本文整理了Java中com.extjs.gxt.ui.client.widget.button.Button.setText()方法的一些代码示例,展示了Button.setText()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setText()方法的具体详情如下:
包路径:com.extjs.gxt.ui.client.widget.button.Button
类名称:Button
方法名:setText

Button.setText介绍

[英]Sets the button's text.
[中]设置按钮的文本。

代码示例

代码示例来源:origin: pl.touk.tola/tola

/**
   * Sets label for uload button
   * 
   * @param text new label
   */
  public void setUploadButtonText(String text) {
    uploadButton.setText(text);
  }
}

代码示例来源:origin: pl.touk.top/file-upload-gwtclient-lib

/**
 * Sets label for uload button
 * 
 * @param text new label
 */
public void setUploadButtonText(String text) {
  fileUploadButton.setText(text);
}

代码示例来源:origin: bedatadriven/activityinfo

public void setDirty(boolean dirty) {
  Button currentSaveButton = getSaveButton();
  if (currentSaveButton != null) {
    currentSaveButton.setEnabled(dirty);
    if (dirty) {
      currentSaveButton.setText(I18N.CONSTANTS.save());
      currentSaveButton.setIcon(IconImageBundle.ICONS.save());
    } else {
      currentSaveButton.setText(I18N.CONSTANTS.saved());
    }
  }
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
protected void createButtons() {
  button = new Button();
  button.setText(I18N.CONSTANTS.cancel());
  button.addSelectionListener(new SelectionListener<ButtonEvent>() {
    @Override
    public void componentSelected(ButtonEvent ce) {
      ExportDialog.this.canceled = true;
      bar.reset();
      hide();
    }
  });
  getButtonBar().add(button);
}

代码示例来源:origin: bedatadriven/activityinfo

@Override
  public void handleEvent(BaseEvent be) {
    if (searchPresenter.getSelection() == null) {
      useLocationButton.disable();
    } else {
      useLocationButton.enable();
      useLocationButton.setText(I18N.MESSAGES.useLocation(searchPresenter.getSelection().getName()));
    }
  }
});

代码示例来源:origin: bedatadriven/activityinfo

private void createAddLayerButton() {
  Button addLayerButton = new Button();
  addLayerButton.setText(I18N.CONSTANTS.add());
  addLayerButton.addListener(Events.Select, new SelectionListener<ButtonEvent>() {
    @Override
    public void componentSelected(ButtonEvent ce) {
      final NewLayerWizard wizard = new NewLayerWizard(service, locator);
      addLayersDialog = new WizardDialog(wizard);
      addLayersDialog.show(new WizardCallback() {
        @Override
        public void onFinished() {
          addLayer(wizard.createLayer());
        }
      });
    }
  });
  addLayerButton.setIcon(IconImageBundle.ICONS.add());
  layersPanel.getHeader().addTool(addLayerButton);
}

代码示例来源:origin: bedatadriven/activityinfo

private void initiateDownload(String url) {
  bar.reset();
  bar.updateProgress(1.0, I18N.CONSTANTS.downloadReady());
  button.setText(I18N.CONSTANTS.close());
  tryStartDownloadWithIframe(url);
  downloadLink.getElement().setAttribute("href", url);
  downloadLink.setVisible(true);
  layout(true);
}

代码示例来源:origin: bedatadriven/activityinfo

private void addButtons() {
  setButtons(Dialog.OKCANCEL);
  getButtonById(Dialog.OK).setText(I18N.CONSTANTS.export());
  getButtonById(Dialog.OK).addSelectionListener(new SelectionListener<ButtonEvent>() {
    @Override
    public void componentSelected(ButtonEvent buttonEvent) {
      String optionSelected = optionGroup.getValue().getValueAttribute();
      hide();
      if (callback != null) {
        callback.apply(optionSelected);
      }
    }
  });
  getButtonById(Dialog.CANCEL).addSelectionListener(new SelectionListener<ButtonEvent>() {
    @Override
    public void componentSelected(ButtonEvent buttonEvent) {
      hide();
    }
  });
}

代码示例来源:origin: com.extjs/gxt

monthBtn.setText(t);

相关文章