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

📄 editform.java

📁 基于J2ME的RSS阅读器
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package pp.rss.reader.ui;import javax.microedition.lcdui.*;import pp.rss.reader.midlet.RSSReader;import pp.rss.reader.model.RSSSourceEntry;/** * * @author Administrator */public class EditForm extends Form implements CommandListener{    private Command cmdBack,cmdSave;    private TextField description,link;    private RSSReader midlet;    private int index;    public EditForm(RSSReader midlet)    {        super("修改RSS Feed源");        this.midlet=midlet;        cmdSave=new Command("保存",Command.SCREEN,1);        cmdBack=new Command("返回",Command.BACK,2);        description=new TextField(null,null,RSSReader.MAX_RSS_SOURCE,TextField.ANY);        link=new TextField(null,null,RSSReader.MAX_RSS_LINK,TextField.ANY);        this.addCommand(cmdSave);        this.addCommand(cmdBack);        this.append(description);        this.append(link);        this.setCommandListener(this);    }    public void setDescription(String desc)    {        description.setString(desc);    }    public void setLink(String link)    {        this.link.setString(link);    }    public void setIndex(int index)    {        this.index=index;    }    public void commandAction(Command command,Displayable displayable)    {        if(command==cmdSave)        {            description.setString(description.getString().replace(RSSReader.SEPARATOR_CHAR,' '));            RSSSourceEntry item=new RSSSourceEntry(description.getString(),link.getString());            midlet.vecRSSSource.setElementAt(item, index);            midlet.lsRSSSource.set(index, description.getString(), null);        }        midlet.showSourceForm();    }}

⌨️ 快捷键说明

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