fop 0.90alpha1

org.apache.fop.pdf
Class PDFResources

java.lang.Object
  extended byorg.apache.fop.pdf.PDFObject
      extended byorg.apache.fop.pdf.PDFResources

public class PDFResources
extends PDFObject

class representing a /Resources object. /Resources object contain a list of references to the fonts for the document


Field Summary
protected  java.util.Map fonts
          /Font objects keyed by their internal name
protected  java.util.Set gstates
          Set of ExtGStates
protected  java.util.Set patterns
          Set of patterns
protected  java.util.Set shadings
          Set of shadings
protected  java.util.Set xObjects
          Set of XObjects
 
Fields inherited from class org.apache.fop.pdf.PDFObject
DATE_FORMAT, log
 
Constructor Summary
PDFResources(int objnum)
          create a /Resources object.
 
Method Summary
 void addFont(PDFFont font)
          add font object to resources list.
 void addFonts(PDFDocument doc, FontInfo fontInfo)
          Add the fonts in the font info to this PDF document's Font Resources.
 void addGState(PDFGState gs)
          Add a PDFGState to the resources.
 void addPattern(PDFPattern thePattern)
          Add the pattern to the resources.
 void addShading(PDFShading theShading)
          Add a Shading to the resources.
 void addXObject(PDFXObject xObject)
          Add an XObject to the resources.
 java.lang.String toPDFString()
          represent the object in PDF This adds the references to all the objects in the current resource context.
 
Methods inherited from class org.apache.fop.pdf.PDFObject
encode, encodeString, encodeText, formatDateTime, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, hasObjectNumber, output, referencePDF, setDocument, setObjectNumber, toPDF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fonts

protected java.util.Map fonts
/Font objects keyed by their internal name


xObjects

protected java.util.Set xObjects
Set of XObjects


patterns

protected java.util.Set patterns
Set of patterns


shadings

protected java.util.Set shadings
Set of shadings


gstates

protected java.util.Set gstates
Set of ExtGStates

Constructor Detail

PDFResources

public PDFResources(int objnum)
create a /Resources object.

Parameters:
objnum - the object's number
Method Detail

addFont

public void addFont(PDFFont font)
add font object to resources list.

Parameters:
font - the PDFFont to add

addFonts

public void addFonts(PDFDocument doc,
                     FontInfo fontInfo)
Add the fonts in the font info to this PDF document's Font Resources.

Parameters:
doc - PDF document to add fonts to
fontInfo - font info object to get font information from

addGState

public void addGState(PDFGState gs)
Add a PDFGState to the resources.

Parameters:
gs - the PDFGState to add

addShading

public void addShading(PDFShading theShading)
Add a Shading to the resources.

Parameters:
theShading - the shading to add

addPattern

public void addPattern(PDFPattern thePattern)
Add the pattern to the resources.

Parameters:
thePattern - the pattern to add

addXObject

public void addXObject(PDFXObject xObject)
Add an XObject to the resources.

Parameters:
xObject - the XObject to add

toPDFString

public java.lang.String toPDFString()
represent the object in PDF This adds the references to all the objects in the current resource context.

Overrides:
toPDFString in class PDFObject
Returns:
the PDF
See Also:
PDFObject.toPDFString()

fop 0.90alpha1

Copyright 1999-2005 The Apache Software Foundation. All Rights Reserved.