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

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

public abstract class Select1RadiobuttonModel
extends Select1Model
implements ActionListener

Model Select1 as a group of JRadioButtons, 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
Select1RadiobuttonModel(Select1 control, Renderer render)
          Constructor.
 
Method Summary
 void actionPerformed(ActionEvent e)
          
protected  Object getAssociatedValue(JComponent jc)
          Get the value associated to the Label for the JRadioButton.
protected  Label getLabelFromJComponent(JComponent jc)
          Get the associated Label for the JRadioButton.
 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 JComponent
 
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

Select1RadiobuttonModel

public Select1RadiobuttonModel(Select1 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 Select1Model
Returns:
either a JTree or a JComboBox

update

public void update()
Update the JComponent

Overrides:
update in class Select1Model

getAssociatedValue

protected Object getAssociatedValue(JComponent jc)
Get the value associated to the Label for the JRadioButton.

Parameters:
jc - the JRadioButton
Returns:

getLabelFromJComponent

protected Label getLabelFromJComponent(JComponent jc)
Get the associated Label for the JRadioButton.

Parameters:
jc - the JRadioButton
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 Select1Model
Returns:
true if the data has passed every restriction

actionPerformed

public void actionPerformed(ActionEvent e)

Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class Select1Model


Copyright © 2014 universAAL Consortium. All Rights Reserved.