FreeHEP API
Version current

org.freehep.application.services
Interface ServiceManager

All Known Implementing Classes:
AppServiceManager, JNLPServiceManager

public interface ServiceManager

This interface is implemented by all ServiceManagers. By using this interface instead of directly using JFileChooser, Printer etc, applications can make themselves JavaWebStart compatible, but still run as normal applications without needing the Java Web Start classes. By using a custom ServiceManager it is possible to provide a customized filechooser (for example) without making changes at many places within your program.

Version:
$Id: ServiceManager.java,v 1.10 2002/08/02 00:46:16 tonyj Exp $
Author:
tonyj
Source Code:
ServiceManager.java

Method Summary
 Transferable getClipboardContents()
           
 PageFormat getDefaultPage()
          Creates a new PageFormat instance and sets it to the default size and orientation.
 boolean isAvailable(String part)
           
 void loadUserPreferences(Properties props)
           
 boolean makeAvailable(String part)
           
 FileAccess openFileDialog(FileFilter[] filters, FileFilter defaultFilter, String key)
           
 boolean print(Pageable document)
          Prints a document using the given Pageable object
 boolean print(Printable painter)
          Prints a document using the given Printable object.
 FileAccess saveFileAsDialog(FileFilter[] filters, FileFilter defaultFilter, String key, InputStream in)
           
 void setClipboardContents(Transferable contents)
           
 PageFormat showPageFormatDialog(PageFormat page)
          Displays a dialog that allows modification of a PageFormat instance.
 void storeUserPreferences(Properties props)
           
 

Method Detail

getDefaultPage

public PageFormat getDefaultPage()
Creates a new PageFormat instance and sets it to the default size and orientation.


print

public boolean print(Pageable document)
Prints a document using the given Pageable object


print

public boolean print(Printable painter)
Prints a document using the given Printable object.


showPageFormatDialog

public PageFormat showPageFormatDialog(PageFormat page)
Displays a dialog that allows modification of a PageFormat instance.


loadUserPreferences

public void loadUserPreferences(Properties props)

storeUserPreferences

public void storeUserPreferences(Properties props)

openFileDialog

public FileAccess openFileDialog(FileFilter[] filters,
                                 FileFilter defaultFilter,
                                 String key)

saveFileAsDialog

public FileAccess saveFileAsDialog(FileFilter[] filters,
                                   FileFilter defaultFilter,
                                   String key,
                                   InputStream in)

isAvailable

public boolean isAvailable(String part)

makeAvailable

public boolean makeAvailable(String part)

getClipboardContents

public Transferable getClipboardContents()

setClipboardContents

public void setClipboardContents(Transferable contents)

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.