1 package net.mograsim.plugin.tables.mi;
3 import org.eclipse.jface.viewers.CellEditor;
4 import org.eclipse.swt.widgets.Composite;
5 import org.eclipse.swt.widgets.Control;
7 public class CyclingCellEditor extends CellEditor
9 private final int size;
10 private int index = -1;
12 public CyclingCellEditor(int size)
18 public CyclingCellEditor(Composite parent, int size)
24 public CyclingCellEditor(Composite parent, int size, int style)
31 protected Control createControl(Composite parent)
38 protected Object doGetValue()
44 protected void doSetFocus()
50 protected void doSetValue(Object index)
52 this.index = (Integer) index;
56 public void activate()
58 index = (index + 1) % size;
59 fireApplyEditorValue();