waba.ui
Class Window
waba.lang.Object
|
+--waba.ui.Control
|
+--waba.ui.Container
|
+--waba.ui.Window
- Direct Known Subclasses:
- MainWindow
- public class Window
- extends Container
- implements ISurface
Window is a "floating" top-level window. This class is not functional
enough to be used for dialogs and other top-level windows, it
currently exists only as a base class for the MainWindow class.
Constructor Summary |
Window()
Constructs a window. |
Method Summary |
void |
_doPaint(int x,
int y,
int width,
int height)
Called by the VM to repaint an area. |
void |
_postEvent(int type,
int key,
int x,
int y,
int modifiers,
int timeStamp)
Called by the VM to post key and pen events. |
protected void |
damageRect(int x,
int y,
int width,
int height)
Adds a damage rectangle to the current list of areas that need
repainting. |
Control |
getFocus()
Returns the focus control for this window. |
void |
setFocus(Control c)
Sets focus to the given control. |
Methods inherited from class waba.ui.Control |
addTimer,
contains,
createGraphics,
getFontMetrics,
getNext,
getParent,
getRect,
onEvent,
onPaint,
postEvent,
removeTimer,
repaint,
setRect |
_keyEvent
protected static KeyEvent _keyEvent
_penEvent
protected static PenEvent _penEvent
_controlEvent
protected static ControlEvent _controlEvent
Window
public Window()
- Constructs a window.
setFocus
public void setFocus(Control c)
- Sets focus to the given control. When a user types a key, the control with
focus get the key event. At any given time, only one control in a window
can have focus. Calling this method will cause a FOCUS_OUT control event
to be posted to the window's current focus control (if one exists)
and will cause a FOCUS_IN control event to be posted to the new focus
control.
getFocus
public Control getFocus()
- Returns the focus control for this window.
- See Also:
setFocus(waba.ui.Control)
damageRect
protected void damageRect(int x,
int y,
int width,
int height)
- Adds a damage rectangle to the current list of areas that need
repainting.
_postEvent
public void _postEvent(int type,
int key,
int x,
int y,
int modifiers,
int timeStamp)
- Called by the VM to post key and pen events.
_doPaint
public void _doPaint(int x,
int y,
int width,
int height)
- Called by the VM to repaint an area.