waba.ui
Class Window
java.lang.Object
|
+--waba.ui.Control
|
+--waba.ui.Container
|
+--waba.ui.Window
- All Implemented Interfaces:
- ISurface
- 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. |
java.awt.Graphics |
createAWTGraphics()
|
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 |
Window
public Window()
- Constructs a window.
createAWTGraphics
public java.awt.Graphics createAWTGraphics()
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)
_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.