|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.ooffice.AbstractOfficeDocument
@ThirdParty(value="uses OpenOffice.org libraries") public abstract class AbstractOfficeDocument
the base class for all OpenOffice document frames
| Constructor Summary | |
|---|---|
AbstractOfficeDocument()
|
|
| Method Summary | ||
|---|---|---|
void |
addCloseListener(Runnable task)
allows to easily register a task that is to be executed when this frame is disposed |
|
void |
close()
closes and disposes the document |
|
Object |
dispatchCommand(String command)
|
|
Object |
dispatchCommand(String command,
Map<?,?> props)
|
|
Object |
dispatchCommand(String command,
OfficeUtils.TargetFrame targetFrame,
Map<?,?> props)
|
|
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) |
|
String |
exportAsHTMLString()
|
|
String |
exportAsString()
|
|
byte[] |
exportFormat(String format)
|
|
byte[] |
exportHTML()
|
|
byte[] |
exportPDF()
|
|
void |
exportToHTML(File file)
deletes the target file (the name extension will be pdf) if it exists |
|
File |
exportToPDF(File file)
deletes the target file (the name extension will be pdf) if it exists |
|
void |
formatText(Object obj,
Color color)
|
|
void |
formatText(Object obj,
float size)
|
|
void |
formatText(Object obj,
Font font)
|
|
void |
formatText(Object obj,
Underline ul)
|
|
com.sun.star.frame.XController |
getController()
|
|
Properties |
getDocumentProperties()
|
|
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) |
|
Font |
getFont(Object obj)
|
|
protected String |
getHtmlFormat()
|
|
String |
getPdfFormat()
|
|
com.sun.star.frame.XFrame |
getXFrame()
|
|
void |
print()
|
|
void |
print(Map<?,?> printerProperties,
Map<?,?> jobProperties)
|
|
void |
print(String printerName)
|
|
void |
print(String printerName,
int count)
|
|
void |
print(String printerName,
String trayName,
int count)
|
|
|
query(Class<T> requiredReturnType,
Object context)
delegates to OfficeUtils.query(Class, Object) |
|
void |
save()
|
|
void |
setComponentVisible(boolean flag)
sets the component within the frame visible/invisible |
|
void |
setEnableComponent(boolean flag)
enables/disables the component (the top frame remains untouched) |
|
void |
setEnableFrame(boolean flag)
enables/disables the frame |
|
void |
setFrameVisible(boolean flag)
sets the entire window visible/invisible |
|
void |
setPageOrientation(PageOrientation po)
|
|
static void |
setPropertyValue(Object obj,
String key,
Object value)
|
|
File |
storeTo(File file,
boolean representNewLocation)
saves the embedded document to the given file - using the default extension, if not already given (and overwriting the file, if it exists) |
|
void |
storeTo(File file,
String filterName,
boolean representNewLocation)
saves the given document to the given file (overwriting it, if it exists) in the given format |
|
void |
storeTo(OutputStream out,
Map<?,?> props)
|
|
void |
storeTo(URL url,
boolean representNewLocation)
saves the given document to the given url (overwriting the url if it exists) |
|
void |
storeTo(URL url,
String filterName,
boolean representNewLocation)
allows to specify a filterName that defines the output format (null is allowed). |
|
void |
undo()
|
|
void |
updateAll()
updates all embedded objects within the document |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.antelmann.ooffice.OfficeDocument |
|---|
getDocumentType, getXComponent |
| Constructor Detail |
|---|
public AbstractOfficeDocument()
| Method Detail |
|---|
public void close()
throws IOException
close in interface CloseableIOException
public <T> T query(Class<T> requiredReturnType,
Object context)
OfficeUtils.query(Class, Object)
query in interface QueryMechanismT - the required return typerequiredReturnType - specifies the return type that is needed for this operation;
if Object.class is given, any returned object is admissiblecontext - provides a context parameter for which the desired instance is to be returned.
Often (if no other meaningful context is required or applicable), it makes sense to pass a reference
to the calling object source; null may also be allowed
public void addCloseListener(Runnable task)
OfficeDocument
addCloseListener in interface OfficeDocumentpublic void setComponentVisible(boolean flag)
public void setFrameVisible(boolean flag)
public void setEnableComponent(boolean flag)
public void setEnableFrame(boolean flag)
public File storeTo(File file,
boolean representNewLocation)
throws IOException,
OfficeException
IOException
OfficeException
public void storeTo(OutputStream out,
Map<?,?> props)
throws IOException,
OfficeException
storeTo in interface OfficeDocumentIOException
OfficeException
public void storeTo(File file,
String filterName,
boolean representNewLocation)
throws IOException,
OfficeException
IOException
OfficeException
public void storeTo(URL url,
boolean representNewLocation)
throws IOException,
OfficeException
IOException
OfficeExceptionpublic File getFile()
getFile in interface OfficeDocument
public void print()
throws OfficeException
OfficeException
public void print(String printerName)
throws IllegalArgumentException
print in interface OfficeDocumentIllegalArgumentException
public void print(String printerName,
int count)
throws IllegalArgumentException
print in interface OfficeDocumentIllegalArgumentException
public void print(String printerName,
String trayName,
int count)
throws IllegalArgumentException
IllegalArgumentException
public void print(Map<?,?> printerProperties,
Map<?,?> jobProperties)
throws IllegalArgumentException
print in interface OfficeDocumentIllegalArgumentException
public Properties getDocumentProperties()
throws OfficeException
OfficeExceptionpublic void dispose()
OfficeDocument
dispose in interface OfficeDocument
public File exportToPDF(File file)
throws OfficeException,
IOException
exportToPDF in interface OfficeDocumentOfficeException
IOExceptionpublic String getPdfFormat()
public byte[] exportPDF()
throws OfficeException,
IOException
OfficeException
IOException
public byte[] exportFormat(String format)
throws OfficeException,
IOException
OfficeException
IOExceptionprotected String getHtmlFormat()
public byte[] exportHTML()
throws OfficeException,
IOException
OfficeException
IOException
public void exportToHTML(File file)
throws OfficeException,
IOException
OfficeException
IOException
public String exportAsHTMLString()
throws IOException,
OfficeException
IOException
OfficeException
public String exportAsString()
throws IOException,
OfficeException
IOException
OfficeException
public void storeTo(URL url,
String filterName,
boolean representNewLocation)
throws IOException,
OfficeException
representNewLocation = true.
storeTo in interface OfficeDocumentIOException
OfficeExceptionpublic void setPageOrientation(PageOrientation po)
public Object dispatchCommand(String command)
throws OfficeException
OfficeException
public Object dispatchCommand(String command,
Map<?,?> props)
throws OfficeException
OfficeException
public Object dispatchCommand(String command,
OfficeUtils.TargetFrame targetFrame,
Map<?,?> props)
throws OfficeException
OfficeException
public Font getFont(Object obj)
throws OfficeException
OfficeException
public void formatText(Object obj,
Color color)
throws OfficeException
OfficeException
public void formatText(Object obj,
Underline ul)
throws OfficeException
OfficeException
public void formatText(Object obj,
Font font)
throws OfficeException
OfficeException
public void formatText(Object obj,
float size)
throws OfficeException
OfficeException
public static void setPropertyValue(Object obj,
String key,
Object value)
throws IllegalArgumentException,
OfficeException
IllegalArgumentException
OfficeExceptionpublic com.sun.star.frame.XController getController()
public com.sun.star.frame.XFrame getXFrame()
public Object dispatchCommand(String command,
String targetFrame,
Map<?,?> props)
throws OfficeException
dispatchCommand in interface OfficeDocumentcommand - the command to be dispatchedtargetFrame - the frame to which the command is to be appliedprops - allows to specify additional properties to the command
OfficeException
public void updateAll()
throws OfficeException
OfficeException
public void undo()
throws OfficeException
OfficeException
public void save()
throws OfficeException
OfficeException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||