com.mindfusion.pdf
Class PdfObject

java.lang.Object
  extended by com.mindfusion.pdf.PdfObject
All Implemented Interfaces:
INotify<PdfObject>, IPdfSaver, java.lang.Comparable
Direct Known Subclasses:
PdfCatalog, PdfFont, PdfFontDescription, PdfFunction, PdfGraphicsState, PdfHref, PdfImage, PdfImageHolder, PdfPage, PdfPagesRoot, PdfPath, PdfPattern, PdfShading, PdfText

public class PdfObject
extends java.lang.Object
implements IPdfSaver, INotify<PdfObject>, java.lang.Comparable


Field Summary
protected  float currentRotation
           
protected  java.awt.geom.AffineTransform currentTransform
           
protected  long id
           
protected  long offset
           
protected  PdfPage page
           
protected  PdfObject parent
           
protected  int pdfType
           
protected  long size
           
 
Constructor Summary
PdfObject(int _type, PdfDocument _doc)
           
PdfObject(int _type, PdfPage _page)
           
PdfObject(int _type, PdfPage _page, PdfDocument _doc)
           
 
Method Summary
static int compare(java.lang.Object o1, java.lang.Object o2)
           
 int compareTo(java.lang.Object o)
           
 long getCollectionId()
           
protected  byte[] getContent()
           
 float getCurrentRotation()
           
 java.awt.geom.AffineTransform getCurrentTransform()
           
 PdfDocument getDocument()
          private PdfDocument document = null; public PdfDocument getDocument() { return isRoot() ? document : page.getDocument(); }
 long getId()
           
 java.lang.String getName()
           
 java.lang.String getObjectFooter()
           
 java.lang.String getObjectHeader()
           
 long getOffset()
           
 PdfPage getPage()
           
 PdfObject getParent()
           
 int getPdfType()
           
 long getSize()
           
 boolean isParentless()
           
 boolean isRoot()
           
 void OnAdded(int index)
           
 void OnChanged(int index, PdfObject oldValue, PdfObject newValue)
           
 void registerObject(PdfObject po)
           
 void Save(PdfWriter writer)
           
 void setCollectionId(long collectionIdVal)
           
 void setParent(PdfObject parentVal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected PdfObject parent

offset

protected long offset

size

protected long size

id

protected long id

pdfType

protected int pdfType

page

protected PdfPage page

currentRotation

protected float currentRotation

currentTransform

protected java.awt.geom.AffineTransform currentTransform
Constructor Detail

PdfObject

public PdfObject(int _type,
                 PdfPage _page,
                 PdfDocument _doc)
          throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

PdfObject

public PdfObject(int _type,
                 PdfDocument _doc)
          throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

PdfObject

public PdfObject(int _type,
                 PdfPage _page)
          throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

OnAdded

public void OnAdded(int index)
Specified by:
OnAdded in interface INotify<PdfObject>

OnChanged

public void OnChanged(int index,
                      PdfObject oldValue,
                      PdfObject newValue)
Specified by:
OnChanged in interface INotify<PdfObject>

getParent

public PdfObject getParent()

setParent

public void setParent(PdfObject parentVal)

getObjectHeader

public java.lang.String getObjectHeader()

getObjectFooter

public java.lang.String getObjectFooter()

getCollectionId

public long getCollectionId()

setCollectionId

public void setCollectionId(long collectionIdVal)

getOffset

public long getOffset()

getSize

public long getSize()

getDocument

public PdfDocument getDocument()
private PdfDocument document = null; public PdfDocument getDocument() { return isRoot() ? document : page.getDocument(); }


registerObject

public void registerObject(PdfObject po)

getContent

protected byte[] getContent()
                     throws java.io.IOException
Throws:
java.io.IOException

Save

public void Save(PdfWriter writer)
          throws java.io.IOException
Specified by:
Save in interface IPdfSaver
Throws:
java.io.IOException

getName

public java.lang.String getName()
Returns:
Pdf Object name as per format specification: OBJ%'0'3d Format specifications described at: @see http://java.sun.com/javase/6/docs/api/java/util/Formatter.html#syntax

getId

public long getId()
Returns:
Pdf Object Id

getPdfType

public int getPdfType()

compareTo

public int compareTo(java.lang.Object o)
              throws java.lang.IllegalArgumentException
Specified by:
compareTo in interface java.lang.Comparable
Throws:
java.lang.IllegalArgumentException

compare

public static int compare(java.lang.Object o1,
                          java.lang.Object o2)
                   throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getPage

public PdfPage getPage()

getCurrentRotation

public float getCurrentRotation()

getCurrentTransform

public java.awt.geom.AffineTransform getCurrentTransform()

isRoot

public boolean isRoot()

isParentless

public boolean isParentless()