Chapter 3. Creating JFace Viewers

JFace – the Eclipse model/view/controller architecture

In the last chapter, we looked at the basic building blocks of SWT, which provide a glue layer between the native operating system's widgets and Java. We will now look at JFace, which builds upon SWT to provide an MVC architecture as well as many of the common widgets used by Eclipse.

In this chapter, we shall:

  • Create a view for showing hierarchical data
  • Use image, font, and color resources
  • Generate styled text
  • Sort and filter entries in viewers
  • Add double-click actions
  • Create a view for showing tabular data
  • Synchronize selections between views

Why JFace?

While SWT provides generic implementations for basic widgets (such as trees, buttons, labels, and so on), these ...

Get Eclipse Plug-in Development Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.