|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.dtv.lwuit.Component
com.sun.dtv.lwuit.Label
com.sun.dtv.lwuit.Button
com.sun.dtv.lwuit.RadioButton
public class RadioButton
RadioButton is a Button
that maintains a selection state exclusively
within a specific ButtonGroup
.
Field Summary |
---|
Fields inherited from class com.sun.dtv.lwuit.Button |
---|
STATE_DEFAULT, STATE_PRESSED, STATE_ROLLOVER |
Fields inherited from class com.sun.dtv.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.ViewOnlyComponent |
---|
HORIZONTAL_ALIGN_CENTER, HORIZONTAL_ALIGN_JUSTIFIED, HORIZONTAL_ALIGN_LEFT, HORIZONTAL_ALIGN_RIGHT, SCALE_ASPECT_PROOF, SCALE_NO, SCALE_NO_ASPECT_PROOF, STATE_DISABLED, STATE_ENABLED, VERTICAL_ALIGN_BOTTOM, VERTICAL_ALIGN_CENTER, VERTICAL_ALIGN_JUSTIFIED, VERTICAL_ALIGN_TOP |
Fields inherited from interface com.sun.dtv.ui.Animated |
---|
ALTERNATING, LOOP, REPEATING |
Constructor Summary | |
---|---|
RadioButton()
Creates an empty radio button. |
|
RadioButton(Image icon)
Constructs a radio with the given icon. |
|
RadioButton(String text)
Constructs a radio with the given text. |
|
RadioButton(String text,
Image icon)
Constructs a radio with the given text and icon. |
Method Summary | |
---|---|
boolean |
isSelected()
Returns true if the radio button is selected. |
void |
paint(Graphics g)
This method paints the Component on the screen, it should be overriden by subclasses to perform custom drawing or invoke the UI API's to let the PLAF perform the rendering. |
void |
setSelected(boolean selected)
Selects the current radio button. |
String |
toString()
Overriden to return a useful value for debugging purposes. |
Methods inherited from class com.sun.dtv.lwuit.Button |
---|
addActionListener, getPressedIcon, getRolloverIcon, getState, keyPressed, keyReleased, pointerPressed, pointerReleased, removeActionListener, setPressedIcon, setRolloverIcon |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RadioButton(String text)
text
- to display next to the buttonpublic RadioButton()
public RadioButton(Image icon)
icon
- icon to show next to the buttonpublic RadioButton(String text, Image icon)
text
- to display next to the buttonicon
- icon to show next to the buttonMethod Detail |
---|
public String toString()
Component
toString
in class Component
public boolean isSelected()
public void setSelected(boolean selected)
selected
- value for selectionpublic void paint(Graphics g)
Component
paint
in interface Animation
paint
in interface ViewOnlyComponent
paint
in class Button
g
- the component graphics
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |