public class RadioButtonAdapter extends Object implements ActionListener, ChangeListener
Constructor and Description |
---|
RadioButtonAdapter(ValueModel pSelectionHolder,
List<ButtonModel> pButtonModels)
Creates a new adapter between a ValueModel holding an Integer
and a list of ButtonModels
Whenever one of the models changes, the other is adjusted accordingly.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent pEvent)
Invoked when an action occurs.
|
void |
stateChanged(ChangeEvent pEvent)
Invoked when the target of the listener has changed its state.
|
public RadioButtonAdapter(ValueModel pSelectionHolder, List<ButtonModel> pButtonModels)
pSelectionHolder
- ValueModel holding an IntegerpButtonModels
- a list of ButtonModel objectsIllegalArgumentException
- if pSelectionHolder or pButtonModels is nullpublic void actionPerformed(ActionEvent pEvent)
actionPerformed
in interface ActionListener
pEvent
- a ActionEvent objectpublic void stateChanged(ChangeEvent pEvent)
stateChanged
in interface ChangeListener
pEvent
- a ChangeEvent objectCopyright © 2017 Jürgen Zeller (privat). All rights reserved.