com.nokia.mid.ui
Class FullCanvas

java.lang.Object
  |
  +--Displayable
        |
        +--javax.microedition.lcdui.Canvas
              |
              +--com.nokia.mid.ui.FullCanvas

public abstract class FullCanvas
extends javax.microedition.lcdui.Canvas

FullCanvas provides a full screen painting area.

Implementations need to draw status indicators overlaid on the FullCanvas. These should be drawn in the top left corner, but there may be reasons for deviating from this rule. Applications must ensure that the display does not become cluttered even if overlaid indicators appear.

Commands cannot be added to FullCanvas. Pressing the keys normally tied to Commands (e.g. softbuttons, or other command buttons) will result in direct keystroke events (see documentation on key events in javax.microedition.Canvas). FullCanvas defines new constants that are used for these key codes.

Callback methods of FullCanvas have the same semantics as standard Canvas does, although the DirectGraphics will be passed to the paint method of com.nokia.mid.ui.FullCanvas.

In general, all key presses in FullCanvas are reported as normal key press events through keyPressed(), keyRepeated() and keyReleased() methods. There are some additional constant key code definitions in FullCanvas. All the normal key codes reported in Canvas are also reported in FullCanvas.

Since:
1.0
See Also:
Serialized Form

Field Summary
static int KEY_DOWN_ARROW
          Key code constant for Down arrow key.
static int KEY_END
          Key code constant for End key.
static int KEY_LEFT_ARROW
          Key code constant for Left arrow key.
static int KEY_RIGHT_ARROW
          Key code constant for Right arrow key.
static int KEY_SEND
          Key code constant for Send key.
static int KEY_SOFTKEY1
          Key code constant for left softkey or first command button key.
static int KEY_SOFTKEY2
          Key code constant for right softkey or last command button key.
static int KEY_SOFTKEY3
          Key code constant for select key, middle softkey or second command button key.
static int KEY_UP_ARROW
          Key code constant for Up arrow key.
 
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
protected FullCanvas()
          Deprecated. As of Nokia UI API 1.1 in devices with MIDP 2.0 or higher, replaced by javax.microedition.lcdui.Canvas.setFullScreenMode(boolean).
 
Method Summary
 void addCommand(Command cmd)
          Deprecated. As of Nokia UI API 1.1 in devices with MIDP 2.0 or higher, replaced by javax.microedition.lcdui.Canvas.addCommand(Command).
 void setCommandListener(CommandListener l)
          Deprecated. As of Nokia UI API 1.1 in devices with MIDP 2.0 or higher, replaced by javax.microedition.lcdui.Canvas.setCommandListener(CommandListener).
 
Methods inherited from class javax.microedition.lcdui.Canvas
getGameAction, getHeight, getKeyCode, getKeyName, getWidth, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, hideNotify, isDoubleBuffered, keyPressed, keyReleased, keyRepeated, paint, 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
 

Field Detail

KEY_SOFTKEY1

public static final int KEY_SOFTKEY1
Key code constant for left softkey or first command button key. The value is -6.

Since:
1.0
See Also:
Constant Field Values

KEY_SOFTKEY2

public static final int KEY_SOFTKEY2
Key code constant for right softkey or last command button key. The value is -7.

Since:
1.0
See Also:
Constant Field Values

KEY_SEND

public static final int KEY_SEND
Key code constant for Send key. The value is -10.

Since:
1.0
See Also:
Constant Field Values

KEY_END

public static final int KEY_END
Key code constant for End key. Note: Pressing End may have some other effect depending on the system, for example, device UI may return to the device's idle state or may close down the application. This means that in some devices End key press may not deliver any key events. The value is -11.

Since:
1.0
See Also:
Constant Field Values

KEY_SOFTKEY3

public static final int KEY_SOFTKEY3
Key code constant for select key, middle softkey or second command button key. Not all devices have this key. The value is -5.

Since:
1.0
See Also:
Constant Field Values

KEY_UP_ARROW

public static final int KEY_UP_ARROW
Key code constant for Up arrow key. The value is -1.

Since:
1.0
See Also:
Constant Field Values

KEY_DOWN_ARROW

public static final int KEY_DOWN_ARROW
Key code constant for Down arrow key. The value is -2.

Since:
1.0
See Also:
Constant Field Values

KEY_LEFT_ARROW

public static final int KEY_LEFT_ARROW
Key code constant for Left arrow key. Not all devices have this key. The value is -3.

Since:
1.0
See Also:
Constant Field Values

KEY_RIGHT_ARROW

public static final int KEY_RIGHT_ARROW
Key code constant for Right arrow key. Not all devices have this key. The value is -4.

Since:
1.0
See Also:
Constant Field Values
Constructor Detail

FullCanvas

protected FullCanvas()
Deprecated. As of Nokia UI API 1.1 in devices with MIDP 2.0 or higher, replaced by javax.microedition.lcdui.Canvas.setFullScreenMode(boolean).

Constructs a new FullCanvas object. Applications cannot call this constructor directly, they need to subclass FullCanvas.

Method Detail

addCommand

public void addCommand(Command cmd)
Deprecated. As of Nokia UI API 1.1 in devices with MIDP 2.0 or higher, replaced by javax.microedition.lcdui.Canvas.addCommand(Command).

Throws IllegalStateException. Commands are not possible in FullCanvas.

Throws:
java.lang.IllegalStateException - always thrown

setCommandListener

public void setCommandListener(CommandListener l)
Deprecated. As of Nokia UI API 1.1 in devices with MIDP 2.0 or higher, replaced by javax.microedition.lcdui.Canvas.setCommandListener(CommandListener).

Throws IllegalStateException. Commands are not possible in FullCanvas.

Throws:
java.lang.IllegalStateException - always thrown

forum.nokia.com/java

Copyright (c) 2002-2004 Nokia Corporation. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc.