java.lang.Object
javax.microedition.lcdui.Displayable
javax.microedition.lcdui.Canvas
com.siemens.mp.color_game.GameCanvas
- public abstract class GameCanvas
- extends javax.microedition.lcdui.Canvas
| 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 |
| Fields inherited from class javax.microedition.lcdui.Displayable |
|
|
Constructor Summary |
protected |
GameCanvas(boolean suppressKeyEvents)
|
| Methods inherited from class javax.microedition.lcdui.Canvas |
getGameAction, getHeight, getKeyCode, getKeyName, getWidth, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, isDoubleBuffered, pointerDragged, pointerPressed, pointerReleased, repaint, repaint, serviceRepaints, showNotify |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UP_PRESSED
public static final int UP_PRESSED
- See Also:
- Constant Field Values
DOWN_PRESSED
public static final int DOWN_PRESSED
- See Also:
- Constant Field Values
LEFT_PRESSED
public static final int LEFT_PRESSED
- See Also:
- Constant Field Values
RIGHT_PRESSED
public static final int RIGHT_PRESSED
- See Also:
- Constant Field Values
FIRE_PRESSED
public static final int FIRE_PRESSED
- See Also:
- Constant Field Values
GAME_A_PRESSED
public static final int GAME_A_PRESSED
- See Also:
- Constant Field Values
GAME_B_PRESSED
public static final int GAME_B_PRESSED
- See Also:
- Constant Field Values
GAME_C_PRESSED
public static final int GAME_C_PRESSED
- See Also:
- Constant Field Values
GAME_D_PRESSED
public static final int GAME_D_PRESSED
- See Also:
- Constant Field Values
offscreen_buffer
private javax.microedition.lcdui.Image offscreen_buffer
keyMask
private int keyMask
GameCanvas
protected GameCanvas(boolean suppressKeyEvents)
getGraphics
protected javax.microedition.lcdui.Graphics getGraphics()
getKeyStates
public int getKeyStates()
paint
public void paint(javax.microedition.lcdui.Graphics g)
flushGraphics
public void flushGraphics(int x,
int y,
int width,
int height)
flushGraphics
public void flushGraphics()
keyPressed
protected void keyPressed(int keyCode)
keyReleased
protected void keyReleased(int keyCode)
- Called when a key is released.
keyRepeated
protected void keyRepeated(int keyCode)
- Called when a key is repeated (held down).
hideNotify
protected void hideNotify()