?? platformcanvas.motov
字號:
package com.jmobilecore.ui.core;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;
/**
* Provides platform dependent settings for Motorola platform
* phones v80/220/300/400/500/600, e398, c650
*
* @author Greg Gridin
*/
abstract public class PlatformCanvas extends Canvas {
static public final byte PLATFORM_BARTEO = 1;
static public final byte PLATFORM_LG = 2;
static public final byte PLATFORM_MOTOROLA = 3;
static public final byte PLATFORM_MOTOROLA_V = 4;
static public final byte PLATFORM_NOKIA = 5;
static public final byte PLATFORM_NOKIA_30 = 6;
static public final byte PLATFORM_SIEMENS = 7;
static public final byte PLATFORM_SAMSUNG = 8;
static public final byte PLATFORM_SONYERICSSON = 9;
static public final byte PLATFORM_SUN_WTK = 10;
static public final byte PLATFORM = PLATFORM_MOTOROLA_V;
/**
* The width in pixels of a screen
*/
public static final int WIDTH;
/**
* The height in pixels of a screen
*/
public static final int HEIGHT;
/**
* Indicated whether the phone has hardware support for double buffering for screen painting
*/
public static final boolean DOUBLE_BUFFER = true;
static {
Canvas dummy = new Canvas() {
public void paint(Graphics g) {
}
};
WIDTH = dummy.getWidth();
HEIGHT = dummy.getHeight();
dummy = null;
}
/**
* "No-key" key code
*/
public static final int KEY_UNDEFINED = 0;
/**
* Key code for the UP game action.
*/
public static final int KEY_UP = 1;
/**
* Key code for the LEFT game action.
*/
public static final int KEY_LEFT = 2;
/**
* Key code for the RIGHT game action.
*/
public static final int KEY_RIGHT = 5;
/**
* Key code for the DOWN game action.
*/
public static final int KEY_DOWN = 6;
/**
* Key code for the FIRE game action.
*/
public static final int KEY_FIRE = 20;
/**
* Key code for left soft key
*/
public static final int KEY_SOFT_LEFT = 21;
/**
* Key code for right soft key
*/
public static final int KEY_SOFT_RIGHT = 22;
/**
* Key code for PHONE_ON key (green button)
*/
public static final int KEY_PHONE_ON = -10;
/**
* Key code for PHONE_OFF key (red button)
*/
public static final int KEY_PHONE_OFF = KEY_UNDEFINED;
/**
* Key code for MENU key
*/
public static final int KEY_MENU = 23;
/**
* Key code for CLEAR key
*/
public static final int KEY_CLEAR = KEY_UNDEFINED;
/**
* Key code for SPEAKER key
*/
public static final int KEY_SPEAKER = KEY_UNDEFINED;
/**
* Key code for VOLUME UP key
*/
public static final int KEY_VOLUME_UP = KEY_UNDEFINED;
/**
* Key code for VOLUME DOWN key
*/
public static final int KEY_VOLUME_DOWN = KEY_UNDEFINED;
/**
* Key code for "fictitious" ENTER key
* Some phones does not have FIRE button, we have to find out the replacement
*/
public static final int KEY_ENTER = KEY_FIRE;
} // class PlatformCanvas
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -