Chapter 8. Working with trees and lists
This chapter covers
In this chapter and the next, we’ll explore some of the most useful widgets provided by JFace. However, the framework that goes along with those widgets is also one of the most complicated that we’ll cover in this book, so pay attention.
Certain widgets’ main purpose is to display sets of data. Although the data can be anything from rows in a database to a list of your most frequently played mp3s, certain common ways of structuring that data for display occur frequently. Even when the final display is very different, many common tasks must be done to make sure the data is ready to be shown to the user. The data must be obtained from a source; it’s often sorted into a certain order or has elements filtered out; and you need a way to associate a text string or image with each domain object. JFace provides the Viewer framework to deal with these common issues; we’ll need to discuss the common elements of that framework before we get into the details of particular widgets.
After we provide a foundation for understanding viewers and their related classes, this chapter will show you how to display data in a list or tree. We’ll follow that up with a discussion of tables in chapter 9.