|Java Interface|| |
|Base class|| |
JobEntryDialogInterface is the Java interface that implements the settings dialog of a job entry plugin.
Maintain the Dialog for Job Entry Settings
dialog class is responsible for constructing and opening the settings dialog for the job entry. When you open the job entry settings in Spoon, the system instantiates the
dialog class passing in the
JobEntryInterface object and calling the
open() method on the dialog. SWT is the native windowing environment of Spoon and the framework used for implementing job entry dialogs.
public JobEntryInterface open()
This method returns only after the dialog has been confirmed or cancelled. The method must conform to these rules.
If the dialog is confirmed
JobEntryInterfaceobject must be updated to reflect the new settings
- If you changed any settings, the Changed flag of the
JobEntryInterfaceobject must be set to
- If the dialog is cancelled
JobEntryInterfaceobject must not be changed
- The Changed flag of the
JobEntryInterfaceobject must be set to the value it had at the time the dialog opened
JobEntryInterface object has an internal Changed flag that is accessible using
setChanged(). Spoon decides whether the job has unsaved changes based on the Changed flag, so it is important for the dialog to set the flag appropriately.
Additionally, the job entry dialog must make sure that the job entry name is not set to be empty. The dialog may be confirmed only after a non-empty name is set.
The sample Job Entry plugin project has an implementation of the
dialog class that is consistent with these rules and is a good basis for creating your own dialogs.