The BlackBerry JDE has a custom user interface (UI) application programming interface (API) built on a hierarchical structure similar to Java Swing. The most basic component of a UI is the field. Anything that can be output to the screen must be of type Field. The two other major components of a UI are the layout manager and the screen, which inherit from Field and Manager respectively.
A screen is the bottom layer of a UI. Every screen must have a manager associated with it. The job of the manager is to manage the layout and space requirements of each child field that it contains. For example, a VerticalFieldManager lays out its children vertically and a HorizontalFieldManager lays out its children horizontally. Any object of type Field can be added to a manager, including other managers and screens. If a manager or a screen is added to the current manager of a screen, they become child objects and behave as any other field.
Each child field of a manager is stored using an index starting at 0, and each child can be accessed directly from the manager using its index.
Any child field can have the focus at any time. A field has the focus if it is the active field, or if it contains a field that has the focus. In the screen shot example, the BitmapField containing the letter A has the focus. HorizontalFieldManager.getFieldWithFocus() will return the BitmapField containing the letter A. However, because the HorizontalFieldManager is a child field of the screen, Screen.getFieldWithFocus() will return the HorizonalFieldManager. By default, if a manager cannot have the focus, none of its child fields are able to accept the focus.