当前位置: 首页>>代码示例>>Java>>正文


Java Button.setTitle方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.Button.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java Button.setTitle方法的具体用法?Java Button.setTitle怎么用?Java Button.setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.Button的用法示例。


在下文中一共展示了Button.setTitle方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setButtonsForUrls

import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
public void setButtonsForUrls() {
	urlButtonPanel.clear();
	urlAndShortcutMap = presenter.batchDTO.getUrlAndShortcutMap();
	urlAndTitleMap = presenter.batchDTO.getUrlAndTitleMap();
	if (null != urlAndShortcutMap && !urlAndShortcutMap.isEmpty()) {

		Set<String> urlList = urlAndShortcutMap.keySet();
		for (final String url : urlList) {
			if (urlAndShortcutMap.get(url) != null && !urlAndShortcutMap.get(url).isEmpty()) {
				String buttonName = LocaleDictionary.get().getConstantValue(urlAndApplicationMap.get(url));

				Button button = new Button(buttonName, new ClickHandler() {

					@Override
					public void onClick(ClickEvent arg0) {
						presenter.showExternalAppForHtmlPattern(urlAndShortcutMap.get(url), urlAndTitleMap.get(url));
					}
				});
				button.setWidth("55px");
				button.setVisible(true);
				String title = url.substring(url.indexOf('('), url.length());
				button.setTitle(title);
				urlButtonPanel.setSpacing(5);
				urlButtonPanel.add(button);
			}
		}

	}
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:30,代码来源:ReviewValidatePanel.java

示例2: render

import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
public Widget render(Row row, Column column, Object value) {
  if(value == null || !(value instanceof String)) {
    return null;
  } else {
    Button button = new Button((String)value);
    if(_title != null) button.setTitle(_title);
    return button;
  }
}
 
开发者ID:sanderberents,项目名称:gwtlib,代码行数:10,代码来源:ButtonRenderer.java

示例3: createChangeAction

import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
private Button createChangeAction() {
  final Button createChange = new Button(AdminConstants.I.buttonCreateChange());
  createChange.setStyleName("");
  createChange.setTitle(AdminConstants.I.buttonCreateChangeDescription());
  createChange.addClickHandler(
      new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          CreateChangeAction.call(createChange, getProjectKey().get());
        }
      });
  return createChange;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:14,代码来源:ProjectInfoScreen.java

示例4: createEditConfigAction

import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
private Button createEditConfigAction() {
  final Button editConfig = new Button(AdminConstants.I.buttonEditConfig());
  editConfig.setStyleName("");
  editConfig.setTitle(AdminConstants.I.buttonEditConfigDescription());
  editConfig.addClickHandler(
      new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
          EditConfigAction.call(editConfig, getProjectKey());
        }
      });
  return editConfig;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:14,代码来源:ProjectInfoScreen.java

示例5: a2b

import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
private static void a2b(NativeMap<ActionInfo> actions, String a, Button b) {
  if (actions.containsKey(a)) {
    b.setVisible(true);
    ActionInfo actionInfo = actions.get(a);
    b.setTitle(actionInfo.title());
    b.setEnabled(actionInfo.enabled());
  }
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:9,代码来源:Actions.java

示例6: ValidatePanel

import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
public ValidatePanel() {
	super();
	initWidget(BINDER.createAndBindUi(this));
	scrollPanel.addStyleName(ReviewValidateConstants.OVERFLOW_SCROLL);
	scrollValidationTableFocusPanel.add(validationTable);
	scrollValidationTableFocusPanel.setHeight("98%");
	scrollValidationTableFocusPanel.setWidth("99%");
	scrollPanel.setHeight("100%");
	scrollPanel.add(scrollValidationTableFocusPanel);
	fuzzySearchBtn = new Button();
	showTableViewBtn = new Button();
	showTableViewBtn.setStyleName("tableViewButton");
	showTableViewBtn.setTitle(LocaleDictionary.get().getConstantValue(ReviewValidateConstants.TITLE_TABLE_VIEW_TOOLTIP));
	fuzzySearchText = new TextBox();
	fuzzySearchBtn.setText(LocaleDictionary.get().getConstantValue(ReviewValidateConstants.FUZZY_SEARCH_GO_BTN));
	fuzzySearchBtn.setTitle(LocaleDictionary.get().getConstantValue(ReviewValidateConstants.FUZZY_SEARCH_TOOLTIP));
	fuzzySearchBtn.setStyleName("fuzzySearchButton");

	fuzzySearchTextBox = new ValidatableWidget<TextBox>(fuzzySearchText);
	fuzzySearchTextBox.getWidget().addValueChangeHandler(new ValueChangeHandler<String>() {

		@Override
		public void onValueChange(ValueChangeEvent<String> event) {
			fuzzySearchTextBox.toggleValidDateBox();
			fuzzySearchTextBox.getWidget().addStyleName("validatePanelListBox");
		}
	});
	// fuzzySearchTextBox.addValidator(new EmptyStringValidator(fuzzySearchText));
	fuzzySearchTextBox.getWidget().addStyleName("validatePanelListBox");
	fuzzySearchText.addKeyboardListener(new KeyboardListenerAdapter() {

		public void onKeyPress(Widget sender, char keyCode, int modifiers) {
			if (keyCode == (char) KEY_ENTER) {
				fuzzySearchBtn.click();
			}
		}
	});

	showTableViewBtn.addClickHandler(new ClickHandler() {

		@Override
		public void onClick(ClickEvent arg0) {
			presenter.setTableView(Boolean.TRUE);
			presenter.onTableViewButtonClicked();
		}
	});

	fuzzySearchBtn.addClickHandler(new ClickHandler() {

		@Override
		public void onClick(ClickEvent clickEvent) {
			ScreenMaskUtility.maskScreen();
			String value = fuzzySearchText.getValue();
			if (null == value || value.trim().isEmpty()) {
				final ConfirmationDialog confirmationDialog = ConfirmationDialogUtil.showConfirmationDialog(LocaleDictionary.get()
						.getMessageValue(ReviewValidateMessages.MSG_FUZZY_SEARCH_INVALID_ENTRY), LocaleDictionary.get()
						.getConstantValue(ReviewValidateConstants.FUZZY_SEARCH_TOOLTIP), Boolean.TRUE);
				confirmationDialog.addDialogListener(new DialogListener() {

					@Override
					public void onOkClick() {
						confirmationDialog.hide();
						ScreenMaskUtility.unmaskScreen();
						presenter.setFocus();
					}

					@Override
					public void onCancelClick() {
						ScreenMaskUtility.unmaskScreen();
						presenter.setFocus();
					}
				});

			} else {
				performFuzzySearch(value);
			}
			fuzzySearchText.setText("");
		}
	});

}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:82,代码来源:ValidatePanel.java

示例7: makeButton

import com.google.gwt.user.client.ui.Button; //导入方法依赖的package包/类
public static Button makeButton(String text, String tip, ClickHandler handler) {
    Button b = new Button(text, handler);
    b.setTitle(tip);
    b.setStyleName("panel-button");
    return b;
}
 
开发者ID:lsst,项目名称:firefly,代码行数:7,代码来源:GwtUtil.java


注:本文中的com.google.gwt.user.client.ui.Button.setTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。