|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.lwuit.Component com.sun.lwuit.Label com.sun.lwuit.Button com.sun.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.lwuit.Button |
---|
STATE_DEFAULT, STATE_PRESSED, STATE_ROLLOVER |
Fields inherited from class com.sun.lwuit.Component |
---|
BOTTOM, BRB_CENTER_OFFSET, BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT, BRB_OTHER, CENTER, LEFT, RIGHT, TOP |
Constructor Summary | |
---|---|
RadioButton()
Creates an empty radio button |
|
RadioButton(Image icon)
Constructs a radio with the given icon |
|
RadioButton(java.lang.String text)
Constructs a radio with the given text |
|
RadioButton(java.lang.String text,
Image icon)
Constructs a radio with the given text and icon |
Method Summary | |
---|---|
protected Dimension |
calcPreferredSize()
Calculates the preferred size based on component content. |
java.lang.String |
getGroup()
This is a helper method to ease the usage of button groups |
boolean |
isOppositeSide()
Places the radio box on the opposite side at the far end |
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 |
refreshTheme()
Makes sure the component is up to date with the current style object |
void |
released(int x,
int y)
Invoked to change the state of the button to the released state |
void |
setGroup(java.lang.String groupName)
This is a helper method to ease the usage of button groups |
void |
setOppositeSide(boolean oppositeSide)
Places the radio box on the opposite side at the far end |
void |
setSelected(boolean selected)
Selects the current radio button |
java.lang.String |
toString()
Overriden to return a useful value for debugging purposes |
Methods inherited from class com.sun.lwuit.Label |
---|
getAlignment, getBaselineResizeBehavior, getGap, getIcon, getShiftText, getText, getTextPosition, getVerticalAlignment, isDefaultTickerEnabled, isEndsWith3Points, isTickerEnabled, isTickerRunning, paramString, setDefaultTickerEnabled, setEndsWith3Points, setGap, setIcon, setShiftText, setText, setTextPosition, setTickerEnabled, setVerticalAlignment, shouldTickerStart, startTicker, startTicker, stopTicker |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RadioButton(java.lang.String text)
text
- to display next to the buttonpublic RadioButton()
public RadioButton(Image icon)
icon
- icon to show next to the buttonpublic RadioButton(java.lang.String text, Image icon)
text
- to display next to the buttonicon
- icon to show next to the buttonMethod Detail |
---|
public java.lang.String toString()
Component
toString
in class Component
public boolean isSelected()
isSelected
in class Button
public void setSelected(boolean selected)
selected
- value for selectionpublic void released(int x, int y)
Button
released
in class Button
x
- the x position if a touch event triggered this, -1 if this isn't relevanty
- the y position if a touch event triggered this, -1 if this isn't relevantpublic void paint(Graphics g)
Component
paint
in interface Animation
paint
in class Button
g
- the component graphicsprotected Dimension calcPreferredSize()
Component
calcPreferredSize
in class Button
public void setGroup(java.lang.String groupName)
groupName
- a name for the gouppublic void refreshTheme()
Component
refreshTheme
in class Component
public java.lang.String getGroup()
public boolean isOppositeSide()
isOppositeSide
in class Button
public void setOppositeSide(boolean oppositeSide)
oppositeSide
- the oppositeSide to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |