jcontrol.ui.vole
Class PassiveFrame

java.lang.Object
  extended by jcontrol.ui.vole.Component
      extended by jcontrol.ui.vole.Container
          extended by jcontrol.ui.vole.PassiveFrame
All Implemented Interfaces:
ActionListener

public class PassiveFrame
extends Container
implements ActionListener

A PassiveFrame is the starting point for creating a graphical user interface WITHOUT keyboard support. Several PassiveFrame instances may exist simultaneously, only one instance must be visible at the same time.

The PassiveFrame class is a manager for user interaction and maps output facilities to an underlying class framework. In contrast to the Frame class, the PassiveFrame class does not support the keyboard and though it has no focus management for the available components.

(c) Copyright 2003-2007 DOMOLOGIC GmbH


Field Summary
protected static Graphics graphics
          Graphics access
protected  MenuInterface menu
          The main menu
protected static PassiveFrame 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
PassiveFrame()
          Constructs a new Frame.
PassiveFrame(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 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

graphics

protected static Graphics graphics
Graphics access


visibleFrame

protected static PassiveFrame visibleFrame
The currently visible frame (only one simultaneously)


menu

protected MenuInterface menu
The main menu

Constructor Detail

PassiveFrame

public PassiveFrame()

Constructs a new Frame.

The dimensions are equivalent to the display size. They may be changed by using setBounds().


PassiveFrame

public PassiveFrame(Graphics graphics,
                    Keyboard keys)

Constructs a new Frame.

The dimensions are equivalent to the display size. They may be changed by using setBounds().

Parameters:
graphics - An instance of a custom display adapter.
keys - An instance of a keyboard interface.
Method Detail

setVisible

public void setVisible(boolean b)
Shows or hides the frame. When the frame is hidden, all event handlers are stopped.

Overrides:
setVisible in class Container
Parameters:
b - true-visible, false-invisible
See Also:
Component.setVisible(boolean)

show

public void show()
Shows the frame. Same as setVisible(true);


remove

public void remove()
Destroys this frame and all child components.

Overrides:
remove in class Container

onActionEvent

public void onActionEvent(ActionEvent event)
Handle ActionEvents.

Specified by:
onActionEvent in interface ActionListener
Overrides:
onActionEvent in class Component
Parameters:
event - the ActionEvent

onKeyEvent

public boolean onKeyEvent(KeyEvent event)
Handle KeyEvents.

Overrides:
onKeyEvent in class Container
Parameters:
event - the KeyEvent to pass on
Returns:
This method returns false when the KeyEvent has been consumed.

setMenu

public void setMenu(MenuInterface m)
Add a menu to this frame. Any prior added menu is overwritten.

Parameters:
m - The menu

getMenu

public MenuInterface getMenu()
Get the frame's current menu.

Returns:
Menu The current menu or null.

removeMenu

public MenuInterface removeMenu()
Remove a menu from the frame.

Returns:
Menu The menu which was removed or null.

paint

public void paint()
Paint all components or a menu.

Overrides:
paint in class Container