public abstract class ElementFormPropertyPanel extends java.lang.Object implements IModulePropertyCustomPanel
IModulePropertyCustomPanel
implementation displaying a form for the selected element.
SubClasses should redefine #isRelevantFor(Object)
and initFactory()
only.
The IPanelProvider aspect is delegated to an ElementFormPanel
relying on a IFieldFactory
.
Constructor and Description |
---|
ElementFormPropertyPanel(IModule module,
java.lang.String name,
java.lang.String label,
java.lang.String icon)
Constructor invoked by Modelio when building the module's property page.
|
Modifier and Type | Method and Description |
---|---|
Composite |
createPanel(Composite parent) |
void |
dispose() |
java.lang.String |
getHelpTopic() |
java.nio.file.Path |
getIcon()
Get the icon path for this property page.
|
java.lang.Object |
getInput() |
java.lang.String |
getLabel()
Get the label of this property page.
|
IModule |
getModule()
Get the module of this property page.
|
java.lang.String |
getName()
Get the name of the property page.
|
Composite |
getPanel() |
protected abstract IFieldFactory |
initFactory()
Initialize an instance of
IFieldFactory to build the property page's form. |
void |
setInput(java.lang.Object input) |
void |
setLabel(java.lang.String label)
Set the labe of this property page.
|
void |
setModule(IModule module)
Set the module of this property page.
|
void |
setName(java.lang.String name)
Set the name of the property page.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRelevance
public ElementFormPropertyPanel(IModule module, java.lang.String name, java.lang.String label, java.lang.String icon)
module
- the module this property page is build for.name
- the internal name of this property page.label
- the label displayed in Modelio for this property page.icon
- a relative path to the image to display for the property page.public final Composite createPanel(Composite parent)
public final void dispose()
public java.lang.String getHelpTopic()
public final java.lang.Object getInput()
public final java.lang.String getLabel()
IModulePropertyPanel
getLabel
in interface IModulePropertyPanel
public final IModule getModule()
IModulePropertyPanel
getModule
in interface IModulePropertyPanel
public final java.lang.String getName()
IModulePropertyPanel
getName
in interface IModulePropertyPanel
public final Composite getPanel()
public final void setInput(java.lang.Object input)
public final void setLabel(java.lang.String label)
IModulePropertyPanel
setLabel
in interface IModulePropertyPanel
label
- the text that will be displayed in the property page's label.public final void setModule(IModule module)
IModulePropertyPanel
setModule
in interface IModulePropertyPanel
module
- the module owning this property page.public final void setName(java.lang.String name)
IModulePropertyPanel
setName
in interface IModulePropertyPanel
name
- the name of the property page.protected abstract IFieldFactory initFactory()
IFieldFactory
to build the property page's form.
Called only once in the constructor.public java.nio.file.Path getIcon()
IModulePropertyPanel
Modelio is in charge of loading/disposing this image along with the property page itself.
getIcon
in interface IModulePropertyPanel
null
.