org.apache.jorphan.gui
Class JLabeledRadio
JPanel
org.apache.jorphan.gui.JLabeledRadio
- ActionListener, JLabeledField
public class JLabeledRadio
extends JPanel
JLabeledRadio will create a set of Radio buttons with a label.
void | actionPerformed(ActionEvent e) - When a radio button is clicked, an ActionEvent is triggered.
|
void | addChangeListener(ChangeListener pChangeListener)
|
List | getComponentList() - Method will return all the label and JRadioButtons.
|
String | getText() - The implementation will get the Text value from the selected radio button
in the JButtonGroup.
|
void | setItems(String[] items) - setItems will set the radio button items.
|
void | setLabel(String pLabel)
|
void | setText(String text) - The implementation will iterate through the radio buttons and find the
match.
|
JLabeledRadio
public JLabeledRadio()
JLabeledRadio
public JLabeledRadio(String label,
String[] items)
JLabeledRadio
public JLabeledRadio(String label,
String[] items,
String selectedItem)
actionPerformed
public void actionPerformed(ActionEvent e)
When a radio button is clicked, an ActionEvent is triggered.
getComponentList
public List getComponentList()
Method will return all the label and JRadioButtons. ButtonGroup is
excluded from the list.
- getComponentList in interface JLabeledField
getText
public String getText()
The implementation will get the Text value from the selected radio button
in the JButtonGroup.
- getText in interface JLabeledField
setItems
public void setItems(String[] items)
setItems will set the radio button items. The implementation first
removes the old JRadioButton, then it creates new ones.
setText
public void setText(String text)
The implementation will iterate through the radio buttons and find the
match. It then sets it to selected and sets all other radion buttons as
not selected.
- setText in interface JLabeledField
Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.