|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jcontrol.ui.vole.Component | +--jcontrol.ui.vole.Container | +--jcontrol.ui.vole.Frame
A Frame is the starting point for creating a graphical user interface. Though several Frame instances may exist simultaneously, only one instance must be visible at the same time. The Frame class is a manager for user interaction and maps input/output facilitys such as keyboard or backlight to an underlying class framework. (C) DOMOLOGIC Home Automation GmbH 2003
Field Summary | |
protected static jcontrol.io.Graphics |
graphics
Graphics access |
protected int |
key_d
|
protected int |
key_D
|
protected int |
key_L
|
protected int |
key_R
|
protected int |
key_S
|
protected int |
key_u
|
protected int |
key_U
|
protected static jcontrol.io.Keyboard |
keyboard
Keyboard access |
protected MenuInterface |
menu
The main menu |
(package private) static int |
POLL_INTERVAL
time interval between key buffer reads in millis |
protected static Frame |
visibleFrame
The currently visible frame (only one simultaneously) |
Fields inherited from class jcontrol.ui.vole.Container |
children, hasFocus, TRANSFER_BACKWARD, TRANSFER_FORWARD |
Fields inherited from class jcontrol.ui.vole.Component |
focusOwner, font, g, height, listener, parent, visible, width, x, y |
Constructor Summary | |
Frame()
Constructs a new Frame. |
|
Frame(jcontrol.io.Graphics graphics,
jcontrol.io.Keyboard keys)
Constructs a new Frame. |
Method Summary | |
MenuInterface |
getMenu()
Get the frame's current menu. |
void |
onActionEvent(ActionEvent event)
Handle ActionEvents. |
boolean |
onKeyEvent(KeyEvent event)
Handle KeyEvents. |
void |
paint()
Paint all components or a menu. |
void |
remove()
Destroys this frame and all child components. |
MenuInterface |
removeMenu()
Remove a menu from the frame. |
void |
run()
This is the main event loop of any user interface. |
void |
setMenu(MenuInterface m)
Add a menu to this frame. |
void |
setVisible(boolean b)
Shows or hides the frame. |
void |
show()
Shows the frame. |
Methods inherited from class jcontrol.ui.vole.Container |
add, getFocus, isCovered, remove, removeAll, removeFocus, requestFocus, setFocus, setFont, setGraphics, setRadioButton, transferFocus, transferFocus |
Methods inherited from class jcontrol.ui.vole.Component |
getBounds, getParent, isVisible, setBounds, setLocation, setParent, transferFocus, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, notifyAll, wait |
Field Detail |
protected static jcontrol.io.Graphics graphics
protected int key_d
protected int key_D
protected int key_L
protected int key_R
protected int key_S
protected int key_u
protected int key_U
protected static jcontrol.io.Keyboard keyboard
protected MenuInterface menu
static final int POLL_INTERVAL
protected static Frame visibleFrame
Constructor Detail |
public Frame()
Constructs a new Frame.
The dimensions are equivalent to the display size.
They may be changed by using setBounds()
.
public Frame(jcontrol.io.Graphics graphics, jcontrol.io.Keyboard keys)
Constructs a new Frame.
The dimensions are equivalent to the display size.
They may be changed by using setBounds()
.
graphics
- An instance of a custom display adapter.keys
- An instance of a keyboard interface.Method Detail |
public MenuInterface getMenu()
public void onActionEvent(ActionEvent event)
onActionEvent
in interface ActionListener
onActionEvent
in class Component
event
- the ActionEventpublic boolean onKeyEvent(KeyEvent event)
onKeyEvent
in class Container
event
- the KeyEvent to pass on
public void paint()
paint
in class Container
public void remove()
remove
in class Container
public MenuInterface removeMenu()
public void run()
run
in interface java.lang.Runnable
public void setMenu(MenuInterface m)
m
- The menupublic void setVisible(boolean b)
setVisible
in class Container
b
- true-visible, false-invisibleComponent.setVisible(boolean)
public void show()
setVisible(true);
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |