org.freehep.application.services.app
Class AppServiceManager

java.lang.Object
  extended by org.freehep.application.services.app.AppServiceManager
All Implemented Interfaces:
ServiceManager

public class AppServiceManager
extends Object
implements ServiceManager

A basic implementation of ServiceManager, for use in applications.

Version:
$Id: AppServiceManager.java 8584 2006-08-10 23:06:37Z duns $
Author:
tonyj

Field Summary
protected  Application app
           
 
Constructor Summary
AppServiceManager()
           
 
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

app

protected Application app
Constructor Detail

AppServiceManager

public AppServiceManager()
Method Detail

getDefaultPage

public PageFormat getDefaultPage()
Description copied from interface: ServiceManager
Creates a new PageFormat instance and sets it to the default size and orientation.

Specified by:
getDefaultPage in interface ServiceManager

showPageFormatDialog

public PageFormat showPageFormatDialog(PageFormat page)
Description copied from interface: ServiceManager
Displays a dialog that allows modification of a PageFormat instance.

Specified by:
showPageFormatDialog in interface ServiceManager

print

public boolean print(Printable painter)
Description copied from interface: ServiceManager
Prints a document using the given Printable object.

Specified by:
print in interface ServiceManager

print

public boolean print(Pageable document)
Description copied from interface: ServiceManager
Prints a document using the given Pageable object

Specified by:
print in interface ServiceManager

loadUserPreferences

public void loadUserPreferences(Properties props)
Specified by:
loadUserPreferences in interface ServiceManager

storeUserPreferences

public void storeUserPreferences(Properties props)
Specified by:
storeUserPreferences in interface ServiceManager

openFileDialog

public FileAccess openFileDialog(FileFilter[] filters,
                                 FileFilter defaultFilter,
                                 String key)
Specified by:
openFileDialog in interface ServiceManager

saveFileAsDialog

public FileAccess saveFileAsDialog(FileFilter[] filters,
                                   FileFilter defaultFilter,
                                   String key,
                                   InputStream in)
Specified by:
saveFileAsDialog in interface ServiceManager

isAvailable

public boolean isAvailable(String part)
Specified by:
isAvailable in interface ServiceManager

makeAvailable

public boolean makeAvailable(String part)
Specified by:
makeAvailable in interface ServiceManager

getClipboardContents

public Transferable getClipboardContents()
Specified by:
getClipboardContents in interface ServiceManager

setClipboardContents

public void setClipboardContents(Transferable contents)
Specified by:
setClipboardContents in interface ServiceManager


Copyright © 2000-2006 FreeHEP. All Rights Reserved.