📄 jremform.java
字号:
/* * JRemCntl - Copyright (C) 2007 Filippo Di Vattimo <fildiv@gmail.com> * See COPYING */package fildiv.jremcntl.client.core;import java.util.Vector;import javax.microedition.lcdui.Command;import javax.microedition.lcdui.Form;public class JRemForm extends Form { private Vector commands; public JRemForm(String name) { super(name); commands = new Vector(); } public void addCommand(Command c) { super.addCommand(c); if (existsCommand(c)) return; commands.addElement(c); } private boolean existsCommand(Command c) { for (int index = 0; index < commands.size(); ++index) { Command cmd = (Command) commands.elementAt(index); if (cmd.equals(c)) return true; } return false; } public void removeCommand(Command c) { super.removeCommand(c); commands.removeElement(c); } public Vector getCommands() { return commands; } public void cancelCommands() { for (int index = 0; index < commands.size(); ++index) { Command c = (Command) commands.elementAt(index); super.removeCommand(c); } } public void restoreCommands() { for (int index = 0; index < commands.size(); ++index) { Command c = (Command) commands.elementAt(index); super.addCommand(c); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -