Changes

Jump to: navigation, search

BlackBerry Concepts

6,238 bytes added, 20:42, 22 February 2011
UI Video
Field that uses a supplied set of string patterns to scan through a simple text string and pick out "active" regions.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/AutoCompleteField .html AutoCompleteField] ||
AutoCompleteField lets you create a text field that presents users with a changing list of words that are associated with the characters they have typed in the field.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/AutoTextEditField .html AutoTextEditField] ||
An editable text field designed to provide autotext support.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/BasicEditField .html BasicEditField] ||
An editable simple text field with no formatting.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/BitmapField .html BitmapField] ||
Displays a bitmap.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/ButtonField .html ButtonField] ||
Contains a button control.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/ButtonFieldFactory .html ButtonFieldFactory] ||
Assists in creation of ButtonField instances using information contained within Command instances.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/CheckboxField .html CheckboxField] ||
Contains a checkbox control.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/ChoiceField .html ChoiceField] ||
Base implementation of a choice field.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/DateField .html DateField] ||
Stores date and time values.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/Dialog .html Dialog] ||
Provides a dialog box with predefined configurations.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/EditField .html EditField] ||
An editable simple text field with no formatting.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/EmailAddressEditField .html EmailAddressEditField] ||
An editable text field designed specifically to handle internet email addresses.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/GaugeField .html GaugeField] ||
Displays a horizontal bar that you can use for numeric selection or as a progress indicator.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/KeywordFilterField .html KeywordFilterField] ||
Consists of a single keyword input field and a list of selectable elements.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/LabelField .html LabelField] ||
Contains a simple label.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/ListField .html ListField] ||
Contains rows of selectable list items.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/Menu .html Menu] ||
Provides a Menu.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/NullField .html NullField] ||
A field of no size.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/NumericChoiceField .html NumericChoiceField] ||
A choice field that supports choosing from a range of numeric values.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/ObjectChoiceField .html ObjectChoiceField] ||
Choice field that supports a list of object choices.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/ObjectListField .html ObjectListField] ||
List field to contain a list of objects.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/PasswordEditField .html PasswordEditField] ||
An editable text field designed specifically to handle password input.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/RadioButtonField .html RadioButtonField] ||
Field to provide a radio-button control.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/RadioButtonGroup .html RadioButtonGroup] ||
Groups a set of related radio button fields.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/RichTextField .html RichTextField] ||
Read-only field that supports richly formatted text.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/SeparatorField .html SeparatorField] ||
A field which draws a horizontal line across its width.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/SpinBoxField .html SpinBoxField] ||
A user interface component for selecting a single item from a list where the user can spin through the various choices.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/StandardTitleBar .html StandardTitleBar] ||
Provides a standard title bar component with a standard set of optional title bar components and indicators.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/Status .html Status] ||
Simple dialog to show ongoing status.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/TextField .html TextField] ||
A simple editable text field.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/TextSpinBoxField .html TextSpinBoxField] ||
A SpinBoxField that renders text.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/TitleBar .html TitleBar] ||
Provides an abstract TitleBar component.
|-
|[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/TreeField .html TreeField] ||
A simple field to show a tree structure.
|}
----------
 
=== Procedure to add UI Elements to Application ===
 
{| class="wikitable" border="0" cellpadding="6"
! Steps !! Actions
|-
| [[File:12bb.png|left|600px]] || <source lang="java">
/**
* Creates a new HelloWorldScreen object
*/
HelloWorldScreen() {
// Set the displayed title of the screen
setTitle("Eclipse Course");
 
// Add a read only text field (RichTextField) to the screen. The
// RichTextField is focusable by default. Here we provide a style
// parameter to make the field non-focusable.
add(new RichTextField("Welcome to BlackBerry World!",
Field.NON_FOCUSABLE));
}
 
 
</source>
|-
|-
| [[File:13bb.png|left|600px]] || '''[http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/component/Dialog.html The Dialog Class]'''
 
Provides a dialog box with predefined configurations.
 
To get a standard, predefined dialog use
* ''Dialog.alert(java.lang.String)''
** This method creates an alert dialog typically used to notify the user of an event or some important information. The dialog uses a exclamation mark bitmap.
 
* ''Dialog.ask(int)''
** This method creates a standard inquiry dialog. The dialog uses a question mark bitmap.Creates a standard inquiry dialog.
 
* ''Dialog.inform(java.lang.String)''
** Creates a notification dialog with the specified message. This method creates a notification dialog displaying the specified message. The dialog uses the "information" bitmap.
These pop up a predefined dialog and wait for user input. To get a more customized dialog, instantiate this class or extend it.
 
Pressing ESCAPE returns Dialog.CANCEL, but only if it was one of the choices specified in the values array.
 
|-
| [[File:14bb.png|left|600px]] || <source lang="java">
/**
* Displays a dialog box to the user with the text "Goodbye!" when the
* application is closed.
*
* @see net.rim.device.api.ui.Screen#close()
*/
public void close() {
// Display a farewell message before closing the application
Dialog.alert("Goodbye!");
super.close();
}
</source>
 
|-
| [[File:15bb.png|left|600px]] || <source lang="java">
public class HelloBlackBerry extends UiApplication {
public static void main( String[] args ) {
HelloBlackBerry theApp = new HelloBlackBerry();
theApp.enterEventDispatcher();
}
 
/**
* Creates a new HelloBlackBerry object
*/
public HelloBlackBerry() {
// Push a screen onto the UI stack for rendering.
pushScreen( new HelloBlackBerryScreen() );
}
</source>
 
 
|}
 
----------
 
Here is a tutorial for [http://supportforums.blackberry.com/t5/video/gallerypage/video-id/9lZHNsMToFt6sCzMPDlu68CN11DLP7Bg BlackBerry 6 User Interface APIs]

Navigation menu