|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.microedition.lcdui.Displayable
javax.microedition.lcdui.Canvas
GUI
Copyright (c) 2003 Sony Ericsson Mobile Communications AB
All Rights Reserved.
The GUI is the canvas the user sees. It provides graphics & sound for the user and handles user input on the screen or by buttons.
Field Summary |
Fields inherited from class javax.microedition.lcdui.Canvas |
DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, LEFT, RIGHT, UP |
Constructor Summary | |
GUI(CarAPI carAPI,
BluetoothCar bluetoothCar)
Constructs a new GUI object. |
Method Summary | |
boolean |
allUpdated()
|
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
Respond to menu commands. |
protected void |
hideNotify()
Called by the system to notify us that the canvas is now at least partially obscured by another application window, when it previously has been completely visible. |
protected void |
keyPressed(int keyCode)
Handles user input from the buttons. |
protected void |
keyReleased(int keyCode)
Handles user input from the buttons. |
protected void |
keyRepeated(int keyCode)
Handles user input from the buttons. |
void |
paint(javax.microedition.lcdui.Graphics g)
Invoked by system to draw canvas. |
protected void |
pointerDragged(int x,
int y)
Called when the pointer is dragged. |
protected void |
pointerPressed(int x,
int y)
Called when the pointer is pressed. |
protected void |
pointerReleased(int x,
int y)
Called by the system when the pointer is released. |
void |
run()
The GUI-loop. |
protected void |
showNotify()
Called by the system to notify us that the canvas is now completely visible, when it previously has been at least partially obscured by another application window. |
protected void |
sizeChanged(int w,
int h)
Called when the drawable area of the Canvas has been changed. |
void |
stopRecording()
|
void |
stopReplaying()
|
Methods inherited from class javax.microedition.lcdui.Canvas |
getGameAction, getKeyCode, getKeyName, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, isDoubleBuffered, repaint, repaint, serviceRepaints, setFullScreenMode |
Methods inherited from class javax.microedition.lcdui.Displayable |
addCommand, getHeight, getTicker, getTitle, getWidth, isShown, removeCommand, setCommandListener, setTicker, setTitle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GUI(CarAPI carAPI, BluetoothCar bluetoothCar)
GUI
object.
carAPI
- the interface to control car and check car status.Method Detail |
public void run()
MIDlet
is Paused or hidden.
run
in interface java.lang.Runnable
public boolean allUpdated()
public void paint(javax.microedition.lcdui.Graphics g)
protected void sizeChanged(int w, int h)
w
- the new width in pixels of the drawable area of the
Canvas
h
- the new height in pixels of the drawable area of the
Canvas
protected void keyPressed(int keyCode)
keyCode
- the code for the key action generated by user.protected void keyRepeated(int keyCode)
keyCode
- the code for the key action generated by user.protected void keyReleased(int keyCode)
keyCode
- the code for the key action generated by user.protected void pointerPressed(int x, int y)
x
- the horizontal location where the pointer was pressed (relative
to the Canvas)y
- the vertical location where the pointer was pressed (relative
to the Canvas)protected void pointerDragged(int x, int y)
x
- the horizontal location where the pointer was dragged (relative
to the Canvas)y
- the vertical location where the pointer was dragged (relative
to the Canvas)protected void pointerReleased(int x, int y)
x
- the horizontal location where the pointer was released
(relative to the Canvas)y
- the vertical location where the pointer was released
(relative to the Canvas)protected void hideNotify()
carAPI.setAppActive(false)
.
protected void showNotify()
carAPI.setAppActive(true)
.
public void stopRecording()
public void stopReplaying()
public void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
commandAction
in interface javax.microedition.lcdui.CommandListener
c
- the command
triggering this actiond
- the Displayable
on which this event has occurred
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |