public abstract class AbstractFieldFactory extends java.lang.Object implements IFieldFactory
IFieldFactory.
Subclass it and implement IFieldFactory.createFields(FormToolkit, Composite, ModelElement, FormFieldPage)
by using createXxxx() methods implemented here.
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractFieldFactory.BasicPage
Basic implementation of
FormFieldPage to be instantiated directly. |
| Constructor and Description |
|---|
AbstractFieldFactory(IModuleContext moduleContext)
Initialize the field factory.
|
| Modifier and Type | Method and Description |
|---|---|
IField |
createFormField(FormToolkit toolkit,
Composite parent,
ModelElement input,
PropertyDefinition pdef)
Create a form field for a specific
PropertyDefinition. |
java.util.List<IField> |
createFormFields(FormToolkit toolkit,
Composite parent,
ModelElement input,
Stereotype stereotype)
Create a form field from a specific
Stereotype. |
java.util.List<IField> |
createGenericFields(FormToolkit toolkit,
Composite parent,
ModelElement input)
Build a fully generic implementation including:
the element's name
every PropertyTableDefinition defined by its stereotypes
|
IField |
createMAttributeField(FormToolkit toolkit,
Composite parent,
ModelElement input,
MAttribute mAtt)
Create a form field from a specific
MAttribute. |
FormFieldPage |
createPage(int id,
java.lang.String label,
Image image)
Create a form field page.
|
IModuleContext |
getModuleContext()
Get the module context whose service may be used to build fields.
|
protected void |
setupFieldLayout(IField aField)
Setup default layout for a
IField. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateFieldPages, createFieldspublic AbstractFieldFactory(IModuleContext moduleContext)
moduleContext - The module contextpublic IField createFormField(FormToolkit toolkit, Composite parent, ModelElement input, PropertyDefinition pdef)
PropertyDefinition.parent - a widget which will be the parent of the new field instance (cannot be null)input - the element to build the form field for.public java.util.List<IField> createFormFields(FormToolkit toolkit, Composite parent, ModelElement input, Stereotype stereotype)
Stereotype.parent - a widget which will be the parent of the new field instance (cannot be null)input - the element to build the form field for.public java.util.List<IField> createGenericFields(FormToolkit toolkit, Composite parent, ModelElement input)
public IField createMAttributeField(FormToolkit toolkit, Composite parent, ModelElement input, MAttribute mAtt)
MAttribute.parent - a widget which will be the parent of the new field instance (cannot be null)input - the element to build the form field for.public FormFieldPage createPage(int id, java.lang.String label, Image image)
id - the idlabel - the page labelimage - the page iconpublic IModuleContext getModuleContext()