|
Java DTV API 1.0 12-Dec-2008 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.lwuit.Component
com.sun.dtv.ui.MatteEnabledComponent
com.sun.dtv.ui.ViewOnlyComponent
com.sun.lwuit.ButtonGroup
This class is used to create a multiple-exclusion scope for a set of RadioButtons. Creating a set of RadioButtons with the same ButtonGroup object means that only one RadioButton can be selected among the ButtonGroup. Initially all RadioButtons are unselected.
Field Summary |
Fields inherited from class com.sun.dtv.ui.ViewOnlyComponent |
HORIZONTAL_ALIGN_CENTER, HORIZONTAL_ALIGN_JUSTIFIED, HORIZONTAL_ALIGN_LEFT, HORIZONTAL_ALIGN_RIGHT, SCALE_ASPECT_PROOF, SCALE_NO, SCALE_NO_ASPECT_PROOF, VERTICAL_ALIGN_BOTTOM, VERTICAL_ALIGN_CENTER, VERTICAL_ALIGN_JUSTIFIED, VERTICAL_ALIGN_TOP |
Fields inherited from class com.sun.lwuit.Component |
BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, LEFT, RIGHT, TOP |
Fields inherited from interface com.sun.dtv.ui.Animated |
ALTERNATING, LOOP, REPEATING |
Constructor Summary | |
ButtonGroup()
Creates a new instance of ButtonsGroup. |
Method Summary | |
void |
add(RadioButton rb)
Adds a RadioButton to the group. |
void |
clearSelection()
Clears the selection such that none of the buttons in the ButtonGroup are selected. |
int |
getButtonCount()
Returns the number of buttons in the group. |
RadioButton |
getRadioButton(int index)
Returns the radio button at the given group index. |
int |
getSelectedIndex()
Return the index of the selected button within the group. |
boolean |
isSelected()
Returns whether a radio button in the group is selected. |
void |
remove(RadioButton rb)
Removes a RadioButton from the group. |
void |
setSelected(int index)
Sets the selected Radio button by index. |
void |
setSelected(RadioButton rb)
Selects the given radio button. |
Methods inherited from class com.sun.dtv.ui.ViewOnlyComponent |
getAnimateContent, getGraphicContent, getHorizontalAlignment, getInteractionState, getScalingMode, getTextContent, getTextLayoutManager, getVerticalAlignment, isOpaque, paint, setAnimateContent, setGraphicContent, setHorizontalAlignment, setInteractionState, setScalingMode, setTextContent, setTextLayoutManager, setVerticalAlignment |
Methods inherited from class com.sun.dtv.ui.MatteEnabledComponent |
getMatte, isDoubleBuffered, processEvent, setMatte |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ButtonGroup()
Method Detail |
public void add(RadioButton rb)
rb
- a RadioButton to addpublic void remove(RadioButton rb)
rb
- a RadioButton to removepublic void clearSelection()
public int getButtonCount()
public boolean isSelected()
public int getSelectedIndex()
public RadioButton getRadioButton(int index)
index
- offset within the group starting with 0 and no larger than getButtonCount()
public void setSelected(RadioButton rb)
rb
- the radio button to set as selectedpublic void setSelected(int index)
index
- the index of the radio button to mark as selected
|
Java DTV API 1.0 12-Dec-2008 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |