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

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

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

Button.setTitle介绍

暂无

代码示例

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

@Override
public void updateChangeViewModeButton(ViewMode viewMode) {
 switch (viewMode) {
  case TREE:
   changeViewModeButton.getElement().setInnerHTML(FontAwesome.LIST_UL);
   changeViewModeButton.setTitle(locale.changeListRowListViewButtonText());
   break;
  case LIST:
   changeViewModeButton.getElement().setInnerHTML(FontAwesome.FOLDER);
   changeViewModeButton.setTitle(locale.changeListGroupByDirectoryButtonText());
   break;
 }
}

代码示例来源:origin: org.jvnet.hudson.main/maven3-plugin

public void setNewDocument(final boolean flag) {
  if (flag) {
    saveButton.setText(messages.save());
    saveButton.setTitle(messages.save()); // FIXME: Use sep message for tool-tip
    cancelButton.setText(messages.cancel());
    cancelButton.setTitle(messages.cancel()); // FIXME: Use sep message for tool-tip
  }
  else {
    saveButton.setText(messages.update());
    saveButton.setTitle(messages.update()); // FIXME: Use sep message for tool-tip
    cancelButton.setText(messages.revert());
    cancelButton.setTitle(messages.revert()); // FIXME: Use sep message for tool-tip
  }
}

代码示例来源:origin: com.allen-sauer.gwt.log/gwt-log

@Override
public void setCurrentLogLevel(int level) {
 for (int i = 0; i < levels.length; i++) {
  if (levels[i] < Log.getLowestLogLevel()) {
   levelButtons[i].setEnabled(false);
  } else {
   String levelText = LogUtil.levelToString(levels[i]);
   boolean current = level == levels[i];
   levelButtons[i].setTitle(current ? "Current (runtime) log level is already '" + levelText
     + "'" : "Set current (runtime) log level to '" + levelText + "'");
   boolean active = level <= levels[i];
   levelButtons[i].getElement().getStyle().setColor(active ? getColor(levels[i]) : "#ccc");
  }
 }
}

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

private void createButtons() {
 changeViewModeButton.addClickHandler(clickEvent -> delegate.onChangeViewModeButtonClicked());
 expandButton.setTitle(locale.changeListExpandCollapseAllButtonTitle());
 expandButton.getElement().setInnerHTML(FontAwesome.EXPAND);
 expandButton.addClickHandler(clickEvent -> delegate.onExpandButtonClicked());
 collapseButton.setTitle(locale.changeListCollapseAllButtonTitle());
 collapseButton.getElement().setInnerHTML(FontAwesome.COMPRESS);
 collapseButton.addClickHandler(clickEvent -> delegate.onCollapseButtonClicked());
}

代码示例来源:origin: org.jboss.errai/errai-workspaces

public void setCurrentLogLevel(int level) {
 for (int i = 0; i < levels.length; i++) {
  if (levels[i] < Log.getLowestLogLevel()) {
   levelButtons[i].setEnabled(false);
  } else {
   String levelText = LogUtil.levelToString(levels[i]);
   boolean current = level == levels[i];
   levelButtons[i].setTitle(current ? "Current (runtime) log level is already '" + levelText
     + "'" : "Set current (runtime) log level to '" + levelText + "'");
   boolean active = level <= levels[i];
   DOM.setStyleAttribute(levelButtons[i].getElement(), "color", active ? getColor(levels[i])
     : "#ccc");
  }
 }
}

代码示例来源:origin: oVirt/ovirt-engine

private void updateCurrentValue(final List<T> value, boolean fireEvents) {
  lastValues = value;
  List<String> renderedValues = new ArrayList<>();
  for (T val: value) {
    renderedValues.add(getRenderer().render(Arrays.asList(val)));
  }
  String renderedValue = String.join(",", renderedValues); //$NON-NLS-1$
  if (StringHelper.isNullOrEmpty(renderedValue)) {
    renderedValue = NBSP;
  } else {
    renderedValue = SafeHtmlUtils.htmlEscape(renderedValue);
  }
  ((Element)dropdownButton.getElement().getChild(0)).setInnerHTML(renderedValue);
  dropdownButton.setTitle(renderedValue);
  Scheduler.get().scheduleDeferred(() -> listPanel.setSelected(value));
  if (fireEvents) {
    Scheduler.get().scheduleDeferred(() -> {
      ValueChangeEvent.fire(ListModelMultipleSelectListBox.this, selectedItems());
      // Clear the value so we don't have any leaks
      lastValues = null;
    });
  } else {
    // Clear the value so we don't have any leaks
    lastValues = null;
  }
}

代码示例来源:origin: org.kuali.student.lum/ks-lum-ui-common

moveUpButton.setTitle("Move learning objective up");
moveUpButton.addStyleName("KS-LOMoveUpButton");
moveDownButton.addStyleName("KS-LOMoveDownButton");
moveDownButton.setTitle("Move learning objective down");
deleteButton.setText("Delete");
deleteButton.setTitle("Delete");
deleteButton.addStyleName("KS-LODeleteButton");
indentButton.addStyleName("KS-LOIndentButton");
indentButton.setTitle("Indent learning objective");
outdentButton.addStyleName("KS-LOOutdentButton");
outdentButton.setTitle("Outdent learning objective");

代码示例来源:origin: oVirt/ovirt-engine

private void updateCurrentValue(final T value, boolean fireEvents) {
  setChanging(!ignoreChanging());
  String renderedValue = renderer.render(value);
  if (StringHelper.isNullOrEmpty(renderedValue)) {
    renderedValue = NBSP;
    dropdownButton.setTitle(""); //$NON-NLS-1$
  } else {
    renderedValue = SafeHtmlUtils.htmlEscape(renderedValue);
    dropdownButton.setTitle(renderedValue);
  }
  ((Element)dropdownButton.getElement().getChild(0)).setInnerHTML(renderedValue);
  Scheduler.get().scheduleDeferred(() -> listPanel.setSelected(value));
  currentValue = value;
  if (fireEvents) {
    Scheduler.get().scheduleDeferred(() -> {
      ValueChangeEvent.fire(ListModelListBox.this, currentValue);
      setChanging(false);
    });
  } else {
    setChanging(false);
  }
}

代码示例来源:origin: org.kie.guvnor/guvnor-test-scenario-editor-client

run.setTitle(TestScenarioConstants.INSTANCE.RunScenarioTip());
run.addClickHandler(new ClickHandler() {

代码示例来源:origin: org.kie.guvnor/guvnor-categories-editor-client

newCat.setTitle( Constants.INSTANCE.CreateANewCategory() );
newCat.addClickHandler( new ClickHandler() {
  public void onClick( ClickEvent w ) {
delete.setTitle( Constants.INSTANCE.DeleteSelectedCat() );

相关文章