|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectexample.sms.SMSSender
public class SMSSender
Prompts for text and sends it via an SMS MessageConnection
Field Summary | |
---|---|
(package private) javax.microedition.lcdui.Command |
backCommand
user interface command for going back to the previous screen |
(package private) javax.microedition.lcdui.Displayable |
backScreen
Where to return if the user hits "Back" |
(package private) java.lang.String |
destinationAddress
The URL to send the message to |
(package private) javax.microedition.lcdui.Display |
display
Display to use. |
(package private) javax.microedition.lcdui.TextBox |
messageBox
Area where the user enters a message to send |
(package private) javax.microedition.lcdui.Command |
sendCommand
user interface command for indicating Send request |
(package private) javax.microedition.lcdui.Displayable |
sendingScreen
Displayed when a message is being sent |
(package private) java.lang.String |
smsPort
The port on which we send SMS messages |
Constructor Summary | |
---|---|
SMSSender(java.lang.String smsPort,
javax.microedition.lcdui.Display display,
javax.microedition.lcdui.Displayable backScreen,
javax.microedition.lcdui.Displayable sendingScreen)
Initialize the MIDlet with the current display object and graphical components. |
Method Summary | |
---|---|
void |
commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable s)
Respond to commands, including exit |
void |
promptAndSend(java.lang.String destinationAddress)
Prompt for message and send it |
void |
run()
Send the message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
javax.microedition.lcdui.Command sendCommand
javax.microedition.lcdui.Command backCommand
javax.microedition.lcdui.Display display
java.lang.String smsPort
java.lang.String destinationAddress
javax.microedition.lcdui.TextBox messageBox
javax.microedition.lcdui.Displayable backScreen
javax.microedition.lcdui.Displayable sendingScreen
Constructor Detail |
---|
public SMSSender(java.lang.String smsPort, javax.microedition.lcdui.Display display, javax.microedition.lcdui.Displayable backScreen, javax.microedition.lcdui.Displayable sendingScreen)
Method Detail |
---|
public void promptAndSend(java.lang.String destinationAddress)
public void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable s)
commandAction
in interface javax.microedition.lcdui.CommandListener
c
- user interface command requesteds
- screen object initiating the requestpublic void run()
run
in interface java.lang.Runnable
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |