|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--waba.ui.Control
|
+--waba.ui.Radio
Radio is a radio control.
Here is an example showing a radio being used:
public class MyProgram extends MainWindow
{
Radio radio;
public void onStart()
{
radio = new Button("Check me");
radio.setRect(10, 10, 80, 30);
add(radio);
}
public void onEvent(Event event)
{
if (event.type == ControlEvent.PRESSED &&
event.target == radio)
{
... handle radio being pressed
| Fields inherited from class waba.ui.Control |
BOTTOM,
CENTER,
controlCount,
enabled,
FILL,
fm,
font,
height,
LEFT,
name,
next,
parent,
PREFERRED,
prev,
RIGHT,
TOP,
width,
x,
y |
| Constructor Summary | |
Radio(java.lang.String text)
Creates a radio control displaying the given text. |
|
| Method Summary | |
static void |
drawRadio(Graphics g,
boolean checked,
int x,
int y)
Draws the radio circle graphic at the given position. |
boolean |
getChecked()
Returns the checked state of the control. |
int |
getPreferredHeight()
returns the preffered height of this control. added by guich |
int |
getPreferredWidth()
returns the preffered width of this control. added by guich |
java.lang.String |
getText()
Gets the text displayed in the radio. |
void |
onEvent(Event event)
Called by the system to pass events to the radio control. |
void |
onPaint(Graphics g)
Called by the system to draw the radio control. |
void |
setChecked(boolean checked)
Sets the checked state of the control. |
void |
setText(java.lang.String text)
sets the text. added by guich |
java.lang.String |
toString()
Returns the string representation of the object. |
| Methods inherited from class waba.ui.Control |
addTimer,
contains,
createGraphics,
getAbsoluteRect,
getFontMetrics,
getNext,
getParent,
getRect,
isEnabled,
isVisible,
onBoundsChanged,
onWindowPaintFinished,
postEvent,
removeTimer,
repaint,
repaintNow,
setEnabled,
setFont,
setRect,
setRect,
setVisible |
| Methods inherited from class java.lang.Object |
hashCode |
| Constructor Detail |
public Radio(java.lang.String text)
| Method Detail |
public 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()
public void onEvent(Event event)
event - the event to processEvent,
KeyEvent,
PenEvent
public static void drawRadio(Graphics g,
boolean checked,
int x,
int y)
public void onPaint(Graphics g)
g - the graphics object for drawingGraphicspublic java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||