Blackberry JAVA DEVELOPMENT ENVIRONMENT Руководство по началу работы - Страница 18

Просмотреть онлайн или скачать pdf Руководство по началу работы для Программное обеспечение Blackberry JAVA DEVELOPMENT ENVIRONMENT. Blackberry JAVA DEVELOPMENT ENVIRONMENT 32 страницы. Version 4.7.0
Также для Blackberry JAVA DEVELOPMENT ENVIRONMENT: Примечание к выпуску (8 страниц)

Getting started guide
main()
2. Within the
method, add the following code:
CityInfo theApp = new CityInfo();
theApp.enterEventDispatcher();

Create a screen for the CityInfo application

1.
Create a class that extends the
final class CityInfoScreen extends MainScreen {
2. Create a constructor for the
public CityInfoScreen(){}
Allow the CityInfo application use a screen that displays a drop-down list of
city names
1.
In the class that extends the
private
InfoScreen
private ObjectChoiceField choiceField;
private int select;
2. In the constructor for the extension of the
LabelField
constructor for the
LabelField title = new LabelField("City Information Kiosk",
LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
setTitle(title);
3. In the constructor for the extension of the
Info"))
add(new RichTextField("Major U.S. Cities"))
to
4. In the constructor for the extension of the
as choice items. An
ObjectChoiceField
smartphone user can choose from.
String choices[] = {"Los Angeles", "Chicago", "New York"};
choiceField = new ObjectChoiceField("Select a City", choices);
choiceField
5. Add the
add(choiceField);
ObjectChoiceField
You can use an
application. See
ObjectChoiceField
Create a menu item that a BlackBerry smartphone user clicks to display more
information about a city they select
When a BlackBerry® smartphone user selects a menu item from the menu of a BlackBerry device application, the
run()
code in the
method for the menu item executes. See
18
MainScreen
class.
CityInfoScreen
class
class, create the following instance variables.
MainScreen
_infoScreen;
MainScreen
with "City Information Kiosk".
MainScreen
MainScreen
is a UI field that displays a list of objects that a BlackBerry®
Manager
to the
object of the
to display a list of choices in a field on the UI of a BlackBery device
in the API Reference for more information.
class, replace the
String
class, change
add(new RichTextField("City
.
class, create a drop-down list that displays three cities
CityInfoScreen
screen
MenuItem
in the API Reference for more information.
information in the
.