Time for action – using Images in JFace
The TimeZoneLabelProvider
can return an SWT Image
. Although they can be loaded dynamically as in the previous chapter, JFace provides a number of resource registries that can be used to manage a set of resources for the application. Standard registries include the ImageRegistry
, FontRegistry
, and ColorRegistry
classes. The purpose of a resource registry is to maintain a list of Resource
instances and ensure that they are correctly disposed when they are no longer needed.
JFace has a set of these global registries; but there are specific ones, for example, those used by the IDE to maintain folder and file type icons. These use resource descriptors as a lightweight handle for the resource, and a means to acquire ...
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.