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

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

本文整理了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

  1. /**
  2. * Sets label for uload button
  3. *
  4. * @param text new label
  5. */
  6. public void setUploadButtonText(String text) {
  7. uploadButton.setText(text);
  8. }
  9. }

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

  1. /**
  2. * Sets label for uload button
  3. *
  4. * @param text new label
  5. */
  6. public void setUploadButtonText(String text) {
  7. fileUploadButton.setText(text);
  8. }

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

  1. public void setDirty(boolean dirty) {
  2. Button currentSaveButton = getSaveButton();
  3. if (currentSaveButton != null) {
  4. currentSaveButton.setEnabled(dirty);
  5. if (dirty) {
  6. currentSaveButton.setText(I18N.CONSTANTS.save());
  7. currentSaveButton.setIcon(IconImageBundle.ICONS.save());
  8. } else {
  9. currentSaveButton.setText(I18N.CONSTANTS.saved());
  10. }
  11. }
  12. }

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

  1. @Override
  2. protected void createButtons() {
  3. button = new Button();
  4. button.setText(I18N.CONSTANTS.cancel());
  5. button.addSelectionListener(new SelectionListener<ButtonEvent>() {
  6. @Override
  7. public void componentSelected(ButtonEvent ce) {
  8. ExportDialog.this.canceled = true;
  9. bar.reset();
  10. hide();
  11. }
  12. });
  13. getButtonBar().add(button);
  14. }

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

  1. @Override
  2. public void handleEvent(BaseEvent be) {
  3. if (searchPresenter.getSelection() == null) {
  4. useLocationButton.disable();
  5. } else {
  6. useLocationButton.enable();
  7. useLocationButton.setText(I18N.MESSAGES.useLocation(searchPresenter.getSelection().getName()));
  8. }
  9. }
  10. });

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

  1. private void createAddLayerButton() {
  2. Button addLayerButton = new Button();
  3. addLayerButton.setText(I18N.CONSTANTS.add());
  4. addLayerButton.addListener(Events.Select, new SelectionListener<ButtonEvent>() {
  5. @Override
  6. public void componentSelected(ButtonEvent ce) {
  7. final NewLayerWizard wizard = new NewLayerWizard(service, locator);
  8. addLayersDialog = new WizardDialog(wizard);
  9. addLayersDialog.show(new WizardCallback() {
  10. @Override
  11. public void onFinished() {
  12. addLayer(wizard.createLayer());
  13. }
  14. });
  15. }
  16. });
  17. addLayerButton.setIcon(IconImageBundle.ICONS.add());
  18. layersPanel.getHeader().addTool(addLayerButton);
  19. }

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

  1. private void initiateDownload(String url) {
  2. bar.reset();
  3. bar.updateProgress(1.0, I18N.CONSTANTS.downloadReady());
  4. button.setText(I18N.CONSTANTS.close());
  5. tryStartDownloadWithIframe(url);
  6. downloadLink.getElement().setAttribute("href", url);
  7. downloadLink.setVisible(true);
  8. layout(true);
  9. }

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

  1. private void addButtons() {
  2. setButtons(Dialog.OKCANCEL);
  3. getButtonById(Dialog.OK).setText(I18N.CONSTANTS.export());
  4. getButtonById(Dialog.OK).addSelectionListener(new SelectionListener<ButtonEvent>() {
  5. @Override
  6. public void componentSelected(ButtonEvent buttonEvent) {
  7. String optionSelected = optionGroup.getValue().getValueAttribute();
  8. hide();
  9. if (callback != null) {
  10. callback.apply(optionSelected);
  11. }
  12. }
  13. });
  14. getButtonById(Dialog.CANCEL).addSelectionListener(new SelectionListener<ButtonEvent>() {
  15. @Override
  16. public void componentSelected(ButtonEvent buttonEvent) {
  17. hide();
  18. }
  19. });
  20. }

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

  1. monthBtn.setText(t);

相关文章