本文整理汇总了Java中com.google.gwt.user.client.ui.ListBox.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Java ListBox.setTitle方法的具体用法?Java ListBox.setTitle怎么用?Java ListBox.setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.ListBox
的用法示例。
在下文中一共展示了ListBox.setTitle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setValidationTableWidgets
import com.google.gwt.user.client.ui.ListBox; //导入方法依赖的package包/类
private int setValidationTableWidgets(int index, final DocField field, String fieldTypeDescription, List<String> values,
boolean isReadOnly, ValidatableWidget<ListBox> tempListBox, final String sampleValueString, List<String> regexPatternList) {
int indexTemp = index;
ValidatableWidget<ListBox> listBox = tempListBox;
if (listBox == null) {
listBox = GWTListBoxControl.createGWTListControl(field.getType(), field.getValue(), regexPatternList, values);
}
final ValidatableWidget<ListBox> listBoxWidget = listBox;
listBoxWidget.getWidget().addStyleName(ReviewValidateConstants.DROPBOX_STYLE);
final ListBox vWidget = listBoxWidget.getWidget();
vWidget.setTitle(field.getName());
final String isActualValueFound = vWidget.getElement().getAttribute("isActualValueFound");
// decision to removeOverlay in case value not found in drop down
vWidget.insertItem(LocaleDictionary.get().getMessageValue(ReviewValidateMessages.NONE_SELECTED_TEXT), 0);
if (!Boolean.parseBoolean(isActualValueFound != null ? isActualValueFound : "")) {
vWidget.setSelectedIndex(0);
}
validateListBoxSelection(listBoxWidget);
addVWidgetHandlers(field, sampleValueString, listBoxWidget, vWidget);
Label fieldName = null;
if (fieldTypeDescription != null && !fieldTypeDescription.isEmpty()) {
fieldName = new Label(fieldTypeDescription);
validationTable.setWidget(indexTemp++, 0, fieldName);
} else {
fieldName = new Label(field.getName());
validationTable.setWidget(indexTemp++, 0, fieldName);
}
validationTable.setWidget(indexTemp++, 0, vWidget);
addDocFieldWidget(presenter.document.getIdentifier(), fieldName, field, null, listBox, null, isReadOnly);
return indexTemp;
}
示例2: render
import com.google.gwt.user.client.ui.ListBox; //导入方法依赖的package包/类
public Widget render(Row row, Column column, Object value) {
if(value == null || !(value instanceof String)) {
return null;
} else {
ListBox listbox = new ListBox();
for(int i = 0; i < _values.length; ++i) {
listbox.addItem(_values[i]);
if(value.equals(_values[i])) listbox.setSelectedIndex(i);
}
if(_title != null) listbox.setTitle(_title);
return listbox;
}
}
示例3: setupDetectorPanel
import com.google.gwt.user.client.ui.ListBox; //导入方法依赖的package包/类
private void setupDetectorPanel(HorizontalPanel detectorPanel, final Label errorLabelActivateDetector,
final ListDataProvider<AnalyzerResultDTO> dataProvider) {
// DoS detector panel
Label detectorTypeLabel = new Label("Filter Type");
final ListBox detectorType = new ListBox();
detectorType.setName("Detector Type");
detectorType.setTitle("Detector Type Title");
detectorType.addItem("VALUE_OUT_OF_BOUND", "VALUE_OUT_OF_BOUND");
detectorType.addItem("MS_EP_CONNECTIVITY", "MS_EP_CONNECTIVITY");
detectorType.addItem("WRONG_MSG_TO_MS_EP", "WRONG_MSG_TO_MS_EP");
//detectorType.addItem("ERR_MSG_FROM_MS_EP", "ERR_MSG_FROM_MS_EP");
//detectorType.addItem("WRONG_MSG_FORMAT", "WRONG_MSG_FORMAT");
detectorType.addItem("DENIAL_OF_SERVICE", "DENIAL_OF_SERVICE");
//detectorType.addItem("NW_SEGMENTATION", "NW_SEGMENTATION");
//detectorType.addItem("NEW_HOST", "NEW_HOST");
detectorType.setWidth("220");
detectorPanel.add(HTMLFormatUtil.getPaddingLabel());
detectorPanel.add(detectorTypeLabel);
detectorPanel.add(detectorType);
// Result display button
Button displayDetectorResultButton = new Button("Show Detector Findings");
// displayDetectorResultButton.addClickHandler(new ClickHandler() {
// public void onClick(ClickEvent event) {
// greetingService.getAnalyzerResultsByType(
// DetectionRuleTypeDTO.valueOf(detectorType.getValue(detectorType.getSelectedIndex())),
// new AsyncCallbackAdapter<List<AnalyzerResultDTO>>() {
// // Called by onFailure if the session is still valid
// public void doFailureAction() {
// errorLabelActivateDetector.setText(SERVER_ERROR);
// }
//
// public void onSuccess(List<AnalyzerResultDTO> result) {
// dataProvider.setList(result);
// }
// });
// }
// });
detectorPanel.add(HTMLFormatUtil.getPaddingLabel());
detectorPanel.add(displayDetectorResultButton);
// Result display button
Button displayAllResultButton = new Button("Show All Findings");
// displayAllResultButton.addClickHandler(new ClickHandler() {
// public void onClick(ClickEvent event) {
// greetingService.getAnalyzerResults(new AsyncCallbackAdapter<List<AnalyzerResultDTO>>() {
// // Called by onFailure if the session is still valid
// public void doFailureAction() {
// errorLabelActivateDetector.setText(SERVER_ERROR);
// }
//
// public void onSuccess(List<AnalyzerResultDTO> result) {
// dataProvider.setList(result);
// }
// });
// }
// });
detectorPanel.add(HTMLFormatUtil.getPaddingLabel());
detectorPanel.add(displayAllResultButton);
}