1 package ubc.midp.mobilephoto.sms; 
  2  
  3 import javax.microedition.lcdui.Command; 
  4 import javax.microedition.lcdui.Form; 
  5 import javax.microedition.lcdui.Item; 
  6 import javax.microedition.lcdui.TextField; 
  7  
  8 /** 
  9  * @author tyoung 
 10  * 
 11  * To change the template for this generated type comment go to 
 12  * Window - Preferences - Java - Code Generation - Code and Comments 
 13  */ 
 14 public class NetworkScreen extends Form { 
 15    
 16   TextField recPhoneNum = new TextField("Phone #", "5550001", 15, TextField.ANY); 
 17   String rPort = "1000"; 
 18    
 19   Command ok; 
 20   Command cancel; 
 21    
 22   /** 
 23    * @param arg0 
 24    */ 
 25   public NetworkScreen(String title) { 
 26  
 27     super(title); 
 28     recPhoneNum.setString("5550001"); 
 29  
 30     this.append(recPhoneNum); 
 31      
 32     //TODO: Add an OK or confirm button to let the parent midlet know when 
 33     //it is time to proceed to the next screen... 
 34      
 35     ok = new Command("Send Now", Command.OK, 0); 
 36     cancel = new Command("Cancel", Command.EXIT, 1); 
 37     this.addCommand(ok); 
 38     this.addCommand(cancel); 
 39      
 40   } 
 41    
 42   /** 
 43    * @param arg0 
 44    * @param arg1 
 45    */ 
 46   public NetworkScreen(String title, Item[] items) { 
 47  
 48     super(title, items); 
 49     // TODO Auto-generated constructor stub 
 50   }   
 51   /** 
 52    * @return Returns the recPhoneNum. 
 53    */ 
 54   public String getRecPhoneNum() { 
 55     return recPhoneNum.getString(); 
 56   } 
 57 /** 
 58  * @return Returns the recPort. 
 59  */ 
 60 public String getRecPort() { 
 61   return rPort; 
 62 } 
 63 }    
    |