public class ElementField extends AbstractField
Element
values.
Uses a TextWrapperForIElement.changeSupportPROP_VALUE| Constructor and Description |
|---|
ElementField(FormToolkit toolkit,
Composite parent,
IFormFieldData model) |
ElementField(FormToolkit toolkit,
Composite parent,
IFormFieldData model,
java.util.List<java.lang.Class<? extends MObject>> allowedMetaclasses) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply()
Store the field value in the model.
|
Control |
createControl(FormToolkit toolkit,
Composite parent)
Create the edition control.
|
java.lang.String |
getValidationError()
Default implementation that always return null.
|
void |
refresh()
Refresh the value displayed by the field.
|
addPropertyChangeListener, fireValueChanged, getComposite, getControl, getHelpText, getLabel, getModel, isVertical, layout, removePropertyChangeListener, setEditable, setHelpText, setModel, setVerticalpublic ElementField(FormToolkit toolkit,
Composite parent,
IFormFieldData model,
java.util.List<java.lang.Class<? extends MObject>> allowedMetaclasses)
public ElementField(FormToolkit toolkit,
Composite parent,
IFormFieldData model)
public void apply()
IFieldMay throw a runtime exception if the field value is not valid.
apply in interface IFieldapply in class AbstractFieldpublic Control createControl(FormToolkit toolkit,
Composite parent)
createControl in class AbstractFieldtoolkit - the FormToolkitparent - the parent compositepublic java.lang.String getValidationError()
AbstractFieldShould be redefined if the implementation widget may contain invalid values.
getValidationError in interface IFieldgetValidationError in class AbstractFieldIField.apply() may be called safely, an error message in other cases.public void refresh()
The field will typically query its IFormFieldData model and refresh its contents.