org.pz.platypus.plugin.html
Class HtmlData

java.lang.Object
  extended by org.pz.platypus.plugin.common.DocData
      extended by org.pz.platypus.plugin.html.HtmlData
All Implemented Interfaces:
IOutputContext

public class HtmlData
extends DocData
implements IOutputContext

Container class for all the state of the HTML document

Author:
ask

Nested Class Summary
(package private) static class HtmlData.Value
          Inner class containing the value of the data item, plus the line at which it was las changed.
 
Field Summary
private  HtmlData.Value alignment
           
private  HtmlData.Value columnCount
           
private  HtmlColumns columns
           
private  int currColumn
           
private  boolean eolPending
           
private  HtmlData.Value eolTreatment
           
private  java.lang.String fface
           
private  HtmlData.Value firstLineIndent
           
private  HtmlFont font
           
private  HtmlFooter footer
           
private  GDD gdd
           
(package private)  HtmlDocContext htmlDocContext
           
private  boolean inCode
           
private  HtmlData.Value leading
           
private  HtmlData.Value lineHeight
           
private  HtmlData.Value marginBottom
           
private  HtmlData.Value marginLeft
           
private  HtmlData.Value marginRight
           
private  HtmlData.Value marginsMirrored
           
private  HtmlData.Value marginTop
           
private  HtmlData.Value noIndent
           
private  HtmlData.Value pageHeight
           
private  int pageNumber
           
private  HtmlData.Value pageWidth
           
private  HtmlData.Value paragraphIndentRight
           
private  HtmlData.Value paragraphSkip
           
private  HtmlData.Value pixelsPerInch
           
private  HtmlData.Value strikethru
           
private  TypefaceMap typefaceMap
           
private  HtmlData.Value userSpecifiedColumnWidth
           
 
Fields inherited from class org.pz.platypus.plugin.common.DocData
underline
 
Constructor Summary
HtmlData(GDD gddIn, HtmlCommandTable commandTable)
          Initializes the state of the PDF document.
 
Method Summary
 int getEolTreatment()
           
 float getFirstLineIndent()
           
 HtmlFont getFont()
           
 java.lang.String getFontFace()
           
 float getFontSize()
           
 HtmlFooter getFooter()
           
 GDD getGdd()
           
 HtmlDocContext getHtmlDocContext()
           
 float getLeading()
           
 Source getLeadingLine()
           
 float getLineHeight()
           
 Source getLineHeightLine()
           
 float getMarginBottom()
           
 Source getMarginBottomLine()
           
 float getMarginLeft()
           
 Source getMarginLeftLine()
           
 float getMarginRight()
           
 Source getMarginRightLine()
           
 float getMarginTop()
           
 Source getMarginTopLine()
           
 Source getNoIndentLine()
           
 float getPageHeight()
           
 Source getPageHeightLine()
           
 int getPageNumber()
           
 float getPageWidth()
           
 float getPixelsPerInch()
           
 TypefaceMap getTypefaceMap()
           
 float getUserSpecifiedColumnWidth()
           
 void init()
          Some data items need additional initialization.
 boolean isInCode()
           
 void setColumnCount(int newCount, Source fileAndLine)
           
 void setColumns(HtmlColumns newColumnsList)
           
 void setCurrColumn(int newColNumber)
           
 void setFirstLineIndent(float newFirstLineIndent, Source fileAndLine)
           
 void setFontFace(java.lang.String newFontFace, Source source)
           
 void setFontSize(float newFontSize, Source newSource)
           
 void setFooter(HtmlFooter newFooter)
           
 void setHtmlDocContext(HtmlDocContext htmlDocContext)
           
 void setInCode(boolean newState)
           
 void setLeading(float newLeading, Source fileAndLine)
           
 void setLineHeight(float newLineHeight, Source fileAndLine)
           
 void setMarginBottom(float val, Source fileAndLine)
           
 void setMarginLeft(float val, Source fileAndLine)
           
 void setMarginRight(float val, Source fileAndLine)
           
 void setMarginTop(float val, Source fileAndLine)
           
 void setNoIndent(boolean trueFalse, Source fileAndLine)
           
 void setPageHeight(float val, Source fileAndLine)
           
 void setPageWidth(float val, Source fileAndLine)
           
 void setUserSpecifiedColumnWidth(float newWidth, Source fileAndLine)
           
(package private)  void setValue(HtmlData.Value field, boolean val, Source fileAndLine, java.lang.String name)
          Sets the new boolean value, updates line number, and table in systemStrings
(package private)  void setValue(HtmlData.Value field, float val, Source fileAndLine, java.lang.String name)
          Sets the new float value, updates line number, and table in systemStrings
(package private)  void setValue(HtmlData.Value field, int val, Source fileAndLine, java.lang.String name)
          Sets the new int value, updates line number, and table in systemStrings
 
Methods inherited from class org.pz.platypus.plugin.common.DocData
getAlignment, getAlignmentLine, getCodeSectionLine, getColumnCount, getColumnCountLine, getCommandTable, getCurrColumn, getFirstLineIndentLine, getLineNumberLast, getLineNumberLastLine, getLineNumberSkip, getLineNumberSkipLine, getMarginsMirrored, getMarginsMirroredLine, getNoIndent, getPageWidthLine, getParagraphIndent, getParagraphIndentLine, getParagraphIndentRight, getParagraphIndentRightLine, getParagraphSkip, getParagraphSkipLine, getPixelsPerInchLine, getStrikethru, getStrikethruLine, getUnderline, getUserSpecifiedColumnWidthLine, inCodeSection, isInCodeListing, setAlignment, setCommandTable, setInCodeListing, setInCodeSection, setLineNumberLast, setLineNumberSkip, setMarginsMirrored, setPageNumber, setParagraphIndent, setParagraphIndentRight, setParagraphSkip, setStrikethru, setValue, setValue, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pz.platypus.interfaces.IOutputContext
inCodeSection, setLineNumberLast, setLineNumberSkip
 

Field Detail

htmlDocContext

HtmlDocContext htmlDocContext

fface

private java.lang.String fface

gdd

private GDD gdd

inCode

private boolean inCode

alignment

private HtmlData.Value alignment

columnCount

private HtmlData.Value columnCount

userSpecifiedColumnWidth

private HtmlData.Value userSpecifiedColumnWidth

columns

private HtmlColumns columns

currColumn

private int currColumn

eolPending

private boolean eolPending

eolTreatment

private HtmlData.Value eolTreatment

firstLineIndent

private HtmlData.Value firstLineIndent

font

private HtmlFont font

footer

private HtmlFooter footer

leading

private HtmlData.Value leading

lineHeight

private HtmlData.Value lineHeight

marginBottom

private HtmlData.Value marginBottom

marginLeft

private HtmlData.Value marginLeft

marginRight

private HtmlData.Value marginRight

marginTop

private HtmlData.Value marginTop

marginsMirrored

private HtmlData.Value marginsMirrored

noIndent

private HtmlData.Value noIndent

pageHeight

private HtmlData.Value pageHeight

pageNumber

private int pageNumber

pageWidth

private HtmlData.Value pageWidth

paragraphIndentRight

private HtmlData.Value paragraphIndentRight

paragraphSkip

private HtmlData.Value paragraphSkip

pixelsPerInch

private HtmlData.Value pixelsPerInch

strikethru

private HtmlData.Value strikethru

typefaceMap

private TypefaceMap typefaceMap
Constructor Detail

HtmlData

public HtmlData(GDD gddIn,
                HtmlCommandTable commandTable)
Initializes the state of the PDF document.

Parameters:
gddIn - the GDD
commandTable -
Method Detail

getHtmlDocContext

public HtmlDocContext getHtmlDocContext()

setHtmlDocContext

public void setHtmlDocContext(HtmlDocContext htmlDocContext)

setFontSize

public void setFontSize(float newFontSize,
                        Source newSource)

setFontFace

public void setFontFace(java.lang.String newFontFace,
                        Source source)

init

public void init()
Some data items need additional initialization. This is not done in the constructor, for testing purposes. This two-step process enables tests to create a PdfData structure and do the complex initialization separately.

Overrides:
init in class DocData

setValue

void setValue(HtmlData.Value field,
              float val,
              Source fileAndLine,
              java.lang.String name)
Sets the new float value, updates line number, and table in systemStrings

Parameters:
field - the Value field to be updated
val - the new floating-point value
fileAndLine - the file and line number where the change occurred
name - the key to look up the string in systemStrings

setValue

void setValue(HtmlData.Value field,
              int val,
              Source fileAndLine,
              java.lang.String name)
Sets the new int value, updates line number, and table in systemStrings

Parameters:
field - the Value field to be updated
val - the new integer value
fileAndLine - the file and line number where the change occurred
name - the key to look up the string in systemStrings

setValue

void setValue(HtmlData.Value field,
              boolean val,
              Source fileAndLine,
              java.lang.String name)
Sets the new boolean value, updates line number, and table in systemStrings

Parameters:
field - the Value field to be updated
val - the new floating-point value
fileAndLine - the file and line number where the change occurred
name - the key to look up the string in systemStrings

setColumnCount

public void setColumnCount(int newCount,
                           Source fileAndLine)
Overrides:
setColumnCount in class DocData

setColumns

public void setColumns(HtmlColumns newColumnsList)

setCurrColumn

public void setCurrColumn(int newColNumber)
Overrides:
setCurrColumn in class DocData

getEolTreatment

public int getEolTreatment()

getFirstLineIndent

public float getFirstLineIndent()
Overrides:
getFirstLineIndent in class DocData

setFirstLineIndent

public void setFirstLineIndent(float newFirstLineIndent,
                               Source fileAndLine)
Overrides:
setFirstLineIndent in class DocData

getFont

public HtmlFont getFont()

getFontFace

public java.lang.String getFontFace()

getFontSize

public float getFontSize()

getFooter

public HtmlFooter getFooter()

setFooter

public void setFooter(HtmlFooter newFooter)

getGdd

public GDD getGdd()
Specified by:
getGdd in interface IOutputContext
Overrides:
getGdd in class DocData

isInCode

public boolean isInCode()

setInCode

public void setInCode(boolean newState)

getLeading

public float getLeading()
Overrides:
getLeading in class DocData

getLeadingLine

public Source getLeadingLine()
Overrides:
getLeadingLine in class DocData

setLeading

public void setLeading(float newLeading,
                       Source fileAndLine)
Overrides:
setLeading in class DocData

getLineHeight

public float getLineHeight()
Overrides:
getLineHeight in class DocData

getLineHeightLine

public Source getLineHeightLine()
Overrides:
getLineHeightLine in class DocData

setLineHeight

public void setLineHeight(float newLineHeight,
                          Source fileAndLine)
Overrides:
setLineHeight in class DocData

getMarginBottom

public float getMarginBottom()
Overrides:
getMarginBottom in class DocData

getMarginBottomLine

public Source getMarginBottomLine()
Overrides:
getMarginBottomLine in class DocData

setMarginBottom

public void setMarginBottom(float val,
                            Source fileAndLine)
Overrides:
setMarginBottom in class DocData

getMarginLeft

public float getMarginLeft()
Overrides:
getMarginLeft in class DocData

getMarginLeftLine

public Source getMarginLeftLine()
Overrides:
getMarginLeftLine in class DocData

setMarginLeft

public void setMarginLeft(float val,
                          Source fileAndLine)
Overrides:
setMarginLeft in class DocData

getMarginRight

public float getMarginRight()
Overrides:
getMarginRight in class DocData

getMarginRightLine

public Source getMarginRightLine()
Overrides:
getMarginRightLine in class DocData

setMarginRight

public void setMarginRight(float val,
                           Source fileAndLine)
Overrides:
setMarginRight in class DocData

getMarginTop

public float getMarginTop()
Overrides:
getMarginTop in class DocData

getMarginTopLine

public Source getMarginTopLine()
Overrides:
getMarginTopLine in class DocData

setMarginTop

public void setMarginTop(float val,
                         Source fileAndLine)
Overrides:
setMarginTop in class DocData

getNoIndentLine

public Source getNoIndentLine()
Overrides:
getNoIndentLine in class DocData

setNoIndent

public void setNoIndent(boolean trueFalse,
                        Source fileAndLine)
Overrides:
setNoIndent in class DocData

getPageHeight

public float getPageHeight()
Overrides:
getPageHeight in class DocData

getPageHeightLine

public Source getPageHeightLine()
Overrides:
getPageHeightLine in class DocData

setPageHeight

public void setPageHeight(float val,
                          Source fileAndLine)
Overrides:
setPageHeight in class DocData

getPageNumber

public int getPageNumber()
Overrides:
getPageNumber in class DocData

getPageWidth

public float getPageWidth()
Overrides:
getPageWidth in class DocData

setPageWidth

public void setPageWidth(float val,
                         Source fileAndLine)
Overrides:
setPageWidth in class DocData

getPixelsPerInch

public float getPixelsPerInch()
Overrides:
getPixelsPerInch in class DocData

getTypefaceMap

public TypefaceMap getTypefaceMap()

getUserSpecifiedColumnWidth

public float getUserSpecifiedColumnWidth()
Overrides:
getUserSpecifiedColumnWidth in class DocData

setUserSpecifiedColumnWidth

public void setUserSpecifiedColumnWidth(float newWidth,
                                        Source fileAndLine)
Overrides:
setUserSpecifiedColumnWidth in class DocData


Copyright © 2008-10 Pacific Data Works LLC