public abstract class CanvasKeysAndTouch extends CanvasInterrupts
Modifier and Type | Field and Description |
---|---|
static int[] |
internal_key_mappings |
CURRENT_SCREEN_HEIGHT, CURRENT_SCREEN_PPI, CURRENT_SCREEN_WIDTH, UPDATE_SCREEN_DIMENSIONS
Constructor and Description |
---|
CanvasKeysAndTouch() |
Modifier and Type | Method and Description |
---|---|
int |
findKeyBitflag(int key_code)
Translates a numeric key_code coming in from the handset to a bit-flag
|
void |
initKeysAndTouch()
Initialises anything that needs initialising to detect keys and touch events
|
abstract void |
keyAction(int key_bit_flag,
boolean pressed) |
void |
keyPressed(int key_code)
Deal with any key presses
|
void |
keyReleased(int key_code)
Deal with any key releases
|
abstract void |
pointerAction(int x,
int y,
boolean pressed) |
void |
pointerPressed(int x,
int y)
Deal with any pointer presses
|
void |
pointerReleased(int x,
int y)
Deal with any pointer releases
|
initInterrupts
updateScreenDimensions
paint, render, sizeChanged, syncPaint
flushGraphics, flushGraphics, getKeyStates
getGameAction, getHeight, getKeyCode, getKeyName, getWidth, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, isDoubleBuffered, repaint, repaint, serviceRepaints, setFullScreenMode
public abstract void keyAction(int key_bit_flag, boolean pressed)
public abstract void pointerAction(int x, int y, boolean pressed)
public void initKeysAndTouch()
public int findKeyBitflag(int key_code)
public void keyPressed(int key_code)
keyPressed
in class javax.microedition.lcdui.Canvas
public void keyReleased(int key_code)
keyReleased
in class javax.microedition.lcdui.Canvas
public void pointerPressed(int x, int y)
pointerPressed
in class javax.microedition.lcdui.Canvas
public void pointerReleased(int x, int y)
pointerReleased
in class javax.microedition.lcdui.Canvas