org.universAAL.ui.handler.gui.swing.model.FormControl
Class SelectChecboxModel
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.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 JCheckBox
es, 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 |
SelectChecboxModel
public SelectChecboxModel(Select control,
Renderer render)
- Constructor.
- Parameters:
control
- render
-
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.