Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Introduction to User Interface managers

by BlackBerry Development Advisor ‎02-12-2010 03:12 PM - edited ‎09-17-2010 04:28 PM (3,785 Views)

Exercise

 

Create an application that uses a custom User Interface (UI) manager. This manager lays out its fields on a diagonal and manipulates the natural focus order.

 

Objectives

  • Discover how to create a custom UI component.
  • Discover how UI managers control field layout and handle focus events.

Setup

  1. Open custom_manager_incomplete.zip
  2. In the IDE, open the custom_manager.jdw workspace
  3. Open the DiagonalApp.java source file.
  4. Open the DiagonalManager.java source file.

Tasks

  1. Implement DiagonalManager's getPreferredWidth and getPreferredHeight methods so that they define the size of the manager.
  2. Fill in the loop of DiagonalManager's sublayout method so that each controlled field gets layed out and arranged.
  3. Complete DiagonalManager's nextFocus method so that focus does not leave the manager.

Check Your Work

 

By viewing custom_manager_complete.zip

 

Review

 

In this exercise, you discovered the following things:

  • how to create a custom UI component.
  • how UI managers control field layout and handle focus events.
Contributors
Users Online
Currently online: 30 members 1,321 guests
Please welcome our newest community members: