Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.microedition.lcdui
Class Canvas  view Canvas download Canvas.java

java.lang.Object
  extended byjavax.microedition.lcdui.Displayable
      extended byjavax.microedition.lcdui.Canvas

public abstract class Canvas
extends Displayable


Field Summary
static int DOWN
           
static int FIRE
           
static int GAME_A
           
static int GAME_B
           
static int GAME_C
           
static int GAME_D
           
static int KEY_NUM0
           
static int KEY_NUM1
           
static int KEY_NUM2
           
static int KEY_NUM3
           
static int KEY_NUM4
           
static int KEY_NUM5
           
static int KEY_NUM6
           
static int KEY_NUM7
           
static int KEY_NUM8
           
static int KEY_NUM9
           
static int KEY_POUND
           
static int KEY_STAR
           
static int LEFT
           
static int RIGHT
           
static int UP
           
 
Fields inherited from class javax.microedition.lcdui.Displayable
commands, currentDisplay, listener
 
Constructor Summary
protected Canvas()
           
 
Method Summary
 int getGameAction(int keyCode)
           
 int getHeight()
           
 int getKeyCode(int gameAction)
           
 java.lang.String getKeyName(int keyCode)
           
 int getWidth()
           
 boolean hasPointerEvents()
           
 boolean hasPointerMotionEvents()
           
 boolean hasRepeatEvents()
           
protected  void hideNotify()
           
 boolean isDoubleBuffered()
           
protected  void keyPressed(int keyCode)
           
protected  void keyReleased(int keyCode)
           
protected  void keyRepeated(int keyCode)
           
protected abstract  void paint(Graphics g)
           
protected  void pointerDragged(int x, int y)
           
protected  void pointerPressed(int x, int y)
           
protected  void pointerReleased(int x, int y)
           
 void repaint()
           
 void repaint(int x, int y, int width, int height)
           
 void serviceRepaints()
           
protected  void showNotify()
           
 
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, getCommandListener, getCommands, hideNotify, isShown, removeCommand, setCommandListener, showNotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UP

public static final int UP
See Also:
Constant Field Values

DOWN

public static final int DOWN
See Also:
Constant Field Values

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values

FIRE

public static final int FIRE
See Also:
Constant Field Values

GAME_A

public static final int GAME_A
See Also:
Constant Field Values

GAME_B

public static final int GAME_B
See Also:
Constant Field Values

GAME_C

public static final int GAME_C
See Also:
Constant Field Values

GAME_D

public static final int GAME_D
See Also:
Constant Field Values

KEY_NUM0

public static final int KEY_NUM0
See Also:
Constant Field Values

KEY_NUM1

public static final int KEY_NUM1
See Also:
Constant Field Values

KEY_NUM2

public static final int KEY_NUM2
See Also:
Constant Field Values

KEY_NUM3

public static final int KEY_NUM3
See Also:
Constant Field Values

KEY_NUM4

public static final int KEY_NUM4
See Also:
Constant Field Values

KEY_NUM5

public static final int KEY_NUM5
See Also:
Constant Field Values

KEY_NUM6

public static final int KEY_NUM6
See Also:
Constant Field Values

KEY_NUM7

public static final int KEY_NUM7
See Also:
Constant Field Values

KEY_NUM8

public static final int KEY_NUM8
See Also:
Constant Field Values

KEY_NUM9

public static final int KEY_NUM9
See Also:
Constant Field Values

KEY_STAR

public static final int KEY_STAR
See Also:
Constant Field Values

KEY_POUND

public static final int KEY_POUND
See Also:
Constant Field Values
Constructor Detail

Canvas

protected Canvas()
Method Detail

getGameAction

public int getGameAction(int keyCode)

getKeyCode

public int getKeyCode(int gameAction)

getKeyName

public java.lang.String getKeyName(int keyCode)

hasPointerEvents

public boolean hasPointerEvents()

hasPointerMotionEvents

public boolean hasPointerMotionEvents()

hasRepeatEvents

public boolean hasRepeatEvents()

getWidth

public int getWidth()

getHeight

public int getHeight()

hideNotify

protected void hideNotify()
Overrides:
hideNotify in class Displayable

isDoubleBuffered

public boolean isDoubleBuffered()

keyPressed

protected void keyPressed(int keyCode)
Overrides:
keyPressed in class Displayable

keyRepeated

protected void keyRepeated(int keyCode)

keyReleased

protected void keyReleased(int keyCode)
Overrides:
keyReleased in class Displayable

paint

protected abstract void paint(Graphics g)
Specified by:
paint in class Displayable

pointerPressed

protected void pointerPressed(int x,
                              int y)

pointerReleased

protected void pointerReleased(int x,
                               int y)

pointerDragged

protected void pointerDragged(int x,
                              int y)

repaint

public final void repaint()
Overrides:
repaint in class Displayable

repaint

public final void repaint(int x,
                          int y,
                          int width,
                          int height)

serviceRepaints

public final void serviceRepaints()

showNotify

protected void showNotify()
Overrides:
showNotify in class Displayable