本文整理汇总了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);
}
}
}
}
示例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;
}
}
示例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;
}
示例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;
}
示例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());
}
}
示例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("");
}
});
}
示例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;
}