|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdanger.app.Listener
danger.ui.View
danger.ui.Container
danger.ui.Control
danger.ui.CheckBoxGroup
danger.ui.RadioGroup
public class RadioGroup
A RadioGroup is a group of radio buttons, which lets the user choose one of a mutually exclusive set of choices.

| Field Summary |
|---|
| Fields inherited from class danger.ui.CheckBoxGroup |
|---|
DEFAULT_SPACING |
| Constructor Summary | |
|---|---|
RadioGroup()
Create a radio group with no buttons. |
|
RadioGroup(CharSequence inGroupLabel,
CharSequence[] inLabels,
int inDefault)
Create a radio group with a title and buttons. |
|
RadioGroup(CharSequence inGroupLabel,
CharSequence[] inLabels,
int inDefault,
int inSpacing)
Create a radio group with a title and buttons. |
|
RadioGroup(String inGroupLabel,
String[] inLabels,
int inDefault)
Create a radio group with a title and buttons. |
|
RadioGroup(String inGroupLabel,
String[] inLabels,
int inDefault,
int inSpacing)
Create a radio group with a title and buttons. |
|
| Method Summary | |
|---|---|
boolean |
eventKeyUp(char inChar,
Event event)
Processes key releases directed at this container. |
boolean |
eventWidgetUp(int inWhichWidget,
Event event)
Handle the release of a device widget |
int |
getIDOfSelectedItem()
Determine the id of the currently selected radio button. |
void |
selectButton(RadioButton button)
Select the specified radio button. |
protected void |
selectFocusedButton()
Select the currently focused radio button. |
void |
selectItemWithID(int inItemID)
Select the radio button with the specified id. |
void |
setLabels(CharSequence inGroupLabel,
CharSequence[] inLabels,
int[] ids,
int inDefault,
int inSpacing,
boolean multiLine)
Set the labels in the radio group. |
void |
setLabels(String inGroupLabel,
String[] inLabels,
int[] ids,
int inDefault,
int inSpacing,
boolean multiLine)
Set the labels in the radio group. |
void |
setValue(int inValue)
Select one of the radio buttons in the group. |
| Methods inherited from class danger.ui.CheckBoxGroup |
|---|
getItemValue, getValueOfItemWithID, loseFocus, onSetHasBorder, paint, reflowChildren, setCheckBoxLabels, setCheckBoxLabels, setItemEvent, setItemValue, setLabelFont, setSize, setTransparent, setValueOfItemWithID, takeFocus |
| Methods inherited from class danger.ui.Control |
|---|
drawFocusBox, drawIdleBox, drawIdleBox, getBaseline, getEvent, getEventListener, getEventType, getHasBorder, getMaxToolTipLines, getTitle, getTitleSequence, getToolTip, getValue, hasToolTip, notifyWhenBaselineChanges, onBaselineChanged, onControlBaselineChanged, onSetTitle, sendEvent, setEvent, setEvent, setEvent, setEvent, setEvent, setEventArg, setEventListener, setEventMethod, setHasBorder, setMaxToolTipLines, setTitle, setTitle, setToolTip, showToolTip |
| Methods inherited from class danger.app.Listener |
|---|
cancelEvents, childEventPump, childEventPumpDone, eventProblem, isDispatchingThread, sendEvent, sendEvent, sendEvent, sendEvent, sendEvent, sendLowPriorityEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RadioGroup()
public RadioGroup(String inGroupLabel,
String[] inLabels,
int inDefault)
inGroupLabel - the label to appear at the top of the groupinLabels - labels for the radio buttons in the groupinDefault - index of the initially selected radio button,
starting with 0
public RadioGroup(CharSequence inGroupLabel,
CharSequence[] inLabels,
int inDefault)
inGroupLabel - the label to appear at the top of the groupinLabels - labels for the radio buttons in the groupinDefault - index of the initially selected radio button,
starting with 0
public RadioGroup(String inGroupLabel,
String[] inLabels,
int inDefault,
int inSpacing)
inGroupLabel - the label to appear at the top of the groupinLabels - labels for the radio buttons in the groupinDefault - index of the initially selected radio button,
starting with 0inSpacing - amount of vertical spacing between radio buttons
public RadioGroup(CharSequence inGroupLabel,
CharSequence[] inLabels,
int inDefault,
int inSpacing)
inGroupLabel - the label to appear at the top of the groupinLabels - labels for the radio buttons in the groupinDefault - index of the initially selected radio button,
starting with 0inSpacing - amount of vertical spacing between radio buttons| Method Detail |
|---|
public void setLabels(String inGroupLabel,
String[] inLabels,
int[] ids,
int inDefault,
int inSpacing,
boolean multiLine)
Container.addChild(danger.ui.View)
before this call.
inGroupLabel - the label to appear at the top of the group.inLabels - an array of labels. Each label is used as the
title of a radio button.ids - an array of ids, corresponding to the labels array.inDefault - index of the initially selected radio buttoninSpacing - amount of vertical spacing between radio buttonsmultiLine - whether the radio buttons should be multi-line
public void setLabels(CharSequence inGroupLabel,
CharSequence[] inLabels,
int[] ids,
int inDefault,
int inSpacing,
boolean multiLine)
Container.addChild(danger.ui.View)
before this call.
inGroupLabel - the label to appear at the top of the group.inLabels - an array of labels. Each label is used as the
title of a radio button.ids - an array of ids, corresponding to the labels array.inDefault - index of the initially selected radio buttoninSpacing - amount of vertical spacing between radio buttonsmultiLine - whether the radio buttons should be multi-line
public boolean eventKeyUp(char inChar,
Event event)
Container
eventKeyUp in class CheckBoxGroupinChar - the character being released.
public boolean eventWidgetUp(int inWhichWidget,
Event event)
Container
eventWidgetUp in class CheckBoxGroupinWhichWidget - the widget that went down
protected void selectFocusedButton()
public void setValue(int inValue)
setValue in class ControlinValue - 0-based index of the radio button to select.public void selectItemWithID(int inItemID)
inItemID - id of the radio button to select.public int getIDOfSelectedItem()
public void selectButton(RadioButton button)
button - the radio button to select.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||