當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。