jimm.datavision.layout.pdf
Class PDFLE

java.lang.Object
  extended by jimm.datavision.layout.LayoutEngine
      extended by jimm.datavision.layout.pdf.PDFLE
All Implemented Interfaces:
LineDrawer

public class PDFLE
extends LayoutEngine
implements LineDrawer

A PDF layout engine.

Author:
Jim Menard, jimm@io.com

Field Summary
protected  java.util.HashMap baseFonts
           
protected static java.util.HashMap cjkFontEncodingMap
           
protected  com.lowagie.text.pdf.PdfContentByte content
           
protected  com.lowagie.text.Document doc
           
protected  java.io.OutputStream outStream
           
protected  double prevThickness
           
 
Fields inherited from class jimm.datavision.layout.LayoutEngine
currentSection, newPage, out, pageHeight, pageHeightUsed, pageNumber, pageWidth, POINTS_PER_INCH, previousSectionArea, report, SECT_DETAIL, SECT_GROUP_FOOTER, SECT_GROUP_HEADER, SECT_PAGE_FOOTER, SECT_PAGE_HEADER, SECT_REPORT_FOOTER, SECT_REPORT_HEADER, wantsMoreData
 
Constructor Summary
PDFLE(java.io.OutputStream out)
           
 
Method Summary
protected  java.lang.String baseFontName(java.awt.Font font)
           
protected  Point bottomLeftOfField(Field f, double size, com.lowagie.text.pdf.BaseFont baseFont)
           
protected  void doEnd()
          Called by end as a chance to insert behavior when the report ends.
protected  void doOutputField(Field field)
          Outputs a field.
protected  void doOutputImage(ImageField field)
          Ignores image output
protected  void doOutputLine(Line line)
          Outputs a line.
protected  void doStart()
          Outputs the beginning of the document.
protected  void doStartPage()
          Called by startPage as a chance to insert behavior when a new page starts.
 void drawLine(Line line, java.lang.Object arg)
          Draw a single line.
protected  java.lang.String fontAttributes(java.awt.Font font, java.lang.String bold, java.lang.String italic)
           
protected  com.lowagie.text.pdf.BaseFont getFontForFormat(Format f)
           
protected  void makeBorders(Field field)
          Outputs borders.
protected  void translateToPDFCoords(Point p)
           
 
Methods inherited from class jimm.datavision.layout.LayoutEngine
calcDetailHeight, calcPageFooterHeight, calcReportFooterHeight, calcSectionHeights, cancel, checkRemainingPageLength, closeOutput, currentSectionTypeAsString, detail, doEndPage, doOutputSection, end, endPage, groupFooters, groupHeaders, outputField, outputImage, outputLine, outputSection, pageHeight, pageNumber, pageWidth, setReport, start, startPage, wantsMoreData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outStream

protected java.io.OutputStream outStream

doc

protected com.lowagie.text.Document doc

content

protected com.lowagie.text.pdf.PdfContentByte content

baseFonts

protected java.util.HashMap baseFonts

prevThickness

protected double prevThickness

cjkFontEncodingMap

protected static java.util.HashMap cjkFontEncodingMap
Constructor Detail

PDFLE

public PDFLE(java.io.OutputStream out)
Method Detail

doStart

protected void doStart()
Outputs the beginning of the document.

Overrides:
doStart in class LayoutEngine

doEnd

protected void doEnd()
Description copied from class: LayoutEngine
Called by end as a chance to insert behavior when the report ends.

Overrides:
doEnd in class LayoutEngine

doStartPage

protected void doStartPage()
Description copied from class: LayoutEngine
Called by startPage as a chance to insert behavior when a new page starts.

Overrides:
doStartPage in class LayoutEngine

doOutputField

protected void doOutputField(Field field)
Outputs a field.

Specified by:
doOutputField in class LayoutEngine
Parameters:
field - the field to output

bottomLeftOfField

protected Point bottomLeftOfField(Field f,
                                  double size,
                                  com.lowagie.text.pdf.BaseFont baseFont)

translateToPDFCoords

protected void translateToPDFCoords(Point p)

getFontForFormat

protected com.lowagie.text.pdf.BaseFont getFontForFormat(Format f)

baseFontName

protected java.lang.String baseFontName(java.awt.Font font)

fontAttributes

protected java.lang.String fontAttributes(java.awt.Font font,
                                          java.lang.String bold,
                                          java.lang.String italic)

doOutputImage

protected void doOutputImage(ImageField field)
Ignores image output

Specified by:
doOutputImage in class LayoutEngine
Parameters:
field - an image field

doOutputLine

protected void doOutputLine(Line line)
Outputs a line. Calls drawLine(jimm.datavision.Line, java.lang.Object).

Specified by:
doOutputLine in class LayoutEngine
Parameters:
line - a line

makeBorders

protected void makeBorders(Field field)
Outputs borders.


drawLine

public void drawLine(Line line,
                     java.lang.Object arg)
Draw a single line.

Specified by:
drawLine in interface LineDrawer
Parameters:
line - a line
arg - whatever you want it to be