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


Java ICellModifier类代码示例

本文整理汇总了Java中org.eclipse.jface.viewers.ICellModifier的典型用法代码示例。如果您正苦于以下问题:Java ICellModifier类的具体用法?Java ICellModifier怎么用?Java ICellModifier使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ICellModifier类属于org.eclipse.jface.viewers包,在下文中一共展示了ICellModifier类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupCellEditors

import org.eclipse.jface.viewers.ICellModifier; //导入依赖的package包/类
private void setupCellEditors(final Table table) {
	final ComboBoxCellEditor editor= new ComboBoxCellEditor();
	editor.setStyle(SWT.READ_ONLY);
	fTableViewer.setCellEditors(new CellEditor[] { null, editor});
	fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {

		public void selectionChanged(final SelectionChangedEvent event) {
			if (editor.getControl() == null & !table.isDisposed())
				editor.create(table);
			final ISelection sel= event.getSelection();
			if (!(sel instanceof IStructuredSelection))
				return;
			final IStructuredSelection structured= (IStructuredSelection) sel;
			if (structured.size() != 1)
				return;
			final MemberActionInfo info= (MemberActionInfo) structured.getFirstElement();
			editor.setItems(info.getAllowedLabels());
			editor.setValue(new Integer(info.getAction()));
		}
	});

	final ICellModifier cellModifier= new MemberActionCellModifier();
	fTableViewer.setCellModifier(cellModifier);
	fTableViewer.setColumnProperties(new String[] { MEMBER_PROPERTY, ACTION_PROPERTY});
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:26,代码来源:PullUpMemberPage.java

示例2: setupCellEditors

import org.eclipse.jface.viewers.ICellModifier; //导入依赖的package包/类
private void setupCellEditors(final Table table) {
	final ComboBoxCellEditor comboBoxCellEditor= new ComboBoxCellEditor();
	comboBoxCellEditor.setStyle(SWT.READ_ONLY);
	fTableViewer.setCellEditors(new CellEditor[] { null, comboBoxCellEditor});
	fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {

		public void selectionChanged(final SelectionChangedEvent event) {
			if (comboBoxCellEditor.getControl() == null & !table.isDisposed())
				comboBoxCellEditor.create(table);
			Assert.isTrue(event.getSelection() instanceof IStructuredSelection);
			final IStructuredSelection ss= (IStructuredSelection) event.getSelection();
			if (ss.size() != 1)
				return;
			final MemberActionInfo mac= (MemberActionInfo) ss.getFirstElement();
			comboBoxCellEditor.setItems(MemberActionInfoLabelProvider.getAvailableActionLabels(mac));
			comboBoxCellEditor.setValue(new Integer(mac.getAction()));
		}
	});

	final ICellModifier cellModifier= new PushDownCellModifier();
	fTableViewer.setCellModifier(cellModifier);
	fTableViewer.setColumnProperties(new String[] { MEMBER_PROPERTY, ACTION_PROPERTY});
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:24,代码来源:PushDownWizard.java

示例3: getCellEditorImage

import org.eclipse.jface.viewers.ICellModifier; //导入依赖的package包/类
/**
 * To be used by LabelProviders that whant to display a checked/unchecked icon for the CheckboxCellEditor that does
 * not have a Control.
 * 
 * @param cellModifier
 *          The ICellModifier for the CellEditor to provide the value
 * @param element
 *          The current element
 * @param property
 *          The property the cellModifier should return the value from
 */
public Image getCellEditorImage(ICellModifier cellModifier, Object element, String property) {
	Boolean value = (Boolean) cellModifier.getValue(element, property);
	return getCellEditorImage(value);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:16,代码来源:CheckBoxLabelProvider.java

示例4: getCellModifier

import org.eclipse.jface.viewers.ICellModifier; //导入依赖的package包/类
protected abstract ICellModifier getCellModifier(); 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:2,代码来源:ELTSchemaGridWidget.java


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