|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.ui.handler.gui.swing.model.Model
public abstract class Model
Abstract Class for all Form Control Models.
FormControl
Field Summary | |
---|---|
protected FormControl |
fc
the FormControl for which this model represents. |
static String |
FORM_CONTROL_IN_TABLE
A property added to FormControls added to tables |
protected JComponent |
jc
The JComponent being generated. |
protected LabelModel |
label
The Label Model labeling the Form Control. |
protected boolean |
needsLabel
Indicates if the FormControl needs to be associated with a label. |
protected boolean |
needsPostNewLine
Indicates a new line should follow this component. |
protected boolean |
needsPreNewLine
Indicates this component should be in a new line |
Constructor Summary | |
---|---|
Model(FormControl control,
Renderer renderer)
Model constructor. |
Method Summary | |
---|---|
boolean |
correspondsTo(String formControlURI)
Checks if this model corresponds to the form control with the given URI. |
JComponent |
getComponent()
Returns the JComponent , and updates representing this
FormControl . |
LabelModel |
getLabelModel()
Models (if needed) and returns the LabelModel for the
FormControl . |
abstract JComponent |
getNewComponent()
generate the JComponent that displays this FormControl 's
information. |
int |
getPositionInGroup()
Calculates the position in the parent group of the modeled FormControl . |
Renderer |
getRenderer()
Get the Renderer instance to which this Model is
associated to |
boolean |
isInDialog()
test whether this FormControl is in a Dialog type dialog. |
boolean |
isInIOGroup()
test whether this FormControl is in a IO root group. |
boolean |
isInMainMenu()
test whether this FormControl is in a Main Menu type dialog. |
boolean |
isInMessage()
test whether this FormControl is in a Message type dialog. |
boolean |
isInStandardGroup()
test whether this FormControl is in a standard buttons root
group. |
boolean |
isInSubDialog()
test whether this FormControl is in a Subdialog type dialog. |
boolean |
isInSubmitGroup()
test whether this FormControl is in a submit buttons root group. |
boolean |
isInTable()
|
abstract boolean |
isValid()
Test if the JComponent information provided by the user is valid
according to the FormControl 's definition. |
boolean |
needsLabel()
tests if there is a need to render the Label of this FormControl ,
as the representation might have already included. |
boolean |
needsPostNewLine()
|
boolean |
needsPreNewLine()
|
void |
update()
Adds all the needed information to the rendered component (in Model view). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String FORM_CONTROL_IN_TABLE
protected FormControl fc
FormControl
for which this model represents.
protected boolean needsLabel
FormControl
needs to be associated with a label.
True by default
protected boolean needsPreNewLine
protected boolean needsPostNewLine
protected JComponent jc
JComponent
being generated.
protected LabelModel label
Constructor Detail |
---|
public Model(FormControl control, Renderer renderer)
control
- The RDF component which this Model represents.renderer
- Method Detail |
---|
public boolean needsLabel()
FormControl
,
as the representation might have already included.
needsLabel
or not.public boolean needsPreNewLine()
public boolean needsPostNewLine()
public boolean isInMessage()
FormControl
is in a Message type dialog.
true
if the FormControl
is in a Message
Form
public boolean isInMainMenu()
FormControl
is in a Main Menu type dialog.
true
if the FormControl
is in a Main Menu
Form
public boolean isInDialog()
FormControl
is in a Dialog type dialog.
true
if the FormControl
is in a Dialog
Form
public boolean isInSubDialog()
FormControl
is in a Subdialog type dialog.
true
if the FormControl
is in a Subdialog
Form
public boolean isInStandardGroup()
FormControl
is in a standard buttons root
group.
true
if the FormControl
is within the
standard buttons grouppublic boolean isInIOGroup()
FormControl
is in a IO root group.
true
if the FormControl
is within the IO
grouppublic boolean isInSubmitGroup()
FormControl
is in a submit buttons root group.
true
if the FormControl
is within the
Submits grouppublic boolean isInTable()
public abstract boolean isValid()
JComponent
information provided by the user is valid
according to the FormControl
's definition.
public JComponent getComponent()
JComponent
, and updates representing this
FormControl
. If it isn't already created, it generates it.
JComponent
Representing model's information,public void update()
public abstract JComponent getNewComponent()
JComponent
that displays this FormControl
's
information.
JComponent
initialised with the model's information,public Renderer getRenderer()
Renderer
instance to which this Model
is
associated to
Renderer
public boolean correspondsTo(String formControlURI)
formControlURI
- the FormControl
's URI to check with.
FormControl
's URI for this model is equal to
formControlURIpublic LabelModel getLabelModel()
LabelModel
for the
FormControl
. This method May be overridden to personalize Labels
for certain FormControl
s.
public int getPositionInGroup()
FormControl
.
FormControl
was added to the group. 0 is
first, -1 if not calculable (ie, fc is rootgroup).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |