use of org.eclipse.jface.viewers.ComboBoxViewerCellEditor in project hale by halestudio.
the class TaskStatusEditingSupport method getCellEditor.
/**
* @see EditingSupport#getCellEditor(Object)
*/
@Override
protected CellEditor getCellEditor(Object element) {
ComboBoxViewerCellEditor editor = new ComboBoxViewerCellEditor((Composite) getViewer().getControl(), SWT.READ_ONLY);
editor.setContentProvider(ArrayContentProvider.getInstance());
editor.setLabelProvider(new LabelProvider());
// editor.setInput(new Object[] { TaskStatus.NEW, TaskStatus.ACTIVE, TaskStatus.COMPLETED,
// TaskStatus.IGNORED });
// TODO Make this depend on the task type
editor.setInput(new Object[] { TaskStatus.NEW, TaskStatus.COMPLETED });
return editor;
}
use of org.eclipse.jface.viewers.ComboBoxViewerCellEditor in project tbd-studio-se by Talend.
the class RelationshipTableView method createComboBoxCellEditor.
private ComboBoxViewerCellEditor createComboBoxCellEditor(Table table) {
ComboBoxViewerCellEditor cellEditor = new ComboBoxViewerCellEditor(table);
cellEditor.setContenProvider(new IStructuredContentProvider() {
@Override
public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
}
@Override
public void dispose() {
}
@Override
public Object[] getElements(Object arg0) {
return (String[]) arg0;
}
});
cellEditor.setLabelProvider(new LabelProvider() {
@Override
public String getText(Object element) {
return (String) element;
}
});
cellEditor.setInput(Relationship.Direction.getNames());
cellEditor.setValue(Relationship.Direction.OUTGOING.getName());
return cellEditor;
}
Aggregations