|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--brf.j2me.dynaworks.env.Environment
The Environment is an class to allow static access to the base functionality in different J2ME implementations.
It provides access to the four parts of the environment relevant for DynaWorks applications:
1) Graphics: access to the screen
2) Audio: access to the audio subsystem
3) Events: user-interaction events
4) Persistence: access to data storage The class can also register EventQueue objects that will receive user events and allows static access to Graphics and Audio by the following calls; the "setImpl()" method must be called before any of the other calls will work:
Environent.setImpl (...); // set a new environment (Platform/Config/Profile) 1) Graphics g = Environment.getGraphics (); 2) Audio a = Environment.getAudio (); 3) Environment.register (...); // register an EventQueue instance 4) Database db = Environment.getDatabase (String id); It can return a Database object based on a String that identifies the database and its context. A database can add, get, put and delete records.
EventQueue,
Graphics,
Audio,
Database,
Dataset| Field Summary | |
private static Audio |
audio
Audio attribute. |
private static Graphics |
canvas
Graphics attribute. |
private static Implementation |
impl
reference to Implementation (interface). |
| Constructor Summary | |
Environment()
|
|
| Method Summary | |
(package private) static void |
static initialization |
static int |
decodeIdString(java.lang.String str)
Decode a four-letter-String into a 32-bit-Integer used as an identifier for applications and databases. |
static void |
dispose()
clean-up an implementation instance. |
static Audio |
getAudio()
get access to the Audio implementation. |
static Database |
getDatabase(java.lang.String id)
return a requested database object. |
static Graphics |
getGraphics()
get access to the Graphics implementation. |
static void |
register(EventQueue queue)
registration of EventQueue. |
static void |
setImpl(Implementation sys)
set an implementation instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
| Field Detail |
private static Implementation impl
private static Graphics canvas
private static Audio audio
| Constructor Detail |
public Environment()
| Method Detail |
public static void setImpl(Implementation sys)
sys - Implementation - implementation to be used.public static void dispose()
public static void register(EventQueue queue)
queue - EventQueue - handler for system events.public static Graphics getGraphics()
public static Audio getAudio()
public static Database getDatabase(java.lang.String id)
id - String - identifying name of the database.public static final int decodeIdString(java.lang.String str)
str - String - four-letter namestatic void()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||