org.universAAL.ui.handler.gui.swing.model.FormControl
Class Select1RadiobuttonModel
java.lang.Object
org.universAAL.ui.handler.gui.swing.model.Model
org.universAAL.ui.handler.gui.swing.model.FormControl.InputModel
org.universAAL.ui.handler.gui.swing.model.FormControl.SelectModel
org.universAAL.ui.handler.gui.swing.model.FormControl.Select1Model
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 JRadioButton
s, better for
non-multilevel selects.
- Author:
- amedrano
Fields inherited from class org.universAAL.ui.handler.gui.swing.model.FormControl.SelectModel |
selected |
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 |
Select1RadiobuttonModel
public Select1RadiobuttonModel(Select1 control,
Renderer render)
- Constructor.
- Parameters:
control
- render
-
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.