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

Package class diagram package SelectChecboxModel
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.SelectModel
              extended by org.universAAL.ui.handler.gui.swing.model.FormControl.SelectChecboxModel
All Implemented Interfaces:
ActionListener, EventListener, ListSelectionListener
Direct Known Subclasses:
SelectCheckBoxLAF

public abstract class SelectChecboxModel
extends SelectModel
implements ActionListener

Model Select as a group of JCheckBoxes, better for non-multilevel selects.

Author:
amedrano

Nested Class Summary
 
Nested classes/interfaces inherited from class org.universAAL.ui.handler.gui.swing.model.FormControl.SelectModel
SelectModel.SelectionTreeModel
 
Field Summary
 
Fields inherited from class org.universAAL.ui.handler.gui.swing.model.FormControl.SelectModel
selected
 
Fields inherited from class org.universAAL.ui.handler.gui.swing.model.Model
fc, FORM_CONTROL_IN_TABLE, jc, label, needsLabel, needsPostNewLine, needsPreNewLine
 
Constructor Summary
SelectChecboxModel(Select control, Renderer render)
          Constructor.
 
Method Summary
 void actionPerformed(ActionEvent e)
          
protected  Object getAssociatedValue(JComponent jc)
          The associated value to the Label to the JCheckBox.
protected  Label getLabelFromJComponent(JComponent jc)
          Get the Label associated to the JCheckBox.
 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()
          Update the selections
 
Methods inherited from class org.universAAL.ui.handler.gui.swing.model.FormControl.SelectModel
setSelected, valueChanged
 
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

SelectChecboxModel

public SelectChecboxModel(Select control,
                          Renderer render)
Constructor.

Parameters:
control -
render -
Method Detail

getNewComponent

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

Overrides:
getNewComponent in class SelectModel
Returns:
either a JList or a JTree

update

public void update()
Update the selections

Overrides:
update in class SelectModel

getLabelFromJComponent

protected Label getLabelFromJComponent(JComponent jc)
Get the Label associated to the JCheckBox.

Parameters:
jc - teh JCheckBox.
Returns:

getAssociatedValue

protected Object getAssociatedValue(JComponent jc)
The associated value to the Label to the JCheckBox.

Parameters:
jc - the JCheckBox.
Returns:

isValid

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

Overrides:
isValid in class SelectModel
Returns:
true if the data has passed every restriction

actionPerformed

public void actionPerformed(ActionEvent e)

Specified by:
actionPerformed in interface ActionListener


Copyright © 2014 universAAL Consortium. All Rights Reserved.