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

📄 alertpanel.java

📁 最强手机阅读器Anyview3.0版的界面代码
💻 JAVA
字号:
package com.ismyway.anyview.win;

import javax.microedition.lcdui.Command;

import com.ismyway.fairyui.FlowPanel;
import com.ismyway.fairyui.NewLine;
import com.ismyway.fairyui.Row;
import com.ismyway.fairyui.TextBlock;
import com.ismyway.util.Res;


public class AlertPanel extends FlowPanel {
	private int[] alertKey = null;

	public AlertPanel(String msg, int[] alertKey) {
		setTitle(Res.get("Info"));
		this.alertKey = alertKey;

		Row row = new Row();
		row.add(new NewLine(3));
		row.add(new TextBlock(msg));
		row.add(new NewLine(3));
		add(row);

		setMaxHeight(160);
		validate();
		setTop(mainCanvas.getHeight() - getHeight());
		addCommand(new Command(Res.get("Close"), Command.EXIT, 1));
	}

	public boolean keyReleased(int key) {
		if (alertKey != null) {
			for (int i = 0; i < alertKey.length; i++) {
				if (key == alertKey[i]) {
					mainCanvas.closePopup();
					return false;
				}
			}
		}
		
		return false;
	}
}

⌨️ 快捷键说明

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