Holger's
Java API

com.antelmann.ooffice
Interface OfficeDocument

All Superinterfaces:
Closeable, QueryMechanism
All Known Implementing Classes:
AbstractOfficeDocument, OOCalc, OODraw, OOWriter

public interface OfficeDocument
extends Closeable, QueryMechanism


Method Summary
 void addCloseListener(Runnable task)
          allows to easily register a task that is to be executed when this frame is disposed
 Object dispatchCommand(String command, String targetFrame, Map<?,?> props)
          allows to dispatch a UNO command on the document
 void dispose()
          disposes the document (cutting the connection to it rather than closing the window)
 File exportToPDF(File file)
           
 OODocType getDocumentType()
           
 File getFile()
          if this frame is associated with a store location, this method returns it as a file or null if no location is present (e.g. if the document has not been saved yet)
 com.sun.star.lang.XComponent getXComponent()
           
 void print(Map<?,?> printerProperties, Map<?,?> jobProperties)
           
 void print(String printerName)
           
 void print(String printerName, int count)
           
 void storeTo(OutputStream out, Map<?,?> map)
           
 void storeTo(URL url, String filterName, boolean representNewLocation)
           
 
Methods inherited from interface java.io.Closeable
close
 
Methods inherited from interface com.antelmann.util.QueryMechanism
query
 

Method Detail

getFile

File getFile()
if this frame is associated with a store location, this method returns it as a file or null if no location is present (e.g. if the document has not been saved yet)


dispatchCommand

Object dispatchCommand(String command,
                       String targetFrame,
                       Map<?,?> props)
                       throws OfficeException
allows to dispatch a UNO command on the document

Parameters:
command - the command to be dispatched
targetFrame - the frame to which the command is to be applied
props - allows to specify additional properties to the command
Returns:
the object returned by the office helper which actually dispatches the command
Throws:
OfficeException

dispose

void dispose()
disposes the document (cutting the connection to it rather than closing the window)


storeTo

void storeTo(URL url,
             String filterName,
             boolean representNewLocation)
             throws IOException,
                    OfficeException
Throws:
IOException
OfficeException

storeTo

void storeTo(OutputStream out,
             Map<?,?> map)
             throws IOException,
                    OfficeException
Throws:
IOException
OfficeException

print

void print(String printerName)

print

void print(String printerName,
           int count)
           throws OfficeException
Throws:
OfficeException

print

void print(Map<?,?> printerProperties,
           Map<?,?> jobProperties)
           throws IllegalArgumentException
Throws:
IllegalArgumentException

getXComponent

com.sun.star.lang.XComponent getXComponent()

getDocumentType

OODocType getDocumentType()

exportToPDF

File exportToPDF(File file)
                 throws IOException,
                        OfficeException
Throws:
IOException
OfficeException

addCloseListener

void addCloseListener(Runnable task)
allows to easily register a task that is to be executed when this frame is disposed



(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads