public class EntryCellContentProvider extends java.lang.Object implements IVizCellContentProvider, IVizComboCellContentProvider, ISecretCellContentProvider
Entry
. The text and value for an Entry
are considered the
same thing, while the tooltip is the Entry
's description.PUBLIC_CHAR, SECRET_CHAR
Constructor and Description |
---|
EntryCellContentProvider() |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getAllowedValues(java.lang.Object element)
Gets the
Entry 's allowed values, or an empty list if it has none. |
org.eclipse.swt.graphics.Image |
getImage(java.lang.Object element)
Returns
null for no Image . |
char |
getSecretChar()
Gets the default secret character used to obscure text.
|
java.lang.String |
getText(java.lang.Object element)
Returns the value, which is converted to a string, of the
Entry . |
java.lang.String |
getToolTipText(java.lang.Object element)
Returns the description of the
Entry . |
java.lang.Object |
getValue(java.lang.Object element)
Returns the
Entry 's value. |
boolean |
isEnabled(java.lang.Object element)
By default, any valid
Entry is enabled. |
boolean |
isSecret(java.lang.Object element)
An
Entry should be obscured if its "secret" flag is true. |
boolean |
isValid(java.lang.Object element)
By default, any
Entry that is not null is valid. |
boolean |
requiresCombo(java.lang.Object element)
An
Entry requires a combo widget if its AllowedValueType
is discrete. |
boolean |
setValue(java.lang.Object element,
java.lang.Object value)
Converts the value to a string and sets it as the
Entry 's value. |
public java.util.List<java.lang.String> getAllowedValues(java.lang.Object element)
Entry
's allowed values, or an empty list if it has none.getAllowedValues
in interface IVizComboCellContentProvider
element
- The element whose allowed values are being requested.IVizComboCellContentProvider.requiresCombo(Object)
public org.eclipse.swt.graphics.Image getImage(java.lang.Object element)
null
for no Image
.getImage
in interface IVizCellContentProvider
element
- The element that needs a cell Image
.Image
for the cell, or null if Image
s are not supported.public char getSecretChar()
getSecretChar
in interface ISecretCellContentProvider
public java.lang.String getText(java.lang.Object element)
Entry
.getText
in interface IVizCellContentProvider
element
- The element that needs a string.null
.public java.lang.String getToolTipText(java.lang.Object element)
Entry
.getToolTipText
in interface IVizCellContentProvider
element
- The element that needs a tool tip.null
.public java.lang.Object getValue(java.lang.Object element)
Entry
's value.getValue
in interface IVizCellContentProvider
element
- The element whose value is requested.public boolean isEnabled(java.lang.Object element)
Entry
is enabled.isEnabled
in interface IVizCellContentProvider
element
- The element to test.public boolean isSecret(java.lang.Object element)
Entry
should be obscured if its "secret" flag is true.isSecret
in interface ISecretCellContentProvider
element
- The element to test.public boolean isValid(java.lang.Object element)
Entry
that is not null is valid.isValid
in interface IVizCellContentProvider
element
- The element to test.public boolean requiresCombo(java.lang.Object element)
Entry
requires a combo widget if its AllowedValueType
is discrete.requiresCombo
in interface IVizComboCellContentProvider
element
- The element to test.Combo
widget, false otherwise.IVizComboCellContentProvider.getAllowedValues(Object)
public boolean setValue(java.lang.Object element, java.lang.Object value)
Entry
's value.setValue
in interface IVizCellContentProvider
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.