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

📄 logsscreen.java

📁 一个基于J2ME技术的程序,使你可以远程控制装有服务端的PC.
💻 JAVA
字号:
/* * JRemCntl - Copyright (C) 2007 Filippo Di Vattimo <fildiv@gmail.com> * See COPYING */package fildiv.jremcntl.client.ui;import javax.microedition.lcdui.Command;import javax.microedition.lcdui.CommandListener;import javax.microedition.lcdui.Displayable;import javax.microedition.lcdui.Form;import fildiv.jremcntl.client.core.AppConstants;import fildiv.jremcntl.client.core.AppContext;import fildiv.jremcntl.client.util.UIUtils;import fildiv.jremcntl.common.core.Logger;public class LogsScreen extends AbstractScreen implements CommandListener, 	Logger {	private final static Command CMD_BACK =        new Command("Back", Command.BACK, 1);	private final static Command CMD_CLEAR =        new Command("Clear", Command.EXIT, 2);		private Form lf;		public LogsScreen(AppContext appCtx) {		super(appCtx);				lf = new Form(AppConstants.LOGS_SCREEN_CAPTION);				lf.addCommand(CMD_BACK);		lf.addCommand(CMD_CLEAR);				lf.setCommandListener(this);	}	public void commandAction(Command c, Displayable d) {		if (c == CMD_BACK)			hide();		else if (c == CMD_CLEAR)			clear();			}	private void clear() {		lf.deleteAll();	}	public void info(String s) {		UIUtils.appendText(lf, UIUtils.formatLog(s));	}	public void warning(String s) {		UIUtils.appendText(lf, UIUtils.formatLog(s) + "\n");		}	public void error() {		UIUtils.appendText(lf, "\n");	}	public void error(String s) {		UIUtils.appendText(lf, "\n");			}	public void error(Exception e) {		UIUtils.appendText(lf, e.getMessage());	}	protected void onActivate() {		getDisplay().setCurrent(lf);	}}

⌨️ 快捷键说明

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