|
|||||||||
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
public class 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 facilities such as keyboard or backlight to an underlying class framework.
(c) Copyright 2003-2007 DOMOLOGIC GmbH
Field Summary | |
---|---|
protected static 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 Keyboard |
keyboard
Keyboard access |
protected MenuInterface |
menu
The main menu |
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 |
---|
eventQueue, focusOwner, font, g, height, listener, parent, visible, width, x, y |
Constructor Summary | |
---|---|
Frame()
Constructs a new Frame. |
|
Frame(Graphics graphics,
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, setParent, transferFocus, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notifyAll, toString, wait |
Field Detail |
---|
protected static Keyboard keyboard
protected static Graphics graphics
protected static Frame visibleFrame
protected MenuInterface menu
protected int key_u
protected int key_U
protected int key_d
protected int key_D
protected int key_S
protected int key_L
protected int key_R
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(Graphics graphics, 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 void setVisible(boolean b)
setVisible
in class Container
b
- true-visible, false-invisibleComponent.setVisible(boolean)
public void show()
setVisible(true);
public void run()
run
in interface Runnable
Thread.run()
public void remove()
remove
in class Container
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 setMenu(MenuInterface m)
m
- The menupublic MenuInterface getMenu()
public MenuInterface removeMenu()
public void paint()
paint
in class Container
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |