Services may optionally provide UIs which allow different styles
of interaction in different roles.
One role may be end-user browsing and setting of print options.
Another role may be administering the print service.
Although the Print Service API does not presently provide standardised
support for administering a print service, monitoring of the print
service is possible and a UI may provide for private update mechanisms.
The basic design intent is to allow applications to lazily locate and
initialize services only when needed without any API dependencies
except in an environment in which they are used.
Swing UIs are preferred as they provide a more consistent L&F and
can support accessibility APIs.
Example usage:
ServiceUIFactory factory = printService.getServiceUIFactory();
if (factory != null) {
JComponent swingui = (JComponent)factory.getUI(
ServiceUIFactory.MAIN_UIROLE,
ServiceUIFactory.JCOMPONENT_UI);
if (swingui != null) {
tabbedpane.add("Custom UI", swingui);
}
}
|