view.java

来自「A J2ME Weblog Client for mobile devices 」· Java 代码 · 共 50 行

JAVA
50
字号
/* * Copyright (C) 2004 MobileBlogger Development Team */package net.sourceforge.mobileblogger;import javax.microedition.lcdui.*;import javax.microedition.midlet.*;public class View extends Form implements CommandListener {	private Display display;	private MIDlet midlet;	private final static Command CMD_OK = new Command("OK", Command.ITEM, 1);    private final static Command CMD_NEXT = new Command("Next", Command.ITEM, 1);    private final static Command CMD_ENTER = new Command("Enter", Command.ITEM, 1);    private final static Command CMD_SETSITE = new Command("OK", Command.ITEM, 1);    private final static Command CMD_SETUSER = new Command("OK", Command.ITEM, 2);    private final static Command CMD_BACK = new Command("Back", Command.BACK, 2);    private final static Command CMD_EXIT = new Command("Exit", Command.STOP, 3);    private final static Command CMD_POST = new Command("Post", Command.OK, 1);    private final static Command CMD_SAVE = new Command("Save", Command.OK, 1);	public View(MIDlet m, Display d) {		super("View Post");		midlet = m;		display = d;		addCommand(CMD_BACK);		setCommandListener(this);		append("Not working...");	}	public void commandAction(Command c, Displayable d) {		if(c == CMD_BACK) {			display.setCurrent( new Menu(midlet, display) );		}	}	/*	public void hmm() {		String text = "Do an action...";		Alert a = new Alert("Action", text, null, AlertType.INFO);		display.setCurrent(a);	}	*/}

⌨️ 快捷键说明

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