previous chapter table of contents next chapter


A 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.


A Programmer[ap]s Guide to Jini Technology
A Programmer[ap]s Guide to Jini Technology
ISBN: 1893115801
Year: 2000
Pages: 189

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net