public abstract class FormModel extends Object
FormLAF
should extend this class which will
provide the available panels (Standard, submits and IO).
This model also provides other functionalities such as the parent tree
construction for subdialogs. And antecessor query to check if a dialog is the
parent tree of the form.Modifier and Type | Field and Description |
---|---|
protected Form |
form
Reference to RDF class.
|
static String |
IO_NAME
The name set to IO panel.
|
protected GroupModel |
ioGroupModel
The model for the IOGroup.
|
static String |
SUB_NAME
The name set to Submits panel.
|
protected GroupModel |
submitsGroupModel
the model for the submitsGroup.
|
static String |
SYS_NAME
The name set to System buttons panel.
|
protected GroupModel |
sysGroupModel
The model for the systemGroup.
|
Modifier | Constructor and Description |
---|---|
protected |
FormModel(Form f,
Renderer renderer)
Constructor for a given
Form . |
Modifier and Type | Method and Description |
---|---|
void |
finalizeForm()
Terminate the current dialog, close the frame, and unregister from
FormModelMapper . |
Model |
findModel(String URI)
Find the
Model in the children corresponding to the
FormControl 's URI |
Form |
getForm()
|
protected JComponent |
getIOPanel()
construct the IO Panel for the
Form |
protected JComponent |
getIOPanel(int depth)
Construct the IO Panel for the parent with given depth.
|
Renderer |
getRenderer()
|
protected UIRequest |
getRequest()
Get the original Request.
|
int |
getSubdialogLevel()
Get the Depth of the current
FormModel . |
protected JComponent |
getSubmitPanel()
Construct the Submit Panel for the
Form |
protected JComponent |
getSubmitPanel(int depth)
Construct the Submit Panel for the parent with given depth.
|
protected JComponent |
getSystemPanel()
construct the System buttons Panel for the
Form |
String[] |
getTitlePath()
Get the list of all parent form titles.
|
boolean |
isAntecessor(String uri)
|
void |
setRequest(UIRequest request)
Set the Original Request.
|
abstract void |
showForm()
Construct the Frame that displays the
Form and make it visible. |
protected abstract void |
terminateDialog()
Terminate the dialog, closing the frame, and any required procedure.
|
void |
updateMissingInput(Input in)
Finds the Model for the
Input and instructs it to
InputModel.updateAsMissing() . |
protected Form form
protected GroupModel ioGroupModel
protected GroupModel sysGroupModel
protected GroupModel submitsGroupModel
public static final String IO_NAME
public static final String SUB_NAME
public static final String SYS_NAME
protected FormModel(Form f, Renderer renderer)
Form
. Retrieves the parent (if there is
any) and computes the depth. Registers the form in the
FormModelMapper
to be retrieved by successors.f
- The Form
for which the model is constructed.renderer
- The Renderer
used to access FormManager
and
ModelMapper
public abstract void showForm()
Form
and make it visible.protected abstract void terminateDialog()
public void finalizeForm()
FormModelMapper
.public boolean isAntecessor(String uri)
uri
- candidate antecessor's URIFormModel
.protected JComponent getIOPanel()
Form
JPanel
with all the components inside
Form.getIOControls()
group.protected JComponent getSystemPanel()
Form
JPanel
with all the components inside
Form.getStandardButtons()
group.protected JComponent getSubmitPanel()
Form
JPanel
with all the components inside
Form.getSubmits()
group.protected JComponent getIOPanel(int depth)
depth
- the desired depth.JPanel
with all the components inside
Form.getIOControls()
group of the antecessor.subDialogLevel
,
getIOPanel()
protected JComponent getSubmitPanel(int depth)
depth
- the desired depth.JPanel
with all the components inside
Form.getSubmits()
group of the antecessor.subDialogLevel
,
getSubmitPanel()
public int getSubdialogLevel()
FormModel
.subDialogLevel
public String[] getTitlePath()
public void setRequest(UIRequest request)
request
- protected UIRequest getRequest()
public void updateMissingInput(Input in)
Input
and instructs it to
InputModel.updateAsMissing()
.in
- public Model findModel(String URI)
Model
in the children corresponding to the
FormControl
's URIURI
- the URI of the FormControl
to find the model for.Copyright © 2018 universAAL Consortium. All rights reserved.