|
||||||||||
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
org.universAAL.ui.handler.gui.swing.model.FormControl.InputModel
org.universAAL.ui.handler.gui.swing.model.FormControl.InputFieldModel
public abstract class InputFieldModel
ImputField Model, it condenses the view and controller parts of the MVC methodology.
InputField
Field Summary |
---|
Fields inherited from class org.universAAL.ui.handler.gui.swing.model.Model |
---|
fc, FORM_CONTROL_IN_TABLE, jc, label, needsLabel, needsPostNewLine, needsPreNewLine |
Constructor Summary | |
---|---|
InputFieldModel(InputField control,
Renderer render)
Constructor. |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
Input will be stored each time the user changes the status of an Input |
void |
caretUpdate(CaretEvent e)
Input will be stored each time the user types something in the text field. |
JComponent |
getNewComponent()
the representation for InputField can either be a JCheckBox if the FormControl.getValue() is a boolean
type
a JTextField if the FormControl.getValue() is a String
and not secret
a JPasswordField if the FormControl.getValue() is
String and it is secret
a ?? |
boolean |
isValid()
Test if the JComponent information provided by the user is valid
according to the FormControl 's definition. |
void |
stateChanged(ChangeEvent e)
When a checkbox is pressed the input will be stored. |
void |
update()
Updating the InputField |
Methods inherited from class org.universAAL.ui.handler.gui.swing.model.FormControl.InputModel |
---|
getAlertString, isMandatory, isOfType, updateAsMissing |
Methods inherited from class org.universAAL.ui.handler.gui.swing.model.Model |
---|
correspondsTo, getComponent, getLabelModel, getPositionInGroup, getRenderer, isInDialog, isInIOGroup, isInMainMenu, isInMessage, isInStandardGroup, isInSubDialog, isInSubmitGroup, isInTable, needsLabel, needsPostNewLine, needsPreNewLine |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InputFieldModel(InputField control, Renderer render)
control
- de InputField
which to model.Method Detail |
---|
public JComponent getNewComponent()
JCheckBox
if the FormControl.getValue()
is a boolean
type
JTextField
if the FormControl.getValue()
is a String
and not secret
JPasswordField
if the FormControl.getValue()
is
String and it is secret
FormControl.getValue()
is a XMLGregorianCalendar
FormControl.getValue()
is a Duration
FormControl.getValue()
is a Integer
FormControl.getValue()
is a Long
FormControl.getValue()
is a Float
FormControl.getValue()
is a Double
JComboBox
if the FormControl.getValue()
is a Locale
getNewComponent
in class Model
JComponent
initialised with the model's information,public void update()
update
in class Model
public boolean isValid()
JComponent
information provided by the user is valid
according to the FormControl
's definition.
isValid
in class Model
public void stateChanged(ChangeEvent e)
stateChanged
in interface ChangeListener
e
- the ChangeEvent
to listen to.public void caretUpdate(CaretEvent e)
caretUpdate
in interface CaretListener
e
- the CaretEvent
to listen to.public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |