⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 platform.java

📁 j2me开发的1个简单的wap浏览器.程序框架还是不错的.包括对低级事件的处理.通信框架,标签的解析
💻 JAVA
字号:
/********************************************************************
 * 项目名称				:<b>j2me学习 J2me Wap Explorer</b>			<br/>
 * 
 * Copyright 2005-2006 Wuhua. All rights reserved </br>
 *
 * 本程序只用于学习目的,不能用于商业目的。如有需要请联系作者
 ********************************************************************/
package org.wuhua.wap.ui.core;

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;

/**
 * <b>类名:Platform.java</b> </br> 
 * 编写日期: 2006-12-22 <br/>
 * 程序功能描述:移植到不同的平台时候,只需修改这个文件的键植就可以对那些平台键位差别进行配置了 <br/>
 * Demo: <br/>
 * Bug: <br/>
 * 
 * 程序变更日期 :<br/> 
 * 变更作者 :<br/> 
 * 变更说明 :<br/>
 * 
 * @author wuhua </br> <a href="mailto:rrq12345@163.com">rrq12345@163.com</a>
 */

/**
 * Provides platform dependent settings for Sun WTK platform
 * 
 * @author Greg Gridin
 */
public class Platform 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_SUN_WTK;

	/**
	 * The width in pixels of a screen
	 */
	public static int WIDTH;

	/**
	 * The height in pixels of a screen
	 */
	public static int HEIGHT;

	/**
	 * Indicated whether the phone has hardware support for double buffering for
	 * screen painting
	 */
	public static final boolean DOUBLE_BUFFER = true;

	/**
	 * "No-key" key code
	 */
	public static final int KEY_UNDEFINED = 0;

	public static final int KEY_FULL_MODE = 48;

	/**
	 * 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 = -3;

	/**
	 * Key code for the RIGHT game action.
	 */
	public static final int KEY_RIGHT = -4;

	/**
	 * Key code for the DOWN game action.
	 */
	public static final int KEY_DOWN = -2;

	/**
	 * Key code for the FIRE game action.
	 */
	public static final int KEY_FIRE = -5;

	/**
	 * Key code for left soft key
	 */
	public static final int KEY_SOFT_LEFT = -6;

	/**
	 * Key code for right soft key
	 */
	public static final int KEY_SOFT_RIGHT = -7;

	/**
	 * 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 = -11;

	/**
	 * Key code for CLEAR key
	 */
	public static final int KEY_CLEAR = -8;

	/**
	 * 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;

	public static final int KEY_PAGEUP = 42;

	public static final int KEY_PAGEDOWN = 35;

	public static final int REFRESH = 53;

	protected void paint(Graphics g) {
		// TODO Auto-generated method stub

	}

} // class PlatformCanvas

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -