T - The type of the data model being edited in the form.public abstract class Form<T extends java.io.Serializable>
extends java.lang.Object
| Type | Property and Description |
|---|---|
javafx.beans.property.ObjectProperty<Form.UpdateMode> |
updateMode |
| Modifier and Type | Class and Description |
|---|---|
class |
Form.Builder
Allows adding unlimited number of attributes for controller execution
using Fluent Interface pattern
|
static class |
Form.UpdateMode
The way in which the form popup dialog works.
|
| Constructor and Description |
|---|
Form() |
Form(java.util.function.BiFunction<T,Form.UpdateMode,T> finalTask)
Constructors
|
| Modifier and Type | Method and Description |
|---|---|
Form.Builder |
configure(T model)
Starts the process of building the form with eventual execution.
|
Form.Builder |
configure(javafx.stage.Window owner,
T model) |
void |
dispose()
This method is called on any initialized forms when Particle is shutting
down - this is one last chance to clean up.
|
protected abstract void |
exportModel(T model)
This method should take the data out of the view controls and set the
appropriate fields on the given model object.
|
protected javafx.scene.Node |
getGraphic()
Override to specify the graphic to show in the form graphic area.
|
protected abstract java.lang.String |
getMessage()
Returns the message to show in the content area of the form popup dialog
window, above the form.
|
protected abstract java.lang.String |
getTitle()
Returns the title to show in the form popup dialog window.
|
Form.UpdateMode |
getUpdateMode()
Gets the value of the property updateMode.
|
protected abstract javafx.scene.Node |
getView()
Returns the form itself, which will be displayed in the form popup dialog
window beneath the message.
|
protected abstract void |
importModel(T model)
This method expects that the given model object will be loaded into the
view (e.g.
|
protected void |
initInBackground()
Called only the first time this form is shown, just prior to the start()
lifecycle method being called.
|
protected void |
postInit()
Runs immediately after initInBackground(), and before start(), but on FX
thread.
|
protected void |
preInit()
Initial initialization on FX thread - this is called when the form is
first registered in the Particle
FormManager. |
void |
setUpdateMode(Form.UpdateMode value)
Sets the value of the property updateMode.
|
java.util.Optional<T> |
showAndWait(T model)
Executes the form and returns optional model
|
java.util.Optional<T> |
showAndWait(javafx.stage.Window owner,
T model) |
protected void |
start()
Called immediately prior to showing the form dialog.
|
protected void |
stop()
Called immediately after the form dialog is closed.
|
javafx.beans.property.ObjectProperty<Form.UpdateMode> |
updateModeProperty() |
public final javafx.beans.property.ObjectProperty<Form.UpdateMode> updateModeProperty
getUpdateMode(),
setUpdateMode(UpdateMode)public Form(java.util.function.BiFunction<T,Form.UpdateMode,T> finalTask)
public Form()
public final Form.UpdateMode getUpdateMode()
public final void setUpdateMode(Form.UpdateMode value)
public final javafx.beans.property.ObjectProperty<Form.UpdateMode> updateModeProperty()
getUpdateMode(),
setUpdateMode(UpdateMode)public final java.util.Optional<T> showAndWait(T model)
model - public final Form.Builder configure(T model)
model - public final Form.Builder configure(javafx.stage.Window owner, T model)
protected abstract java.lang.String getTitle()
protected javafx.scene.Node getGraphic()
protected abstract java.lang.String getMessage()
protected abstract javafx.scene.Node getView()
protected abstract void importModel(T model)
protected abstract void exportModel(T model)
protected void preInit()
FormManager. Only the bare minimum
initialization should be performed here.protected void initInBackground()
protected void postInit()
protected void start()
protected void stop()
public void dispose()