当前位置: 首页>>代码示例>>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;未经允许,请勿转载。