Tree views

Use a tree view to display objects, such as folders, in a hierarchical manner.

Objects in the tree view are nodes. The highest node is the root node. A node in the tree can have child nodes under it. A node that has a child is a parent node.

Users can perform the following action in a tree view:


BlackBerry devices with a trackpad only

BlackBerry devices with a touch screen and a trackpad

Expand or collapse an object with a plus sign (+) or minus sign (-) in a hierarchy.

Press the Space key or click the trackpad.

  • Tap the object.
  • Press the Space key.
  • Click the trackpad.
This screen shows an example of a tree view.

Best practice: Implementing tree views

  • Use the TreeField class to create tree views. For more information about creating tree views, see the API reference for the BlackBerry® Java® SDK and the BlackBerry Java Application UI Quick Reference Guide.
  • Provide a pop-up menu if users can perform multiple actions when they click a parent node.
  • Include a root node only if users need the ability to perform actions on the entire tree. Otherwise, exclude the root node.
Next topic: Buttons

Was this information helpful? Send us your comments.