org.odftoolkit.odfdom.doc
Class OdfGraphicsDocument

java.lang.Object
  extended by org.odftoolkit.odfdom.doc.OdfDocument
      extended by org.odftoolkit.odfdom.doc.OdfGraphicsDocument

public class OdfGraphicsDocument
extends OdfDocument

This class represents an empty ODF graphics document.


Nested Class Summary
static class OdfGraphicsDocument.OdfMediaType
          This enum contains all possible media types of OdfGraphicsDocument documents.
 
Nested classes/interfaces inherited from class org.odftoolkit.odfdom.doc.OdfDocument
OdfDocument.OdfXMLFile, OdfDocument.Resource
 
Constructor Summary
protected OdfGraphicsDocument()
           
 
Method Summary
 void changeMode(OdfGraphicsDocument.OdfMediaType type)
          Switches this instance to the given type.
 OdfOfficeDrawing getContentRoot()
          Get the content root of a graphics document.
static OdfGraphicsDocument newGraphicsDocument()
          Creates an empty graphics document.
static OdfGraphicsDocument newGraphicsTemplateDocument()
          Creates an empty graphics template.
 
Methods inherited from class org.odftoolkit.odfdom.doc.OdfDocument
close, embedDocument, getBaseURI, getContentDom, getContentStream, getDocumentPackagePath, getDocumentStyles, getEmbeddedDocument, getEmbeddedDocuments, getEmbeddedDocuments, getMediaType, getMetaDom, getMetaStream, getOfficeBody, getOfficeMasterStyles, getOfficeMetadata, getOrCreateDocumentStyles, getPackage, getRootDocument, getSettingsStream, getStylesDom, getStylesStream, getTableByName, getTableList, getXMLFilePath, getXPath, loadDocument, loadDocument, loadDocument, loadDocument, loadTemplate, newImage, RemoveEmbedDocument, save, save, save, setMediaType, setPackage, setRootDocument, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OdfGraphicsDocument

protected OdfGraphicsDocument()
Method Detail

newGraphicsDocument

public static OdfGraphicsDocument newGraphicsDocument()
                                               throws java.lang.Exception
Creates an empty graphics document.

Returns:
ODF graphics document based on a default template
Throws:
java.lang.Exception - - if the document could not be created

newGraphicsTemplateDocument

public static OdfGraphicsDocument newGraphicsTemplateDocument()
                                                       throws java.lang.Exception
Creates an empty graphics template.

Returns:
ODF graphics template based on a default
Throws:
java.lang.Exception - - if the template could not be created

getContentRoot

public OdfOfficeDrawing getContentRoot()
                                throws java.lang.Exception
Get the content root of a graphics document.

Returns:
content root, representing the office:drawing tag
Throws:
java.lang.Exception - if the file DOM could not be created.

changeMode

public void changeMode(OdfGraphicsDocument.OdfMediaType type)
Switches this instance to the given type. This method can be used to e.g. convert a document instance to a template and vice versa.

Parameters:
type -


Copyright © 2008-2010 ODF Toolkit Project. All Rights Reserved.