org.hecl.midp20.lcdui
Class HeclCanvas
java.lang.Object
javax.microedition.lcdui.Displayable
javax.microedition.lcdui.Canvas
javax.microedition.lcdui.game.GameCanvas
org.hecl.midp20.lcdui.HeclCanvas
- All Implemented Interfaces:
- javax.microedition.lcdui.CommandListener
public class HeclCanvas
- extends javax.microedition.lcdui.game.GameCanvas
- implements javax.microedition.lcdui.CommandListener
Fields inherited from class javax.microedition.lcdui.game.GameCanvas |
DOWN_PRESSED, FIRE_PRESSED, GAME_A_PRESSED, GAME_B_PRESSED, GAME_C_PRESSED, GAME_D_PRESSED, LEFT_PRESSED, RIGHT_PRESSED, UP_PRESSED |
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 |
HeclCanvas(boolean suppressKeyEvents)
|
Method Summary |
void |
addCommand(javax.microedition.lcdui.Command cmd)
|
protected void |
callEventHandler(int reason,
int x,
int y,
int width,
int height,
int keycode)
|
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
|
void |
flushGraphics()
|
boolean |
getAutoFlushMode()
|
org.awt.Color |
getCmdBgColor()
|
org.awt.Color |
getCmdFgColor()
|
java.util.Vector |
getCommands()
|
org.graphics.Drawable |
getDrawable()
|
int |
getDrawHeight()
|
int |
getDrawWidth()
|
int |
getFullHeight()
|
boolean |
getFullScreenMode()
|
int |
getFullWidth()
|
int |
getGameAction(int keyCode)
|
javax.microedition.lcdui.Graphics |
getGraphics()
|
int |
getKeyCode(int gameAction)
|
java.lang.String |
getKeyName(int keyCode)
|
void |
handleCommand(javax.microedition.lcdui.Command c)
|
void |
hideNotify()
|
protected boolean |
isCommandKey(int keycode)
|
protected boolean |
isSoftKey(int keycode)
|
void |
keyPressed(int keycode)
|
void |
keyReleased(int keycode)
|
void |
keyRepeated(int keycode)
|
void |
paint(javax.microedition.lcdui.Graphics g)
|
void |
pointerDragged(int x,
int y)
|
void |
pointerPressed(int x,
int y)
|
void |
pointerReleased(int x,
int y)
|
void |
removeCommand(javax.microedition.lcdui.Command cmd)
|
void |
setAutoFlushMode(boolean b)
|
void |
setCmdBgColor(org.awt.Color c)
|
void |
setCmdFgColor(org.awt.Color c)
|
void |
setCommandListener(javax.microedition.lcdui.CommandListener l)
|
void |
setEventHandler(EventHandler eventHandler)
|
void |
setFullScreenMode(boolean b)
|
protected void |
showCommands(javax.microedition.lcdui.Graphics g)
|
void |
showNotify()
|
protected void |
sizeChanged(int w,
int h)
|
Methods inherited from class javax.microedition.lcdui.game.GameCanvas |
flushGraphics, getKeyStates |
Methods inherited from class javax.microedition.lcdui.Canvas |
hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, isDoubleBuffered, repaint, repaint, serviceRepaints |
Methods inherited from class javax.microedition.lcdui.Displayable |
getHeight, getTicker, getTitle, getWidth, isShown, setTicker, setTitle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GAME_LEFT_SK
public static final int GAME_LEFT_SK
- See Also:
- Constant Field Values
GAME_RIGHT_SK
public static final int GAME_RIGHT_SK
- See Also:
- Constant Field Values
KEYCODE_LEFT_SK
public static int KEYCODE_LEFT_SK
KEYCODE_RIGHT_SK
public static int KEYCODE_RIGHT_SK
nokeyevents
protected boolean nokeyevents
evh
protected EventHandler evh
cmds
protected java.util.Vector cmds
cmdlistener
protected javax.microedition.lcdui.CommandListener cmdlistener
savecmdlistener
protected javax.microedition.lcdui.CommandListener savecmdlistener
HeclCanvas
public HeclCanvas(boolean suppressKeyEvents)
addCommand
public void addCommand(javax.microedition.lcdui.Command cmd)
- Overrides:
addCommand
in class javax.microedition.lcdui.Displayable
commandAction
public void commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
- Specified by:
commandAction
in interface javax.microedition.lcdui.CommandListener
handleCommand
public void handleCommand(javax.microedition.lcdui.Command c)
flushGraphics
public void flushGraphics()
- Overrides:
flushGraphics
in class javax.microedition.lcdui.game.GameCanvas
getCmdBgColor
public org.awt.Color getCmdBgColor()
getCmdFgColor
public org.awt.Color getCmdFgColor()
getCommands
public java.util.Vector getCommands()
getFullWidth
public int getFullWidth()
getFullHeight
public int getFullHeight()
getDrawWidth
public int getDrawWidth()
getDrawHeight
public int getDrawHeight()
getGameAction
public int getGameAction(int keyCode)
- Overrides:
getGameAction
in class javax.microedition.lcdui.Canvas
getFullScreenMode
public boolean getFullScreenMode()
getGraphics
public javax.microedition.lcdui.Graphics getGraphics()
- Overrides:
getGraphics
in class javax.microedition.lcdui.game.GameCanvas
getKeyCode
public int getKeyCode(int gameAction)
- Overrides:
getKeyCode
in class javax.microedition.lcdui.Canvas
getKeyName
public java.lang.String getKeyName(int keyCode)
- Overrides:
getKeyName
in class javax.microedition.lcdui.Canvas
hideNotify
public void hideNotify()
- Overrides:
hideNotify
in class javax.microedition.lcdui.Canvas
setCmdBgColor
public void setCmdBgColor(org.awt.Color c)
setCmdFgColor
public void setCmdFgColor(org.awt.Color c)
setCommandListener
public void setCommandListener(javax.microedition.lcdui.CommandListener l)
- Overrides:
setCommandListener
in class javax.microedition.lcdui.Displayable
setEventHandler
public void setEventHandler(EventHandler eventHandler)
setFullScreenMode
public void setFullScreenMode(boolean b)
- Overrides:
setFullScreenMode
in class javax.microedition.lcdui.Canvas
showCommands
protected void showCommands(javax.microedition.lcdui.Graphics g)
paint
public void paint(javax.microedition.lcdui.Graphics g)
- Overrides:
paint
in class javax.microedition.lcdui.game.GameCanvas
pointerPressed
public void pointerPressed(int x,
int y)
- Overrides:
pointerPressed
in class javax.microedition.lcdui.Canvas
pointerReleased
public void pointerReleased(int x,
int y)
- Overrides:
pointerReleased
in class javax.microedition.lcdui.Canvas
pointerDragged
public void pointerDragged(int x,
int y)
- Overrides:
pointerDragged
in class javax.microedition.lcdui.Canvas
isCommandKey
protected boolean isCommandKey(int keycode)
keyPressed
public void keyPressed(int keycode)
- Overrides:
keyPressed
in class javax.microedition.lcdui.Canvas
keyReleased
public void keyReleased(int keycode)
- Overrides:
keyReleased
in class javax.microedition.lcdui.Canvas
keyRepeated
public void keyRepeated(int keycode)
- Overrides:
keyRepeated
in class javax.microedition.lcdui.Canvas
removeCommand
public void removeCommand(javax.microedition.lcdui.Command cmd)
- Overrides:
removeCommand
in class javax.microedition.lcdui.Displayable
showNotify
public void showNotify()
- Overrides:
showNotify
in class javax.microedition.lcdui.Canvas
sizeChanged
protected void sizeChanged(int w,
int h)
- Overrides:
sizeChanged
in class javax.microedition.lcdui.Canvas
callEventHandler
protected void callEventHandler(int reason,
int x,
int y,
int width,
int height,
int keycode)
getDrawable
public org.graphics.Drawable getDrawable()
isSoftKey
protected boolean isSoftKey(int keycode)
getAutoFlushMode
public boolean getAutoFlushMode()
setAutoFlushMode
public void setAutoFlushMode(boolean b)