|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--waba.ui.Control
Control is the base class for user-interface objects.
| Constructor Summary | |
Control()
|
|
| Method Summary | |
Timer |
addTimer(int millis)
Adds a timer to a control. |
boolean |
contains(int x,
int y)
Returns true if the given x and y coordinate in the parent's coordinate system is contained within this control. |
Graphics |
createGraphics()
Creates a Graphics object which can be used to draw in the control. |
FontMetrics |
getFontMetrics(Font font)
Returns the font metrics for a given font. |
Control |
getNext()
Returns the next child in the parent's list of controls. |
Container |
getParent()
Returns the control's parent container. |
Rect |
getRect()
Returns a copy of the control's rectangle. |
void |
onEvent(Event event)
Called to process key, pen, control and other posted events. |
void |
onPaint(Graphics g)
Called to draw the control. |
void |
postEvent(Event event)
Posts an event. |
boolean |
removeTimer(Timer timer)
Removes a timer from a control. |
void |
repaint()
Redraws the control. |
void |
setRect(int x,
int y,
int width,
int height)
Sets or changes a control's position and size. |
| Methods inherited from class java.lang.Object |
equals, hashCode, toString |
| Constructor Detail |
public Control()
| Method Detail |
public Timer addTimer(int millis)
millis - the timer tick interval in millisecondsControlEventpublic boolean removeTimer(Timer timer)
public FontMetrics getFontMetrics(Font font)
public void setRect(int x,
int y,
int width,
int height)
public Rect getRect()
public Container getParent()
public Control getNext()
public boolean contains(int x,
int y)
public void repaint()
public Graphics createGraphics()
public void postEvent(Event event)
Eventpublic void onEvent(Event event)
event - the event to processEvent,
KeyEvent,
PenEventpublic 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 | ||||||||