uk.co.silentsoftware.ui.views
Class ReceivedMessageView

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Screen
          extended by javax.microedition.lcdui.Form
              extended by uk.co.silentsoftware.ui.views.AbstractFormView
                  extended by uk.co.silentsoftware.ui.views.AbstractTextMessageView
                      extended by uk.co.silentsoftware.ui.views.ReceivedMessageView
All Implemented Interfaces:
javax.microedition.lcdui.CommandListener, GPSDataView

public class ReceivedMessageView
extends AbstractTextMessageView
implements javax.microedition.lcdui.CommandListener, GPSDataView

View shown when a text message is received - either a request of this user to send their location or to prompt the user to set their target as the location sent to them from another user


Constructor Summary
ReceivedMessageView(javax.microedition.midlet.MIDlet parent)
          Default constructor
 
Method Summary
 void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable d)
          Processes the command to either send the last position provided by the GPS to another phone or sets the received position as the current target
 boolean isPendingDecision()
          Returns whether this view is finished with - required to ensure that the view stays on top of other views, especially if the midlet is started by push registry to avoid the mainview appearing on top
 void process(javax.microedition.location.Location loc)
          Stores the last fix from the GPS reader for sending
 void process(java.lang.String data)
          Stores as raw NMEA data the last fix from the GPS reader for sending
 void setMessage(javax.wireless.messaging.TextMessage content)
          Sets the message on this screen based on the text message content.
 
Methods inherited from class javax.microedition.lcdui.Form
append, append, append, delete, deleteAll, get, getHeight, getWidth, insert, set, setItemStateListener, size
 
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, getTicker, getTitle, isShown, removeCommand, setCommandListener, setTicker, setTitle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReceivedMessageView

public ReceivedMessageView(javax.microedition.midlet.MIDlet parent)
Default constructor

Parameters:
parent -
Method Detail

setMessage

public void setMessage(javax.wireless.messaging.TextMessage content)
Sets the message on this screen based on the text message content. Looks up the telephone number (and if possible the name from the phone contacts) and sets the relevant command. (either send position or request position)

Parameters:
content -

process

public void process(java.lang.String data)
Stores as raw NMEA data the last fix from the GPS reader for sending

Specified by:
process in interface GPSDataView

process

public void process(javax.microedition.location.Location loc)
Stores the last fix from the GPS reader for sending

Specified by:
process in interface GPSDataView

commandAction

public void commandAction(javax.microedition.lcdui.Command c,
                          javax.microedition.lcdui.Displayable d)
Processes the command to either send the last position provided by the GPS to another phone or sets the received position as the current target

Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener
Overrides:
commandAction in class AbstractFormView

isPendingDecision

public boolean isPendingDecision()
Returns whether this view is finished with - required to ensure that the view stays on top of other views, especially if the midlet is started by push registry to avoid the mainview appearing on top

Returns: