midlet
Class MapCanvas

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Canvas
          extended by midlet.MapCanvas

public class MapCanvas
extends javax.microedition.lcdui.Canvas

The Canvas of the main MIDlet.

Author:
Hlavac Peter

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
MapCanvas()
          Inits the Canvas: It consits of two screens the Map and the Playlist Editor The map image and the mapping of the Mapitems to units of the map are loaded from the RMS.
 
Method Summary
protected  void keyPressed(int keyCode)
          Handles Keyevents
protected  void keyRepeated(int keyCode)
          Handles Keyevents
 void paint(javax.microedition.lcdui.Graphics g)
          Draws on the Canvas.
protected  void pointerDragged(int x, int y)
          Handles Pointerevents
protected  void pointerPressed(int x, int y)
          Handles Pointerevents.
protected  void pointerReleased(int x, int y)
          Handles Pointerevents
 
Methods inherited from class javax.microedition.lcdui.Canvas
getGameAction, getHeight, getKeyCode, getKeyName, getWidth, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, hideNotify, isDoubleBuffered, keyReleased, repaint, repaint, serviceRepaints, setFullScreenMode, showNotify, sizeChanged
 
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, getTicker, getTitle, isShown, removeCommand, setCommandListener, setTicker, setTitle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapCanvas

public MapCanvas()
Inits the Canvas: It consits of two screens The map image and the mapping of the Mapitems to units of the map are loaded from the RMS.

Method Detail

paint

public void paint(javax.microedition.lcdui.Graphics g)
Draws on the Canvas.

Specified by:
paint in class javax.microedition.lcdui.Canvas

keyPressed

protected void keyPressed(int keyCode)
Handles Keyevents

Overrides:
keyPressed in class javax.microedition.lcdui.Canvas

keyRepeated

protected void keyRepeated(int keyCode)
Handles Keyevents

Overrides:
keyRepeated in class javax.microedition.lcdui.Canvas

pointerPressed

protected void pointerPressed(int x,
                              int y)
Handles Pointerevents. If the stylus is pressed on a specific location on the display a small ring, that fades out within one second, is displayed on that position.

Overrides:
pointerPressed in class javax.microedition.lcdui.Canvas

pointerDragged

protected void pointerDragged(int x,
                              int y)
Handles Pointerevents

Overrides:
pointerDragged in class javax.microedition.lcdui.Canvas

pointerReleased

protected void pointerReleased(int x,
                               int y)
Handles Pointerevents

Overrides:
pointerReleased in class javax.microedition.lcdui.Canvas