FileDocCategorySizeDatePackage
MessageDetailsScreen.javaAPI DocWireless Messaging API3252Mon Nov 10 21:10:18 GMT 2003wmafw

MessageDetailsScreen

public class MessageDetailsScreen extends Object
MessageDetailsScreen displays the details for a given short text message.

Fields Summary
protected static Command
REPLY
/ /** Reply Command
protected static Command
BACK
Back Command
private Display
display
/ /** Current display context
private CommandListener
commandListener
The command listener responsible of application navigation
private Form
screen
The menu screen
private String
from
From field value
Constructors Summary
protected MessageDetailsScreen(Display d, CommandListener cl)
Constructor.


          
         
        display = d;
        commandListener = cl;
        screen = new Form(UIConstants.TXT_SMS_SUMM);
        screen.addCommand(REPLY);
        screen.addCommand(BACK);
        screen.setCommandListener(commandListener);
    
Methods Summary
protected java.lang.StringgetFrom()
Returns the from field.

return
the message from field.

        return from;
    
protected DisplayablegetScreen()
Returns the main menu Displayable.

return
the message details screen.

        return screen;
    
protected voidshowScreen(java.lang.String from, java.lang.String message)
Make the main menu visible.

param
from is the message's sender
param
message is the text message contents.

        try {
            this.from = from;
            if (display != null) {
                //  Clear the screen before adding new entries.
                for(int i=screen.size()-1; i>=0; i--) screen.delete(i);
                //  Append the From and Message.
                screen.append(UIConstants.TXT_FROM + from);
                screen.append(UIConstants.TXT_MESSAGE + message);
                //  Display the screen.
                display.setCurrent(screen);
            }
        } catch (Exception e) {
            System.out.println("showException Exception: " + e);
        }