public class ValueCellContentProvider extends TreePropertyCellContentProvider implements IComboCellContentProvider
ICellContentProvider
geared toward the value
of a TreeProperty
.
Due to the nature of Entry
s with discrete allowed value types
and AdaptiveTreeComposite
s whose types can be associated with such an
Entry
, there are additional classes required to support these
Entry
s in a ColumnViewer
. This class does not
handle any widgets required to make changing these values possible.
ComboCellEditingSupport
Constructor and Description |
---|
ValueCellContentProvider() |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getAllowedValues(java.lang.Object element)
Gets the allowed values for the specified element.
|
java.lang.Object |
getValue(java.lang.Object element)
Gets the value of a
TreeProperty . |
boolean |
requiresCombo(java.lang.Object element)
Returns true if the
TreeProperty corresponds to the type of
AdaptiveTreeComposite or if its wrapped Entry is flagged
as AllowedValueType.Discrete , false otherwise. |
boolean |
setValue(java.lang.Object element,
java.lang.Object value)
Sets the value of a
TreeProperty . |
getDescription, getImage, getText, getToolTipText, isEnabled, isValid
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getImage, getText, getToolTipText, isEnabled, isValid
public java.lang.Object getValue(java.lang.Object element)
TreeProperty
.
The default behavior is acceptable for most Entry
s, but for
those that correspond to the type of AdaptiveTreeComposite
, this
method gets the type of the property's tree.
getValue
in interface ICellContentProvider
getValue
in class TreePropertyCellContentProvider
element
- The element whose value is requested.public boolean setValue(java.lang.Object element, java.lang.Object value)
TreeProperty
.
The default behavior is acceptable for most Entry
s, but for
those that correspond to the type of AdaptiveTreeComposite
, this
method sets the type for the property's tree.
setValue
in interface ICellContentProvider
setValue
in class TreePropertyCellContentProvider
element
- The element whose value is being set.value
- The value that should be set for the element. This is expected
to match the underlying element's value type.public boolean requiresCombo(java.lang.Object element)
TreeProperty
corresponds to the type of
AdaptiveTreeComposite
or if its wrapped Entry
is flagged
as AllowedValueType.Discrete
, false otherwise.requiresCombo
in interface IComboCellContentProvider
element
- The element to test.Combo
widget, false otherwise.IComboCellContentProvider.getAllowedValues(Object)
public java.util.List<java.lang.String> getAllowedValues(java.lang.Object element)
IComboCellContentProvider
getAllowedValues
in interface IComboCellContentProvider
element
- The element whose allowed values are being requested.IComboCellContentProvider.requiresCombo(Object)