|
ServiceTypeA user interface may use code like that in the previous section directly to include images. The service may also supply useful images and other human-oriented information in a ServiceType entry object. The ServiceType class is defined as follows : package net.jini.lookup.entry; public class ServiceType { public String getDisplayName(); // Return the localized display // name of this service. public Image getIcon(int iconKind) // Get an icon for this service. public String getShortDescription() // Return a localized short // description of this service. } The class is supplied with empty implementations , returning null for each method. A service will need to supply a subclass with useful implementations of the methods . This is a useful class that could be used to supply images and information that may be common to a number of different user interfaces for a service, such as a minimized image. |