debugform.java.svn-base
来自「测试工具」· SVN-BASE 代码 · 共 70 行
SVN-BASE
70 行
import javax.microedition.lcdui.*;import javax.microedition.io.*;import javax.microedition.midlet.*;import java.io.*;import java.util.*;/** * Allow a user to enter a single text input field * */public class DebugForm extends javax.microedition.lcdui.Form implements CommandListener { /** * */ Testlet app; //private Command done = new Command("确定", Command.OK, 1); private Command exit = new Command("",Command.CANCEL,2 ); /** * This constructor creates new BaseDemo with the given title & creates * the standard commands for the demos. */ public DebugForm (String title, Testlet app) { super(title); this.app = app; setCommandListener(this) ; //setItemStateListener(new StateChangeListener (done, this)); //addCommand(done); addCommand(exit); } public void setContent( Vector v ) { if ( v == null ) return; deleteAll(); for( int i=v.size()-1;i>=0;i-- ) { append( ( String) v.elementAt(i) ); append( "\r\n" ); } } public void setContent( String str ) { append( str ); } /** * Indicates that a command event has occurred. */ public void commandAction(Command c, Displayable d) { if ( c == exit ) app.returnMainList(); } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?