當前位置: 首頁>>代碼示例>>Java>>正文


Java CCombo.getData方法代碼示例

本文整理匯總了Java中org.eclipse.swt.custom.CCombo.getData方法的典型用法代碼示例。如果您正苦於以下問題:Java CCombo.getData方法的具體用法?Java CCombo.getData怎麽用?Java CCombo.getData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.custom.CCombo的用法示例。


在下文中一共展示了CCombo.getData方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getFieldNameModifyListener

import org.eclipse.swt.custom.CCombo; //導入方法依賴的package包/類
/**
 * Gets the field name modify listener.
 * 
 * @param tableViewer
 *            the table viewer
 * @param conditionsList
 *            the conditions list
 * @param fieldsAndTypes
 *            the fields and types
 * @param fieldNames
 *            the field names
 * @param saveButton
 *            the save button
 * @param displayButton
 *            the display button
 * @return the field name modify listener
 */
public ModifyListener getFieldNameModifyListener(final TableViewer tableViewer, final List<Condition> conditionsList,
		final Map<String, String> fieldsAndTypes, final String[] fieldNames, final Button saveButton, final Button displayButton) {
	ModifyListener listener = new ModifyListener() {
		
		@Override
		public void modifyText(ModifyEvent e) {
			CCombo source = (CCombo) e.getSource();
			int index = (int) source.getData(FilterConstants.ROW_INDEX);
			Condition filterConditions = conditionsList.get(index);
			String fieldName = source.getText();
			filterConditions.setFieldName(fieldName);
			
			if(StringUtils.isNotBlank(fieldName)){
				String fieldType = fieldsAndTypes.get(fieldName);
				TableItem item = tableViewer.getTable().getItem(index);
				CCombo conditionalCombo = (CCombo) item.getData(FilterConditionsDialog.CONDITIONAL_OPERATORS);
				if(conditionalCombo != null && StringUtils.isNotBlank(fieldType)){
					conditionalCombo.setText(filterConditions.getConditionalOperator());
					conditionalCombo.setItems(FilterHelper.INSTANCE.getTypeBasedOperatorMap().get(fieldType));
					new AutoCompleteField(conditionalCombo, new CComboContentAdapter(), conditionalCombo.getItems());
				}
			}
			validateCombo(source);
			toggleSaveDisplayButton(conditionsList, fieldsAndTypes, fieldNames, saveButton, displayButton);
		}
	};
	return listener;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:46,代碼來源:FilterHelper.java

示例2: createComboCommand

import org.eclipse.swt.custom.CCombo; //導入方法依賴的package包/類
/**
     * DOC nrousseau Comment method "createComboCommand".
     * 
     * @param source
     * @return
     */
    private PropertyChangeCommand createComboCommand(CCombo combo) {
        String paramName = (String) combo.getData(PARAMETER_NAME);

        IElementParameter param = elem.getElementParameter(paramName);

        String value = combo.getText();

//        for (int j = 0; j < param.getListItemsValue().length; j++) {
//            if (combo.getText().equals(param.getListItemsDisplayName()[j])) {
//                value = (String) param.getListItemsValue()[j];
//            }
//        }
        if (value.equals(param.getValue())) {
            return null;
        }

        return new PropertyChangeCommand(elem, paramName, value);
    }
 
開發者ID:Talend,項目名稱:tesb-studio-se,代碼行數:25,代碼來源:RouteResourceController.java

示例3: modifyText

import org.eclipse.swt.custom.CCombo; //導入方法依賴的package包/類
@Override
public void modifyText(ModifyEvent event) {
	CCombo combo = (CCombo) event.widget;
	int column = (int) combo.getData("column");
	String oldValue = ((TableItem) combo.getData("item")).getText(column);
	String newValue = combo.getText();
	logger.info(String.format("Updating %s = %s", oldValue, newValue));
	if (selectorFromSWD.containsValue(newValue)) {
		((TableItem) combo.getData("item")).setText(column, newValue);
	}
}
 
開發者ID:sergueik,項目名稱:SWET,代碼行數:12,代碼來源:TableEditorEx.java

示例4: processConditionalOperator

import org.eclipse.swt.custom.CCombo; //導入方法依賴的package包/類
private void processConditionalOperator(CCombo source, List<Condition> conditionsList, Map<String, String> fieldsAndTypes,
		String[] fieldNames, Button saveButton, Button displayButton){
	int index = (int) source.getData(FilterConstants.ROW_INDEX);
	Condition filterConditions = conditionsList.get(index);
	filterConditions.setConditionalOperator(source.getText());
	validateCombo(source);
	toggleSaveDisplayButton(conditionsList, fieldsAndTypes, fieldNames, saveButton, displayButton);
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:9,代碼來源:FilterHelper.java

示例5: processRelationalOperator

import org.eclipse.swt.custom.CCombo; //導入方法依賴的package包/類
private void processRelationalOperator(CCombo source, List<Condition> conditionsList, Map<String, String> fieldsAndTypes,
		String[] fieldNames, Button saveButton, Button displayButton){
	int index = (int) source.getData(FilterConstants.ROW_INDEX);
	Condition filterConditions = conditionsList.get(index);
	filterConditions.setRelationalOperator(source.getText());
	if(index != 0){
		validateCombo(source);
	}
	toggleSaveDisplayButton(conditionsList, fieldsAndTypes, fieldNames, saveButton, displayButton);
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:11,代碼來源:FilterHelper.java

示例6: getTableItem

import org.eclipse.swt.custom.CCombo; //導入方法依賴的package包/類
private TableItem getTableItem(CCombo source) {
	TableEditor tableEditor = (TableEditor) source.getData(FilterConstants.CONDITIONAL_EDITOR);
	TableItem tableItem = tableEditor.getItem();
	return tableItem;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:6,代碼來源:FilterHelper.java


注:本文中的org.eclipse.swt.custom.CCombo.getData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。