public class TreePropertyCellContentProvider extends java.lang.Object implements ICellContentProvider
ICellContentProvider
that matches a table cell with a TreeProperty
.Constructor and Description |
---|
TreePropertyCellContentProvider()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription(java.lang.Object element)
By default, returns the underlying
Entry 's description as a
string, trimmed. |
org.eclipse.swt.graphics.Image |
getImage(java.lang.Object element)
Returns
null for no Image . |
java.lang.String |
getText(java.lang.Object element)
Gets the string displayed in the cell.
|
java.lang.String |
getToolTipText(java.lang.Object element)
The default behavior is to return the same value displayed by
getText(Object) . |
java.lang.Object |
getValue(java.lang.Object element)
By default, returns the underlying
Entry 's value as a string,
trimmed. |
boolean |
isEnabled(java.lang.Object element)
By default, any valid
TreeProperty that is not read-only is
enabled. |
boolean |
isValid(java.lang.Object element)
By default, any non-null
TreeProperty is valid. |
boolean |
setValue(java.lang.Object element,
java.lang.Object value)
By default, converts the value to a string and sets it as the underlying
Entry 's value. |
public TreePropertyCellContentProvider()
emptyText
is set to an empty string.public boolean isValid(java.lang.Object element)
TreeProperty
is valid.isValid
in interface ICellContentProvider
element
- The element to test.public boolean isEnabled(java.lang.Object element)
TreeProperty
that is not read-only is
enabled.isEnabled
in interface ICellContentProvider
element
- The element to test.public java.lang.String getText(java.lang.Object element)
emptyText
is
displayed.INVALID_ELEMENT_TEXT
is displayed.getText
in interface ICellContentProvider
element
- The element that needs a string.null
.public java.lang.String getToolTipText(java.lang.Object element)
getText(Object)
.getToolTipText
in interface ICellContentProvider
element
- The element that needs a tool tip.null
.public org.eclipse.swt.graphics.Image getImage(java.lang.Object element)
null
for no Image
.getImage
in interface ICellContentProvider
element
- The element that needs a cell Image
.Image
for the cell, or null if Image
s are not supported.public java.lang.Object getValue(java.lang.Object element)
Entry
's value as a string,
trimmed.getValue
in interface ICellContentProvider
element
- The element whose value is requested.public boolean setValue(java.lang.Object element, java.lang.Object value)
Entry
's value.setValue
in interface ICellContentProvider
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 java.lang.String getDescription(java.lang.Object element)
Entry
's description as a
string, trimmed.