Java Reference
In-Depth Information
public Alert get_locatingAlert() {
if (locatingAlert == null) {
locatingAlert = new Alert("Locating", "Finding your location",
null, null);
locatingAlert.setTimeout(Alert.FOREVER);
}
return locatingAlert;
}
public TextBox get_locationTextBox() {
if (locationTextBox == null) {
locationTextBox = new TextBox("Add Location", "", 80, 0);
locationTextBox.addCommand(get_locateCommand());
locationTextBox.addCommand(get_backCommand());
locationTextBox.addCommand(get_okCommand());
locationTextBox.setCommandListener(this);
}
return locationTextBox;
}
public List get_locationList() {
if (locationList == null) {
String[] locations;
locations = locationStore.getLocationStrings();
locationList = new List("Where", List.IMPLICIT, locations, null);
locationList.addCommand(get_screenCommand());
locationList.addCommand(get_backCommand());
locationList.addCommand(get_locateCommand());
locationList.setCommandListener(this);
}
return locationList;
}
public Alert get_cannotAddLocationAlert() {
if (cannotAddLocationAlert == null)
{
cannotAddLocationAlert = new Alert("Cannot Add Location");
cannotAddLocationAlert.setString("An error occurred adding
the location you entered. It has not been added.");
cannotAddLocationAlert.addCommand(get_backCommand());
}
return cannotAddLocationAlert;
}
 
Search WWH ::




Custom Search