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

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

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

Button.setToolTip介绍

暂无

代码示例

代码示例来源:origin: com.isotrol.impe3/impe3-gui-common

  1. /**
  2. * Creates a generic Button for the specified params.<br/> Does not add it to any container.<br/>
  3. * @param label text to display on the button
  4. * @param tooltip tooltip shown when hovering the button. May be <code>null</code>
  5. * @param style the button style. May be <code>null</code>
  6. * @param listener button selection listener. May be <code>null</code>
  7. * @return
  8. */
  9. public Button createGenericButton(String label, String tooltip, String style,
  10. SelectionListener<ButtonEvent> listener) {
  11. Button b = new Button(label);
  12. if (!Util.emptyString(tooltip)) {
  13. b.setToolTip(tooltip);
  14. }
  15. if (style != null) {
  16. b.setIconStyle(style);
  17. }
  18. if (listener != null) {
  19. b.addSelectionListener(listener);
  20. }
  21. return b;
  22. }

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

  1. /**
  2. * Sets the tool bar's messages.
  3. *
  4. * @param messages the messages
  5. */
  6. public void setMessages(PagingToolBarMessages messages) {
  7. msgs = messages;
  8. if (showToolTips) {
  9. first.setToolTip(msgs.getFirstText());
  10. prev.setToolTip(msgs.getPrevText());
  11. next.setToolTip(msgs.getNextText());
  12. last.setToolTip(msgs.getLastText());
  13. refresh.setToolTip(msgs.getRefreshText());
  14. } else {
  15. first.removeToolTip();
  16. prev.removeToolTip();
  17. next.removeToolTip();
  18. last.removeToolTip();
  19. refresh.removeToolTip();
  20. }
  21. if (GXT.isAriaEnabled()) {
  22. first.getAriaSupport().setLabel(msgs.getFirstText());
  23. prev.getAriaSupport().setLabel(msgs.getPrevText());
  24. next.getAriaSupport().setLabel(msgs.getNextText());
  25. last.getAriaSupport().setLabel(msgs.getLastText());
  26. refresh.getAriaSupport().setLabel(msgs.getRefreshText());
  27. }
  28. beforePage.setHtml(msgs.getBeforePageText());
  29. }

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

  1. protected Button createButton(AbstractImagePrototype icon, final String tt, String toolTipTitle) {
  2. Button item = new Button() {
  3. @Override
  4. protected void afterRender() {
  5. super.afterRender();
  6. if (GXT.isAriaEnabled()) buttonEl.dom.setTitle(tt);
  7. }
  8. };
  9. item.setIcon(icon);
  10. item.setTabIndex(-1);
  11. ToolTipConfig cfg = new ToolTipConfig(toolTipTitle, tt);
  12. item.setToolTip(cfg);
  13. if (GXT.isAriaEnabled()) {
  14. item.setData("gxt-menutext", toolTipTitle);
  15. }
  16. item.addSelectionListener(btnListener);
  17. return item;
  18. }

代码示例来源:origin: geoserver/geofence

  1. ruleDetailsButton.setToolTip("Show Rule Details");

代码示例来源:origin: geoserver/geofence

  1. ruleDetailsButton.setIcon(Resources.ICONS.table());
  2. ruleDetailsButton.setToolTip("Edit this rule");
  3. ruleDetailsButton.setEnabled(true);

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

  1. protected Button createColorButton(AbstractImagePrototype icon, String toolTip, String toolTipTitle,
  2. Listener<ComponentEvent> listener) {
  3. Button item = new Button();
  4. item.setIcon(icon);
  5. item.setTabIndex(-1);
  6. ToolTipConfig cfg = new ToolTipConfig(toolTipTitle, toolTip);
  7. item.setToolTip(cfg);
  8. if (GXT.isAriaEnabled()) {
  9. item.setData("gxt-menutext", toolTipTitle);
  10. }
  11. ColorMenu menu = new ColorMenu();
  12. menu.getColorPalette().addListener(Events.Select, listener);
  13. item.setMenu(menu);
  14. return item;
  15. }

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

  1. monthBtn.setToolTip(getMessages().getMonthYearText());
  2. monthBtn.render(el().selectNode(".x-date-middle").dom);
  3. monthBtn.el().child("em").addStyleName("x-btn-arrow");

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

  1. todayBtn.setToolTip(messages.getTodayTip());

相关文章