资源简介
Anyview3.0支持的手机包括但不限于:
MOTO: E680、A780、E2、A1200、E6、E398、E1、L7、E770
NOKIA: 6230i、S40第三版以上、S60
SONYERICSSON:K750、W800、K600、V600、Z520、W700 、Z525、W600、W550、W900、W810、Z530、W300、K510、K310、K320、Z550、Z558、K610、K800、K790、W850、Z710、W710、Z610、W830、Z750(JP-5以后的平台)
代码片段和文件信息
package com.ismyway.anyview;
import javax.microedition.lcdui.game.GameCanvas;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.Graphics;
/**
* title: AnyView
*
* Description: E680(I) Reader
*
* Copyright: Copyright (c) 2005
*
* Company: www.ismyway.com
*
* @author ZhangJian
* @version 1.0
*/
public abstract class AbstractWindow implements KeyActionListener {
public final static int OPENING = 1;
public final static int HIDE = 2;
public final static int CLOSED = 3;
public final static int ANCHOR = Graphics.LEFT | Graphics.TOP;
protected int width;
protected int height;
protected int LEFT = 0; //left指当前窗口左上角的X坐标在屏幕上的实际X坐标值
protected int TOP = 0; //top指当前窗口左上角的Y坐标在屏幕上的实际Y坐标值
protected int PRESSED_X PRESSED_Y; //
protected int RELEASE_X RELEASE_Y; //
protected int WINDOW_STATE = CLOSED;
protected boolean TOUCH_EVENT = false; //触摸屏事件是否有效
public AbstractWindow() {
}
protected abstract Image getWindow();
protected abstract void destroy();
protected abstract boolean bof();
protected void setWindowState(int state) {
WINDOW_STATE = state;
}
protected int getWidth() {
return width;
}
protected int getHeight() {
return height;
}
protected int getLeft() {
return LEFT;
}
protected int getTop() {
return TOP;
}
protected void pointerPressed(int x int y) {
if (AnyView.readType == 1) { //横屏
PRESSED_X = TOP - y;
PRESSED_Y = x - LEFT;
} else {
PRESSED_X = x - LEFT;
PRESSED_Y = y - TOP;
}
}
protected void pointerDragged(int x int y) {
}
protected void pointerReleased(int x int y) {
RELEASE_X = x - LEFT;
RELEASE_Y = y - TOP;
if (AnyView.readType == 1) { //横屏
RELEASE_X = TOP - y;
RELEASE_Y = x - LEFT;
}
}
protected boolean contains(int x int y) {
return (x > 0 && x < width && y > 0 && y < height);
}
//根据屏幕方式映射按键
final protected int mapKey(int keyCode) {
if (AnyView.readType == 1) { //横屏
switch (keyCode) {
case -1: //up
return -4; //right
case -2: //down
return -3; //left
case -3: //left
return -1; //up
case -4: //right
return -2; //down
}
}
return keyCode;
}
//根据屏幕方式映射坐标到当前窗口坐标
final protected void mapPoint(int x int y) {
}
/**
* 返回当前窗口的状态
* @return int
*/
public int getWindowState() {
return WINDOW_STATE;
}
protected void keyAction(int keyStates) {
// Left
if ((keyStates & GameCanvas.LEFT_PRESSED) != 0) {
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 15618 2006-03-17 11:20 src\com\ismyway\anyview\AnyView.java
文件 26475 2006-02-06 05:59 src\com\ismyway\anyview\SplashCanvas.java
文件 19113 2006-01-28 13:32 src\com\ismyway\anyview\CustomFont.java
文件 6259 2006-01-28 13:29 src\com\ismyway\anyview\Menu.java
文件 15549 2005-10-17 22:27 src\com\ismyway\anyview\Selector.java
文件 489 2005-09-10 23:42 src\com\ismyway\anyview\KeyActionListener.java
文件 4947 2005-10-29 20:13 src\com\ismyway\anyview\AbstractWindow.java
文件 14181 2005-10-07 01:48 src\com\ismyway\anyview\ColorSelector.java
文件 7875 2005-10-08 20:07 src\com\ismyway\anyview\IAVReader.java
文件 7357 2005-09-24 01:59 src\com\ismyway\anyview\IAVReaderCanvas.java
文件 15081 2005-10-29 20:49 src\com\ismyway\anyview\FileSelector.java
文件 6242 2005-10-07 12:34 src\com\ismyway\anyview\FileSystemReader.java
文件 52346 2006-02-06 14:33 src\com\ismyway\anyview\TXTReaderCanvas.java
文件 2904 2005-09-23 23:05 src\com\ismyway\anyview\Record.java
文件 3036 2005-09-22 23:51 src\com\ismyway\anyview\Mark.java
文件 3971 2005-09-24 01:55 src\com\ismyway\anyview\BookMark.java
文件 4328 2005-10-08 21:09 src\com\ismyway\anyview\Message.java
文件 8465 2005-10-17 22:28 src\com\ismyway\anyview\Progress.java
文件 1538 2005-10-15 21:42 src\com\ismyway\anyview\Search.java
文件 673 2005-10-15 00:41 src\com\ismyway\anyview\TxtLine.java
文件 2393 2005-10-26 21:17 src\com\ismyway\anyview\SMSSender.java
文件 2442 2005-10-26 21:17 src\com\ismyway\anyview\SMSPhone.java
文件 1296 2005-10-23 23:38 src\com\ismyway\anyview\SMSText.java
目录 0 2006-02-28 10:04 src\com\ismyway\anyview
目录 0 2006-02-28 10:04 src\com\ismyway
目录 0 2006-02-28 10:04 src\com
目录 0 2006-02-28 10:04 src
----------- --------- ---------- ----- ----
222578 27
............此处省略0个文件信息
评论
共有 条评论