|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--waba.ui.Control
|
+--waba.ui.Check
Check is a check control.
Here is an example showing a check being used:
public class MyProgram extends MainWindow
{
Check check;
public void onStart()
{
check = new Check("Check me");
check.setRect(10, 10, 80, 30);
add(check);
}
public void onEvent(Event event)
{
if (event.type == ControlEvent.PRESSED &&
event.target == check)
{
... handle check being pressed
| Constructor Summary | |
Check(String text)
Creates a check control displaying the given text. |
|
| Method Summary | |
static void |
drawCheck(Graphics g,
boolean checked,
int x,
int y)
Draws the check box graphic at the given position. |
boolean |
getChecked()
Returns the checked state of the control. |
String |
getText()
Gets the text displayed in the check. |
void |
onEvent(Event event)
Called by the system to pass events to the check control. |
void |
onPaint(Graphics g)
Called by the system to draw the check control. |
void |
setChecked(boolean checked)
Sets the checked state of the control. |
| Methods inherited from class waba.ui.Control |
addTimer, contains, createGraphics, getFontMetrics, getNext, getParent, getRect, postEvent, removeTimer, repaint, setRect |
| Methods inherited from class java.lang.Object |
equals, hashCode, toString |
| Constructor Detail |
public Check(String text)
| Method Detail |
public void onEvent(Event event)
onEvent in class Controlwaba.ui.Controlevent - the event to processEvent,
KeyEvent,
PenEventpublic String getText()
public boolean getChecked()
public void setChecked(boolean checked)
public static void drawCheck(Graphics g,
boolean checked,
int x,
int y)
public void onPaint(Graphics g)
onPaint in class Controlwaba.ui.Controlg - the graphics object for drawingGraphics
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||