FileDocCategorySizeDatePackage
NewMessageScreen.javaAPI DocWireless Messaging API3866Mon Nov 10 21:11:54 GMT 2003wmafw

NewMessageScreen

public class NewMessageScreen extends Object
NewMessageScreen displays the compose screen.

Fields Summary
protected static Command
SEND
/ /** ViewCommand
protected static Command
BACK
Back Command
private Display
display
/ /** Current display context
private CommandListener
commandListener
The command listener responsible of application navigation
private Ticker
ticker
The screen's ticker
private Form
screen
The screen
private TextField
toTF
To TextField
private TextField
messageTF
Message TextField
private Displayable
backScreen
Previous screen to return to
Constructors Summary
protected NewMessageScreen(Display d, CommandListener cl)
Constructor.

param
d is the display context.
param
cl is the command listener for this screen.


                         
         
        display = d;
        commandListener = cl;
        screen = new Form(UIConstants.TXT_NEW_MESSAGE);
        screen.append(toTF);
        screen.append(messageTF);
        screen.addCommand(BACK);
        screen.addCommand(SEND);
        screen.setCommandListener(commandListener);
        screen.setTicker(ticker);
    
Methods Summary
protected DisplayablegetBackScreen()
Returns the Displayable to return to.

return
the screen to return to.

        return backScreen;
    
protected java.lang.StringgetFieldMessage()
Returns the contents of the Message TextField.

return
the value of the Message Textfield.

        return messageTF.getString();
    
protected java.lang.StringgetFieldTo()
Returns the contents of the To TextField.

return
the value of the To Textfield.

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

return
the main menu screen.

        return screen;
    
protected voidsetTicker(java.lang.String text)
Sets the content of the display's ticker

        ticker.setString(text);
    
protected voidshowScreen(java.lang.String to, Displayable backScreen)
Make the main menu visible.

param
to is the message receipient.
param
backScreen is the screen to return to.

        this.backScreen = backScreen;
        toTF.setString(to);
        if (display != null) display.setCurrent(screen);