|
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.CheckBox
A checkbox user interface object. A CheckBox object displays a check box next to a text label. It has two states, checked and unchecked.
Constructor Summary | |
CheckBox()
Create a new checkbox at an undefined position with no text label. |
|
CheckBox(int x,
int y,
java.lang.String text)
Create a new checkbox at a given position with a text label. |
Method Summary | |
void |
handlePenDown(int x,
int y)
The user selected the CheckBox; invert its state. |
void |
paint()
Paint the CheckBox. |
boolean |
pressed(int x,
int y)
Did the user's "press" fall within the CheckBox? |
void |
setLocation(int x,
int y)
Set the CheckBox's position. |
void |
setState(boolean state)
Set the state and redraw to reflect it. |
void |
setText(java.lang.String text)
Set the CheckBox's label. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public CheckBox()
public CheckBox(int x, int y, java.lang.String text)
x
- the X coordinate of position.y
- the Y coordinate of position.text
- label of the CheckBoxMethod Detail |
public void setLocation(int x, int y)
x
- the X coordinate of position.y
- the Y coordinate of position.public void setText(java.lang.String text)
public void paint()
public void handlePenDown(int x, int y)
public boolean pressed(int x, int y)
x
- the X coordinate of the user's pressy
- the Y coordinate of the user's press(x, y)
fall within boundspublic void setState(boolean state)
state
- the new state
|
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 |