Blackberry JAVA DEVELOPMENT ENVIRONMENT Handbuch "Erste Schritte - Seite 19

Blättern Sie online oder laden Sie pdf Handbuch "Erste Schritte für Software Blackberry JAVA DEVELOPMENT ENVIRONMENT herunter. Blackberry JAVA DEVELOPMENT ENVIRONMENT 32 Seiten. Version 4.7.0
Auch für Blackberry JAVA DEVELOPMENT ENVIRONMENT: Freigabemitteilung (8 seiten)

choiceField.getSelectedIndex()
The
for the choice item that a BlackBerry smartphone user selects from a choiceField drop-down list. Invoking
UiApplication.getUiApplication.pushScreen(_infoScreen)
instance of itself to display a screen with information on the city a BlackBerry smartphone user selects from a
drop-down list.
choiceField
CityInfoScreen
1.
In the
BlackBerry smartphone user selects the menu item.
private MenuItem _viewItem = new MenuItem("More Info", 110, 10) {
CityInfoScreen
2. In the
a BlackBerry smartphone user selects.
public void run() {
//Store the index for the city a BlackBerry smartphone user selects
select = choiceField.getSelectedIndex();
//Create an instance of the screen that displays information about a city the BlackBerry
smartphone user selects
_infoScreen = new InfoScreen();
//Push the screen with information on the city the BlackBerry smartphone user selects to
the display stack and paint this screen
UiApplication.getUiApplication.pushScreen(_infoScreen);
}
Create a menu item that a BlackBerry smartphone user clicks to close a
BlackBerry device application
CityInfoScreen
1.
In the
BlackBerry® smartphone user selects a menu item.
private MenuItem _closeItem = new MenuItem("Close", 200000, 10) {
2. In the
CityInfoScreen
application's
onClose()
public void run()
{ onClose();
}
};

Add menu items to the CityInfo application menu

The
makeMenu()
method is inherited from the
menu items to a menu. If you override the
menu of the BlackBerry device application, you must call this method on the parent class.
2: Create a BlackBerry device application with advanced UI features
method lets a BlackBerry device application retrieve the index number
MenuItem
class, create a
run()
class, create a
method for the
MenuItem
class, create a
class, create a
run()
method that defines the action that calls the BlackBerry device
method when a BlackBerry smartphone user selects the menu item.
MainScreen
makeMenu()
lets a BlackBerry device application use an
with text that reflects the action that occurs when a
MenuItem
that displays information about a city
with text that reflects the action that occurs when a
class and lets a BlackBerry® device application add
method, to add the menu items of the main screen to the
19