public class EclipseFormWidget extends java.lang.Object implements IFormWidget
This class implements the IFormWidget interface to display a Form using elements of SWT/JFace and the Eclipse Rich Client Platform. It is a wrapper and delegates almost all work, including drawing and event processing, to the ICEFormEditor. It wraps the Form from ICE in an instance of ICEFormInput to conform to Eclipse's Editor interface.
Constructor and Description |
---|
EclipseFormWidget()
The Constructor.
|
EclipseFormWidget(ICEFormEditor editor)
This is an alternative constructor that allows the ICEFormEditor to be
injected.
|
Modifier and Type | Method and Description |
---|---|
void |
disable(boolean state)
This operation disables the Form widget.
|
void |
display()
This operation instructs the UI system to construct an editor so that the
Form can be edited by users.
|
Form |
getForm()
This operation retrieves the Form from the IFormWidget and should be used whenever an update is dispatched from the Widget to a Listener.
|
void |
notifyCancelListeners(java.lang.String process)
This operation notifies the IProcessEventListeners of a cancellation request..
|
void |
notifyProcessListeners(java.lang.String process)
This protected operation notifies the IProcessEventListeners of a change.
|
void |
notifyUpdateListeners()
This protected operation notifies the IUpdateEventListeners of a change.
|
void |
registerProcessListener(IProcessEventListener listener)
This operation registers an IProcessEventListener with the FormWidget.
|
void |
registerResourceProvider(ISimpleResourceProvider provider)
This operation registers an ISimpleResourceProvider with the observable widget so that it can notify the provider when a resource should be loaded.
|
void |
registerUpdateListener(IUpdateEventListener listener)
This operation registers an IUpdateEventListener with the FormWidget.
|
void |
setForm(Form form)
This operation sets the Form that should be displayed by the Widget.
|
void |
updateStatus(java.lang.String statusMessage)
This operation posts a status message to the IFormWidget that should be displayed to the user or system viewing the widget.
|
public EclipseFormWidget()
The Constructor.
public EclipseFormWidget(ICEFormEditor editor)
This is an alternative constructor that allows the ICEFormEditor to be injected. It is primarily used for testing but may have other uses.
editor
- The instance of ICEFormEditor that should be used by the Widget.
public void registerUpdateListener(IUpdateEventListener listener)
IObservableWidget
This operation registers an IUpdateEventListener with the FormWidget.
registerUpdateListener
in interface IObservableWidget
listener
- The listener.
public void registerProcessListener(IProcessEventListener listener)
IObservableWidget
This operation registers an IProcessEventListener with the FormWidget.
registerProcessListener
in interface IObservableWidget
listener
- The listener.
public void registerResourceProvider(ISimpleResourceProvider provider)
IObservableWidget
This operation registers an ISimpleResourceProvider with the observable widget so that it can notify the provider when a resource should be loaded.
registerResourceProvider
in interface IObservableWidget
provider
- The ICEResource provider.
public void notifyUpdateListeners()
IObservableWidget
This protected operation notifies the IUpdateEventListeners of a change.
notifyUpdateListeners
in interface IObservableWidget
public void notifyProcessListeners(java.lang.String process)
IObservableWidget
This protected operation notifies the IProcessEventListeners of a change.
notifyProcessListeners
in interface IObservableWidget
process
- The process that should be performed for the Form.
public void notifyCancelListeners(java.lang.String process)
IObservableWidget
This operation notifies the IProcessEventListeners of a cancellation request..
notifyCancelListeners
in interface IObservableWidget
process
- The process that should be performed for the Form.
public void setForm(Form form)
IFormWidget
This operation sets the Form that should be displayed by the Widget.
setForm
in interface IFormWidget
form
- The Form that should be used by the Widget.
public Form getForm()
IFormWidget
This operation retrieves the Form from the IFormWidget and should be used whenever an update is dispatched from the Widget to a Listener.
getForm
in interface IFormWidget
The Form from the Widget.
public void display()
display
in interface IFormWidget
public void updateStatus(java.lang.String statusMessage)
IFormWidget
This operation posts a status message to the IFormWidget that should be displayed to the user or system viewing the widget. It is a simple string.
updateStatus
in interface IFormWidget
statusMessage
- The status message.
public void disable(boolean state)
IFormWidget
This operation disables the Form widget. Disabled FormWidgets will not make it possible for clients to process the Form. Any buttons or facilities that enable this should be disabled.
disable
in interface IFormWidget
state
- True if the widget is disabled, false if not.