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


Java ListBox.setTitle方法代码示例

本文整理汇总了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;
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:32,代码来源:ValidatePanel.java

示例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;
  }
}
 
开发者ID:sanderberents,项目名称:gwtlib,代码行数:14,代码来源:ListBoxRenderer.java

示例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);
	}
 
开发者ID:dpinney,项目名称:essence,代码行数:62,代码来源:AnalyzerAndReportUI.java


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