home *** CD-ROM | disk | FTP | other *** search
- package de.trantor.mail.demo.j2me;
-
- import javax.microedition.lcdui.Command;
- import javax.microedition.lcdui.Displayable;
- import javax.microedition.lcdui.Form;
- import javax.microedition.lcdui.Image;
- import javax.microedition.lcdui.StringItem;
-
- public class ReadScreen extends Form {
- private StringItem sender = new StringItem("From:", "");
- private StringItem date = new StringItem("Date:", "");
- private StringItem subject = new StringItem("Subject:", "");
- // $FF: renamed from: OK javax.microedition.lcdui.Command
- public static Command field_0 = new Command("Ok", 1, 1);
-
- public ReadScreen(MailMIDlet midlet) {
- super("Read");
- ((Form)this).append(this.sender);
- ((Form)this).append(this.date);
- ((Form)this).append(this.subject);
- ((Displayable)this).addCommand(field_0);
- ((Displayable)this).setCommandListener(midlet);
- }
-
- public void setSender(String sender) {
- this.sender.setText(sender);
- }
-
- public void setDate(String date) {
- this.date.setText(date);
- }
-
- public void setSubject(String subject) {
- this.subject.setText(subject);
- }
-
- public void clearBody() {
- for(int i = ((Form)this).size() - 1; i > 2; --i) {
- ((Form)this).delete(i);
- }
-
- }
-
- public void addBody(String line) {
- if (line.equals("")) {
- ((Form)this).append(" ");
- } else {
- ((Form)this).append(line);
- }
-
- }
-
- public void addImage(Image image) {
- ((Form)this).append(image);
- }
- }
-