|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
de.unihalle.informatik.MiToBo.gui.RadioButtonPanel
@ALDMetaInfo(export=ALLOWED) public class RadioButtonPanel
A panel with a titled border and a set of radio buttons that can be reconfigured easily.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected Box |
rbbox
vertical box to place the radio buttons on the panel |
protected ButtonGroup |
rbgroup
the logical group of radio buttons |
protected String |
selection
string/label of the selected radio button |
static String |
SELECTION_CHANGED_PROPERTY
Property change of the panel when a selection is changed |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
RadioButtonPanel(String title)
Constructor |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
Assigns the selected radio button string and fires a PropertyChangeEvent with property RadioButtonPanel.SELECTION_CHANGED_PROPERTY |
void |
clearPanel()
Remove all radiobuttons from the panel. |
void |
fillPanel(String[] choices,
String defaultchoice)
Adds radio buttons to the panel according the choices array. |
String |
getSelection()
Get the currently selected radio button string |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Box rbbox
protected ButtonGroup rbgroup
protected String selection
public static final String SELECTION_CHANGED_PROPERTY
Constructor Detail |
---|
public RadioButtonPanel(String title)
title
- panel titleMethod Detail |
---|
public void fillPanel(String[] choices, String defaultchoice)
choices
array.
defaultchoice
may specify a default button or may be null (no default selection).
choices
- defaultchoice
- public void clearPanel()
public String getSelection()
public void actionPerformed(ActionEvent e)
RadioButtonPanel.SELECTION_CHANGED_PROPERTY
actionPerformed
in interface ActionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |