org.universAAL.ui.handler.gui.swing.model.FormControl
Class TextAreaModel

Package class diagram package TextAreaModel
java.lang.Object
  extended by org.universAAL.ui.handler.gui.swing.model.Model
      extended by org.universAAL.ui.handler.gui.swing.model.FormControl.InputModel
          extended by org.universAAL.ui.handler.gui.swing.model.FormControl.TextAreaModel
All Implemented Interfaces:
EventListener, CaretListener
Direct Known Subclasses:
TextAreaLAF, TextAreaLAF, TextAreaLAF

public abstract class TextAreaModel
extends InputModel
implements CaretListener

Author:
amedrano
See Also:
TextArea

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
TextAreaModel(TextArea control, Renderer render)
          Constructor.
 
Method Summary
 void caretUpdate(CaretEvent e)
          
 JComponent getNewComponent()
          generate the JComponent that displays this FormControl's information.
 boolean isValid()
          Test if the JComponent information provided by the user is valid according to the FormControl's definition.
 void update()
          Adds all the needed information to the rendered component (in Model view).
 
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

TextAreaModel

public TextAreaModel(TextArea control,
                     Renderer render)
Constructor.

Parameters:
control - the FormControl which to model.
Method Detail

getNewComponent

public JComponent getNewComponent()
generate the JComponent that displays this FormControl's information.

Specified by:
getNewComponent in class Model
Returns:
a JTextArea.

update

public void update()
Adds all the needed information to the rendered component (in Model view). In LAF view, it add/updates all LAF components.

Overrides:
update in class Model

isValid

public boolean isValid()
Test if the JComponent information provided by the user is valid according to the FormControl's definition.

Specified by:
isValid in class Model
Returns:
true if the data has passed every restriction

caretUpdate

public void caretUpdate(CaretEvent e)

Specified by:
caretUpdate in interface CaretListener


Copyright © 2014 universAAL Consortium. All Rights Reserved.