org.topcased.modeler.uml.sequencediagram.editingsupport
Class ComboBoxEditingSupport
java.lang.Object
org.eclipse.jface.viewers.EditingSupport
org.topcased.modeler.uml.sequencediagram.editingsupport.ComboBoxEditingSupport
public abstract class ComboBoxEditingSupport
- extends org.eclipse.jface.viewers.EditingSupport
When subclassing, you should override doSetValue(Object, Object)
and
doGetValue(Object)
, since these two methods allow one to work
directly with objects from the model (otherwise a combo cell editor works
with strings).
We assume all the items are different from one another.
Every overriden method has been made public because we want to have access to
it from the delegating support.
Constructor Summary |
ComboBoxEditingSupport(org.eclipse.jface.viewers.ColumnViewer viewer,
java.lang.Object[] items,
java.lang.String[] itemsLabels)
Constructs a new ComboBoxEditingSupport for the given
items , having the given itemsLabels . |
Method Summary |
boolean |
canEdit(java.lang.Object element)
|
protected abstract java.lang.Object |
doGetValue(java.lang.Object element)
|
protected abstract void |
doSetValue(java.lang.Object element,
java.lang.Object value)
|
org.eclipse.jface.viewers.CellEditor |
getCellEditor(java.lang.Object element)
|
java.lang.Object |
getValue(java.lang.Object element)
|
void |
setValue(java.lang.Object element,
java.lang.Object value)
|
Methods inherited from class org.eclipse.jface.viewers.EditingSupport |
getViewer, initializeCellEditorValue, saveCellEditorValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComboBoxEditingSupport
public ComboBoxEditingSupport(org.eclipse.jface.viewers.ColumnViewer viewer,
java.lang.Object[] items,
java.lang.String[] itemsLabels)
- Constructs a new
ComboBoxEditingSupport
for the given
items
, having the given itemsLabels
.
- Parameters:
viewer
- items
- itemsLabels
-
canEdit
public boolean canEdit(java.lang.Object element)
- Specified by:
canEdit
in class org.eclipse.jface.viewers.EditingSupport
getCellEditor
public org.eclipse.jface.viewers.CellEditor getCellEditor(java.lang.Object element)
- Specified by:
getCellEditor
in class org.eclipse.jface.viewers.EditingSupport
getValue
public java.lang.Object getValue(java.lang.Object element)
- Specified by:
getValue
in class org.eclipse.jface.viewers.EditingSupport
setValue
public void setValue(java.lang.Object element,
java.lang.Object value)
- Specified by:
setValue
in class org.eclipse.jface.viewers.EditingSupport
doGetValue
protected abstract java.lang.Object doGetValue(java.lang.Object element)
doSetValue
protected abstract void doSetValue(java.lang.Object element,
java.lang.Object value)
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.