Platypus

org.pz.platypus.plugin.html
Class HtmlOutfile

java.lang.Object
  extended by org.pz.platypus.plugin.html.HtmlOutfile

public class HtmlOutfile
extends java.lang.Object

Manage output to the PDF file


Field Summary
(package private)  org.apache.ecs.wml.Head head
           
(package private)  org.apache.ecs.html.Html html
           
(package private)  org.apache.ecs.html.Body htmlBody
           
(package private)  HtmlData htmlData
          the HTML data structure
private  java.io.PrintStream htmlFile
           
private  java.lang.String htmlFileName
           
private  boolean inFont
           
private  boolean inParagraph
           
private  boolean openStatus
           
private  int styleNum
           
private  java.lang.String styleStem
           
private  int tab
           
 
Constructor Summary
HtmlOutfile()
           
 
Method Summary
private  boolean alreadyProcessingFont()
           
 void close()
          Outputs any material that has not yet been output.
private  void closeStyleTag()
           
 void emitFontSizeTag()
           
 void emitText(java.lang.String s)
          Writes text to the HTML file.
 void endCurrentParagraphIfAny()
           
private  void endFontTagIfAny()
           
private  java.lang.String generateNewStyleName()
           
 void generateStyleClassDefinition()
           
private  java.lang.String getCurrentTabbedOutSpaces()
           
 boolean getInParagraph()
           
private  java.lang.String getLatestStyleName()
           
 void handleEof()
           
 void handleNewFontFace()
           
 boolean isOpen()
           
 void open(GDD gdd, java.lang.String filename, HtmlData pdfData)
          Open the output file.
private  void openHtmlFile(java.lang.String filename)
           
private  void openStyleDefinition()
           
private  void openStyleTag()
           
private  void outputCloseTag(java.lang.String tagElem)
           
private  void outputClosingBrace()
           
 void outputHtmlNewLine()
           
private  void outputNewLine()
           
private  void outputOpenBrace()
           
private  void outputOpenTag(java.lang.String... tagElemSpec)
           
private  void outputPaddingLeft()
           
private  void outputPaddingRight()
           
private  void outputStyleName()
           
private  void outputStylePostScript()
           
private  void outputStylePreamble()
           
private  void outputStyleSpecs()
           
private  void outputXmlCommentEnd()
           
private  void outputXmlCommentStart()
           
 void setHtmlData(HtmlData newPdfData)
           
private  void setInParagraph(boolean b)
           
 void setMarginRight()
           
 void setMarginTop()
           
private  void startNewFontFace()
           
private  void startNewFontSize()
           
 void startNewParagraph()
          Starts a new html Paragraph.
private  void tabin()
           
private  void tabout()
           
private  java.lang.String wrapInQuotes(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

openStatus

private boolean openStatus

htmlData

HtmlData htmlData
the HTML data structure


htmlFileName

private java.lang.String htmlFileName

htmlFile

private java.io.PrintStream htmlFile

html

org.apache.ecs.html.Html html

head

org.apache.ecs.wml.Head head

htmlBody

org.apache.ecs.html.Body htmlBody

inParagraph

private boolean inParagraph

styleNum

private int styleNum

tab

private int tab

styleStem

private final java.lang.String styleStem
See Also:
Constant Field Values

inFont

private boolean inFont
Constructor Detail

HtmlOutfile

public HtmlOutfile()
Method Detail

open

public void open(GDD gdd,
                 java.lang.String filename,
                 HtmlData pdfData)
          throws java.io.IOException
Open the output file. Does basic checks, calls openPdfFile(), and handles any exceptions

Parameters:
gdd - Global document data
filename - name of file to open
pdfData -
Throws:
java.io.IOException - in event of a problem opening the file

openHtmlFile

private void openHtmlFile(java.lang.String filename)
                   throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

close

public void close()
           throws FileCloseException
Outputs any material that has not yet been output. Then closes the iText Document. Note that the first text item to be output forces an open of the document. Consult Start.processText(). So, if the file is closed, no text was output.

Throws:
FileCloseException - if an error occurs closing the file

startNewParagraph

public void startNewParagraph()
Starts a new html Paragraph. This does two things... Outputs the paragraph tag

. Records the fact that we have started a paragraph.


endCurrentParagraphIfAny

public void endCurrentParagraphIfAny()

getInParagraph

public boolean getInParagraph()

setInParagraph

private void setInParagraph(boolean b)

emitText

public void emitText(java.lang.String s)
Writes text to the HTML file.

Parameters:
s - the text to be written

getCurrentTabbedOutSpaces

private java.lang.String getCurrentTabbedOutSpaces()

isOpen

public boolean isOpen()

setHtmlData

public void setHtmlData(HtmlData newPdfData)

outputHtmlNewLine

public void outputHtmlNewLine()

generateStyleClassDefinition

public void generateStyleClassDefinition()

outputStylePostScript

private void outputStylePostScript()

closeStyleTag

private void closeStyleTag()

outputCloseTag

private void outputCloseTag(java.lang.String tagElem)

outputXmlCommentEnd

private void outputXmlCommentEnd()

outputClosingBrace

private void outputClosingBrace()

tabin

private void tabin()

outputStyleSpecs

private void outputStyleSpecs()

outputPaddingRight

private void outputPaddingRight()

outputPaddingLeft

private void outputPaddingLeft()

outputStylePreamble

private void outputStylePreamble()

openStyleDefinition

private void openStyleDefinition()

outputOpenBrace

private void outputOpenBrace()

tabout

private void tabout()

outputNewLine

private void outputNewLine()

outputStyleName

private void outputStyleName()

generateNewStyleName

private java.lang.String generateNewStyleName()

getLatestStyleName

private java.lang.String getLatestStyleName()

outputXmlCommentStart

private void outputXmlCommentStart()

wrapInQuotes

private java.lang.String wrapInQuotes(java.lang.String s)

openStyleTag

private void openStyleTag()

outputOpenTag

private void outputOpenTag(java.lang.String... tagElemSpec)

emitFontSizeTag

public void emitFontSizeTag()

startNewFontSize

private void startNewFontSize()

handleEof

public void handleEof()

endFontTagIfAny

private void endFontTagIfAny()

alreadyProcessingFont

private boolean alreadyProcessingFont()

setMarginRight

public void setMarginRight()

setMarginTop

public void setMarginTop()

handleNewFontFace

public void handleNewFontFace()

startNewFontFace

private void startNewFontFace()

Platypus

Copyright © 2006-10 Pacific Data Works LLC. (platypus.pz.org)