|
|||||||||
| 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. The text is always right-aligned in the 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,
appObj,
asContainer,
asWindow,
backColor,
backDis,
BEFORE,
BOTTOM,
CENTER,
clearValueInt,
clearValueStr,
enabled,
FILL,
FIT,
fm,
fmH,
focusLess,
focusTraversable,
font,
foreColor,
foreDis,
height,
highlightRectsCount,
isHighlighting,
LEFT,
parent,
PREFERRED,
RANGE,
RIGHT,
SAME,
TOP,
uiCE,
uiFlat,
uiPalm,
uiVista,
visible,
width,
x,
x2,
y,
y2 |
| Constructor Summary | |
Check(java.lang.String text)
Creates a check control displaying the given text. |
|
| Method Summary | |
void |
clear()
Clears this control, checking it if clearValueInt is 1. |
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. |
java.lang.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. |
static void |
paintCheck(Graphics g,
int fmH,
int height)
Paints a check in the given coordinates. |
void |
setChecked(boolean checked)
Sets the checked state of the control. |
void |
setText(java.lang.String text)
sets the text that is displayed in the check. added by guich |
| Methods inherited from class waba.ui.Control |
addTimer,
changeHighlighted,
contains,
createGraphics,
drawHighlight,
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,
translateFromOrigin,
uiStyleChanged |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public Check(java.lang.String text)
| Method Detail |
public void onEvent(Event event)
event - the event to processEvent,
KeyEvent,
PenEventpublic void setText(java.lang.String text)
public java.lang.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
public static void paintCheck(Graphics g,
int fmH,
int height)
g - The desired Graphics object where to paint. The forecolor must already be set.fmH - The fmH memberheight - The height of the control. The check will be vertical aligned based on this height.public void clear()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||