|
|||||||||
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() { add(check = new Check("Check me"), LEFT, AFTER); } public void onEvent(Event event) { if (event.type == ControlEvent.PRESSED && event.target == check) { ... handle check being pressed
Fields inherited from class waba.ui.Control |
AFTER,
appId,
asContainer,
asWindow,
backColor,
backDis,
BEFORE,
BOTTOM,
CENTER,
enabled,
FILL,
FIT,
fm,
fmH,
focusLess,
font,
foreColor,
foreDis,
height,
LEFT,
parent,
PREFERRED,
RANGE,
RIGHT,
SAME,
TOP,
visible,
width,
x,
x2,
y,
y2 |
Constructor Summary | |
Check(String text)
Creates a check control displaying the given text. |
Method Summary | |
boolean |
getChecked()
Returns the checked state of the control. |
int |
getPreferredHeight()
returns the preffered height of this control. |
int |
getPreferredWidth()
returns the preffered width of this control. |
String |
getText()
Gets the text displayed in the check. |
protected void |
onColorsChanged(boolean colorsChanged)
Called after a setEnabled, setForeColor and setBackColor and when a control has been added to a Container. |
void |
onEvent(Event event)
Called by the system to pass events to the check control. |
protected void |
onFontChanged()
Called after a setFont |
void |
onPaint(Graphics g)
Called by the system to draw the check control. |
void |
setChecked(boolean checked)
Sets the checked state of the control. |
void |
setText(String text)
sets the text that is displayed in the check. added by guich |
Methods inherited from class waba.ui.Control |
addTimer,
contains,
createGraphics,
getAbsoluteRect,
getBackColor,
getFont,
getFontMetrics,
getForeColor,
getNext,
getParent,
getParentWindow,
getPos,
getRect,
getSize,
isDisplayed,
isEnabled,
isVisible,
onBoundsChanged,
onWindowPaintFinished,
postEvent,
removeTimer,
repaint,
repaintNow,
requestFocus,
setBackColor,
setBackForeColors,
setEnabled,
setFocusLess,
setFont,
setForeColor,
setRect,
setRect,
setRect,
setVisible |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
toString,
wait,
wait |
Constructor Detail |
public Check(String text)
Method Detail |
public void onEvent(Event event)
event
- the event to processEvent
,
KeyEvent
,
PenEvent
public void setText(String text)
public String getText()
public boolean getChecked()
public void setChecked(boolean checked)
public int getPreferredWidth()
public int getPreferredHeight()
protected void onColorsChanged(boolean colorsChanged)
protected void onFontChanged()
public void onPaint(Graphics g)
g
- the graphics object for drawingGraphics
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |