com.google.gwt.user.client.ui.Button.setHTML()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(129)

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

Button.setHTML介绍

暂无

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Creates a button with the given HTML caption.
 *
 * @param html the HTML caption
 */
public Button(@IsSafeHtml String html) {
 this();
 setHTML(html);
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Creates a button with the given HTML caption.
 *
 * @param html the HTML caption
 */
public Button(String html) {
 this();
 setHTML(html);
}

代码示例来源:origin: de.esoco/gewt

/***************************************
 * {@inheritDoc}
 */
@Override
public void setHTML(String sHtml)
{
  aSubmitButton.setHTML(sHtml);
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Creates a button with the given HTML caption.
 *
 * @param html the HTML caption
 */
public Button(String html) {
 this();
 setHTML(html);
}

代码示例来源:origin: org.jboss.ballroom/widgets

public void setHTML(SafeHtml html) {
  button.setHTML(html);
}

代码示例来源:origin: org.jboss.ballroom/widgets

public void setHTML(String html) {
  button.setHTML(html);
}

代码示例来源:origin: org.jresearch.commons.gwt/org.jresearch.commons.gwt.utils

void updateCancel(final boolean actionsPresents) {
  final SafeHtml btnText = cancelTxt != null ? cancelTxt : actionsPresents ? cancelButton : okButton;
  if (cancel == null) {
    cancel = createButton(new Action(btnText, this::close));
  } else {
    cancel.setHTML(btnText);
  }
}

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

public Button addDeleteButton() { // used for collection subforms
  deleteButton = Optional.of(new Button());
  deleteButton.get().setHTML(ButtonWithIcon.TEMPLATES.withIcon(Icons.INSTANCE.remove()));
  deleteButton.get().setStyleName("btn btn-default btn-xs pull-right");
  this.panel.add(deleteButton.get());
  return deleteButton.get();
}

代码示例来源:origin: org.eclipse.che.core/che-core-ide-app

@Override
public void setLoaderVisibility(boolean isVisible) {
 if (isVisible) {
  btnUpload.setHTML("<i></i>");
  btnUpload.setEnabled(false);
 } else {
  btnUpload.setText(constant.uploadButton());
  btnUpload.setEnabled(true);
 }
}

代码示例来源:origin: org.eclipse.che.core/che-core-ide-app

/** {@inheritDoc} */
 @Override
 public void setLoaderVisibility(boolean isVisible) {
  if (isVisible) {
   importButton.setHTML("<i></i>");
   importButton.setEnabled(false);
  } else {
   importButton.setText(locale.importProjectButton());
   importButton.setEnabled(true);
  }
 }
}

代码示例来源:origin: org.eclipse.che.plugin/che-plugin-java-ext-lang-client

@Override
public void setLoaderVisibility(boolean isVisible) {
 if (isVisible) {
  accept.setHTML("<i></i>");
  accept.setEnabled(false);
 } else {
  accept.setText(locale.moveDialogButtonOk());
  accept.setEnabled(true);
 }
}

代码示例来源:origin: org.eclipse.che.core/che-core-ide-app

@Override
public void setLoaderVisibility(boolean visible) {
 if (visible) {
  saveButton.setHTML("<i></i>");
  saveButton.setEnabled(false);
 } else {
  if (isCreatingNewProject) {
   saveButton.setText(locale.projectWizardDefaultSaveButtonText());
  } else {
   saveButton.setText(locale.projectWizardSaveButtonText());
  }
  saveButton.setEnabled(true);
 }
}

代码示例来源:origin: org.eclipse.che.core/che-core-ide-app

@Inject
public FindResultViewImpl(
  FindResultViewImplUiBinder uiBinder,
  FindResultNodeFactory findResultNodeFactory,
  CoreLocalizationConstant localizationConstant) {
 NodeStorage nodeStorage = new NodeStorage();
 NodeLoader loader = new NodeLoader(emptySet());
 tree = new Tree(nodeStorage, loader);
 Widget contentWidget = uiBinder.createAndBindUi(this);
 setContentWidget(contentWidget);
 setTitle(localizationConstant.actionFullTextSearch());
 this.findResultNodeFactory = findResultNodeFactory;
 nextBtn.setHTML("<i class=\"fa fa-angle-right\" aria-hidden=\"true\"></i>");
 previousBtn.setHTML("<i class=\"fa fa-angle-left\" aria-hidden=\"true\"></i>");
 // do not remove debug id; it's needed for selenium tests
 tree.ensureDebugId("result-search-tree");
 ensureDebugId("find-info-panel");
 DockLayoutPanel dockLayoutPanel = (DockLayoutPanel) contentWidget;
 dockLayoutPanel.add(tree);
 tree.getSelectionModel()
   .addSelectionChangedHandler(event -> delegate.onSelectionChanged(event.getSelection()));
 tree.setAutoSelect(true);
}

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

private Button createClearButton() {
  final Button clearButton = new Button();
  clearButton.setHTML(ButtonWithIcon.TEMPLATES.withIcon(Icons.INSTANCE.remove()));
  clearButton.setStyleName("btn btn-default btn-xs pull-right");
  clearButton.addClickHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      for (int i = 0; i < boxPanel.getWidgetCount(); i++) {
        Widget widget = boxPanel.getWidget(i);
        if (widget instanceof CheckBox) {
          CheckBox checkBox = (CheckBox) widget;
          if (checkBox.getValue() != null && checkBox.getValue()) {
            checkBox.setValue(false, true);
          }
        }
      }
    }
  });
  clearButton.setVisible(false);
  return clearButton;
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

@Override
public void render(final RendererCellReference cell, final String text, final Button button) {
  final boolean buttonEnable = isButtonEnable(cell.getElement().getClassName());
  if (text != null) {
    button.setHTML(text);
  }
  applystyles(button, buttonEnable);
  // this is to allow the button to disappear, if the text is null
  button.setVisible(text != null);
  button.getElement().setId(UIComponentIdProvider.ROLLOUT_ACTION_ID + "." + cell.getColumnIndex());
  button.setEnabled(buttonEnable);
}

代码示例来源:origin: eclipse/hawkbit

@Override
public void render(final RendererCellReference cell, final String text, final Button button) {
  final boolean buttonEnable = isButtonEnable(cell.getElement().getClassName());
  if (text != null) {
    button.setHTML(text);
  }
  applystyles(button, buttonEnable);
  // this is to allow the button to disappear, if the text is null
  button.setVisible(text != null);
  button.getElement().setId(UIComponentIdProvider.ROLLOUT_ACTION_ID + "." + cell.getColumnIndex());
  button.setEnabled(buttonEnable);
}

代码示例来源:origin: eclipse/hawkbit

@Override
public void render(final RendererCellReference cell, final FontIconData iconMetadata, final Button button) {
  if (iconMetadata.getFontIconHtml() != null) {
    button.setHTML(iconMetadata.getFontIconHtml());
  }
  applyStyles(button, iconMetadata.isDisabled(), iconMetadata.getStyle());
  button.getElement().setId(iconMetadata.getId());
  button.getElement().setTitle(iconMetadata.getTitle());
  button.setEnabled(!iconMetadata.isDisabled());
  // this is to allow the button to disappear, if the text is null
  button.setVisible(iconMetadata.getFontIconHtml() != null);
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

@Override
public void render(final RendererCellReference cell, final FontIconData iconMetadata, final Button button) {
  if (iconMetadata.getFontIconHtml() != null) {
    button.setHTML(iconMetadata.getFontIconHtml());
  }
  applyStyles(button, iconMetadata.isDisabled(), iconMetadata.getStyle());
  button.getElement().setId(iconMetadata.getId());
  button.getElement().setTitle(iconMetadata.getTitle());
  button.setEnabled(!iconMetadata.isDisabled());
  // this is to allow the button to disappear, if the text is null
  button.setVisible(iconMetadata.getFontIconHtml() != null);
}

代码示例来源:origin: org.overlord/overlord-commons-gwt

/**
 * Constructor.
 * @param size
 */
public SplitButtonDropdown(ButtonSizeEnum size) {
  actionButton = new Button();
  actionButton.setText("..."); //$NON-NLS-1$
  actionButton.getElement().setClassName(size.getButtonClasses());
  Button ddBtn = new Button();
  ddBtn.setHTML("<span class=\"caret\"></span>"); //$NON-NLS-1$
  ddBtn.getElement().setClassName(size.getButtonClasses() + " dropdown-toggle"); //$NON-NLS-1$
  ddBtn.getElement().setAttribute("data-toggle", "dropdown"); //$NON-NLS-1$ //$NON-NLS-2$
  actions = new UnorderedListPanel();
  actions.getElement().setClassName("dropdown-menu"); //$NON-NLS-1$
  add(actionButton);
  add(ddBtn);
  add(actions);
}

相关文章