|
Palm API Beta 2 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.kjava.RadioButton
A two-state button meant as part of a group, only one of which can be "on" at one time.
RadioGroup
Constructor Summary | |
RadioButton()
Create a new RadioButton. |
|
RadioButton(int x,
int y,
java.lang.String text)
Create a new RadioButton. |
Method Summary | |
java.lang.String |
getText()
Get the label of the button. |
void |
handlePenDown(int x,
int y)
The pen has gone down in the button. |
boolean |
isSelected()
Is this RadioButton currently selected? |
void |
paint()
Paint the RadioButton on the screen. |
boolean |
pressed(int x,
int y)
Did the user press inside the RadioButton? |
void |
setLocation(int x,
int y)
Set the position of the RadioButton. |
void |
setParent(RadioGroup rg)
Set the parent RadioGroup of this button. |
void |
setState(boolean state)
Set the state of the button. |
void |
setText(java.lang.String text)
Set the label of the button. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RadioButton()
public RadioButton(int x, int y, java.lang.String text)
x
- the X coordinate of the RadioButton's positiony
- the Y coordinate of the RadioButton's positiontext
- the label for the buttonMethod Detail |
public void setLocation(int x, int y)
x
- the X coordinate of the RadioButton's positiony
- the Y coordinate of the RadioButton's positionpublic void setText(java.lang.String text)
text
- the new text of the labelpublic java.lang.String getText()
public void paint()
public void handlePenDown(int x, int y)
x
- the X coordinate of the RadioButton's positiony
- the Y coordinate of the RadioButton's positionpublic boolean pressed(int x, int y)
x
- the X coordinate of the RadioButton's positiony
- the Y coordinate of the RadioButton's positionpublic void setParent(RadioGroup rg)
rg
- the parental RadioGrouppublic void setState(boolean state)
state
- the new state; true
means "selected"public boolean isSelected()
|
Submit a bug or feature The GUI classes provided with this release are NOT part of CLDC, and they will be removed in later releases of this software. Official GUI classes for Java 2 Micro Edition will be defined separately through the Java Community Process and included in J2ME profiles. Java is trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |