brf.j2me.dynaworks.env.kjava
Class KJavaImpl

java.lang.Object
  |
  +--com.sun.kjava.Spotlet
        |
        +--brf.j2me.dynaworks.env.kjava.KJavaImpl
All Implemented Interfaces:
Implementation

public class KJavaImpl
extends com.sun.kjava.Spotlet
implements Implementation

The KJavaImpl class represents the KJava implementation from sun.

Version:
1.0
Author:
Bernd R. Fix
See Also:
Implementation

Field Summary
private  Audio audio
          global Audio object.
private  Graphics canvas
          global canvas object.
private  EventQueue queue
          reference to EventQueue instance.
 
Fields inherited from class com.sun.kjava.Spotlet
appStopKVMEvent, beamReceiveKVMEvent, CALCICON, con, current, in, KEY_HARD1, KEY_HARD2, KEY_HARD3, KEY_HARD4, KEY_POWER, keyDownKVMEvent, MENUICON, NO_EVENT_OPTIONS, PAGEDOWN, PAGEUP, penDownKVMEvent, penMoveKVMEvent, penUpKVMEvent, WANT_SYSTEM_KEYS
 
Constructor Summary
KJavaImpl()
          constructor.
 
Method Summary
 Audio getAudio()
          Get the audio object.
 Database getDatabase(java.lang.String id)
          get a database object identified by a string.
 Graphics getGraphics()
          Get the canvas object.
 void keyDown(int key)
          Sink for 'keyDown' event.
 void penDown(int x, int y)
          Sink for 'penDown' event.
 void penMove(int x, int y)
          Sink for 'penMove' event.
 void penUp(int x, int y)
          Sink for 'penUp' event.
private  boolean postEvent(Event e)
          post an event into the event queue.
 void register(EventQueue queue)
          registration of EventQueue.
 void unregister()
          unregistration of EventQueue.
 
Methods inherited from class com.sun.kjava.Spotlet
, access$0, access$1, beamReceive, beamSend, dispatch, getFlashID, register, setPalmEventOptions, unknownEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

queue

private EventQueue queue
reference to EventQueue instance.


canvas

private Graphics canvas
global canvas object.

audio

private Audio audio
global Audio object.
Constructor Detail

KJavaImpl

public KJavaImpl()
constructor.

Method Detail

register

public void register(EventQueue queue)
registration of EventQueue.

Specified by:
register in interface Implementation
Parameters:
queue - EventQueue - handler for UI events.
See Also:
EventQueue

unregister

public void unregister()
unregistration of EventQueue.

Overrides:
unregister in class com.sun.kjava.Spotlet

getGraphics

public Graphics getGraphics()
Get the canvas object.

Specified by:
getGraphics in interface Implementation
Returns:
Graphics - the canvas object

getAudio

public Audio getAudio()
Get the audio object.

Specified by:
getAudio in interface Implementation
Returns:
Audio - the audio object

getDatabase

public Database getDatabase(java.lang.String id)
get a database object identified by a string.

Specified by:
getDatabase in interface Implementation
Parameters:
id - String - identifying name of the database.
Returns:
Database - database handler.

penDown

public void penDown(int x,
                    int y)
Sink for 'penDown' event.

Overrides:
penDown in class com.sun.kjava.Spotlet
Parameters:
x - int - x-coordinate of pen
y - int - y-coordinate of pen

penMove

public void penMove(int x,
                    int y)
Sink for 'penMove' event.

Overrides:
penMove in class com.sun.kjava.Spotlet
Parameters:
x - int - x-coordinate of pen
y - int - y-coordinate of pen

penUp

public void penUp(int x,
                  int y)
Sink for 'penUp' event.

Overrides:
penUp in class com.sun.kjava.Spotlet
Parameters:
x - int - x-coordinate of pen
y - int - y-coordinate of pen

keyDown

public void keyDown(int key)
Sink for 'keyDown' event.

Overrides:
keyDown in class com.sun.kjava.Spotlet
Parameters:
keyCode - int - system specific key code

postEvent

private boolean postEvent(Event e)
post an event into the event queue.

Parameters:
e - Event - event to be added to the EventQueue.
See Also:
EventQueue