org.rapla.components.iolayer
Class DefaultIO

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.rapla.components.iolayer.DefaultIO
All Implemented Interfaces:
LogEnabled, IOInterface
Direct Known Subclasses:
WebstartIO

public class DefaultIO
extends AbstractLogEnabled
implements IOInterface


Field Summary
 PrinterJob job
           
static String PRINT_EXPORT_CLASS
           
static String RAPLA_JOB
          Name of all Rapla printjobs (used in dialogs, printerqueue, etc).
 
Fields inherited from interface org.rapla.components.iolayer.IOInterface
INCH_TO_MM, MM_TO_INCH, ROLE
 
Constructor Summary
DefaultIO(Logger logger)
           
 
Method Summary
protected  void callExport(Printable printable, PageFormat format, OutputStream out)
           
 PageFormat defaultPage()
           
 FileContent openFile(Frame frame, String dir, String[] fileExtensions)
           
 boolean print(Printable printable, PageFormat format, boolean askFormat)
          Prints an awt or swing component.
 void saveAsPostscript(Printable printable, PageFormat format, OutputStream out)
           
 String saveAsPostscriptShowDialog(String dir, Printable printable, PageFormat format, boolean askFormat, Component owner)
           
 String saveFile(Frame frame, String dir, String[] fileExtensions, String filename, byte[] content)
           
 void setContents(Transferable transferable, ClipboardOwner owner)
           
 PageFormat showFormatDialog(PageFormat format)
           
 boolean supportsPostscriptExport()
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RAPLA_JOB

public static final String RAPLA_JOB
Name of all Rapla printjobs (used in dialogs, printerqueue, etc).

See Also:
Constant Field Values

PRINT_EXPORT_CLASS

public static final String PRINT_EXPORT_CLASS

job

public PrinterJob job
Constructor Detail

DefaultIO

public DefaultIO(Logger logger)
Method Detail

defaultPage

public PageFormat defaultPage()
                       throws UnsupportedOperationException
Specified by:
defaultPage in interface IOInterface
Throws:
UnsupportedOperationException

showFormatDialog

public PageFormat showFormatDialog(PageFormat format)
                            throws UnsupportedOperationException
Specified by:
showFormatDialog in interface IOInterface
Throws:
UnsupportedOperationException

setContents

public void setContents(Transferable transferable,
                        ClipboardOwner owner)
Specified by:
setContents in interface IOInterface

supportsPostscriptExport

public boolean supportsPostscriptExport()
Specified by:
supportsPostscriptExport in interface IOInterface

callExport

protected void callExport(Printable printable,
                          PageFormat format,
                          OutputStream out)
                   throws UnsupportedOperationException,
                          IOException
Throws:
UnsupportedOperationException
IOException

saveAsPostscriptShowDialog

public String saveAsPostscriptShowDialog(String dir,
                                         Printable printable,
                                         PageFormat format,
                                         boolean askFormat,
                                         Component owner)
                                  throws UnsupportedOperationException,
                                         IOException
Specified by:
saveAsPostscriptShowDialog in interface IOInterface
Throws:
UnsupportedOperationException
IOException

saveAsPostscript

public void saveAsPostscript(Printable printable,
                             PageFormat format,
                             OutputStream out)
                      throws UnsupportedOperationException,
                             IOException
Specified by:
saveAsPostscript in interface IOInterface
Throws:
UnsupportedOperationException
IOException

print

public boolean print(Printable printable,
                     PageFormat format,
                     boolean askFormat)
              throws PrinterException
Prints an awt or swing component.

Specified by:
print in interface IOInterface
Parameters:
askFormat - If true a dialog will show up to allow the user to edit printformat.
Throws:
PrinterException

saveFile

public String saveFile(Frame frame,
                       String dir,
                       String[] fileExtensions,
                       String filename,
                       byte[] content)
                throws IOException
Specified by:
saveFile in interface IOInterface
Throws:
IOException

openFile

public FileContent openFile(Frame frame,
                            String dir,
                            String[] fileExtensions)
                     throws IOException
Specified by:
openFile in interface IOInterface
Throws:
IOException


Copyright © 2000-2006 Rapla Team. All Rights Reseserved.