org.pz.platypus.plugin.common
Class DocData

java.lang.Object
  extended by org.pz.platypus.plugin.common.DocData
All Implemented Interfaces:
IOutputContext
Direct Known Subclasses:
HtmlData, PdfData, RtfData

public abstract class DocData
extends java.lang.Object
implements IOutputContext

Abstract container class for all the state of the output document. Derived classes are created for the PDF, RTF, etc. plugins.

Author:
alb

Nested Class Summary
static class DocData.Value
          Inner class containing the value of the data item, plus the line at which it was las changed.
 
Field Summary
private  DocData.Value alignment
           
private  DocData.Value codeSection
           
protected  DocData.Value columnCount
           
private  ICommandTable commandTable
           
private  int currColumn
           
private  DocData.Value firstLineIndent
           
private  GDD gdd
           
private  boolean inCodeListing
           
private  DocData.Value leading
           
private  DocData.Value lineHeight
           
private  DocData.Value lineNumberLast
           
private  DocData.Value lineNumberSkip
           
private  DocData.Value marginBottom
           
private  DocData.Value marginLeft
           
private  DocData.Value marginRight
           
private  DocData.Value marginsMirrored
           
private  DocData.Value marginTop
           
private  DocData.Value noIndent
           
private  DocData.Value pageHeight
           
private  int pageNumber
           
private  DocData.Value pageWidth
           
private  DocData.Value paragraphIndent
           
private  DocData.Value paragraphIndentRight
           
private  DocData.Value paragraphSkip
           
private  DocData.Value pixelsPerInch
           
private  DocData.Value strikethru
           
protected  Underline underline
           
private  DocData.Value userSpecifiedColumnWidth
           
 
Constructor Summary
DocData()
          Default ctor
DocData(GDD gddIn)
          Initializes the state of the PDF document.
 
Method Summary
 int getAlignment()
           
 Source getAlignmentLine()
           
 Source getCodeSectionLine()
           
 int getColumnCount()
           
 Source getColumnCountLine()
           
 ICommandTable getCommandTable()
           
 int getCurrColumn()
           
 float getFirstLineIndent()
           
 Source getFirstLineIndentLine()
           
 GDD getGdd()
           
 float getLeading()
           
 Source getLeadingLine()
           
 float getLineHeight()
           
 Source getLineHeightLine()
           
 int getLineNumberLast()
           
 Source getLineNumberLastLine()
           
 int getLineNumberSkip()
           
 Source getLineNumberSkipLine()
           
 float getMarginBottom()
           
 Source getMarginBottomLine()
           
 float getMarginLeft()
           
 Source getMarginLeftLine()
           
 float getMarginRight()
           
 Source getMarginRightLine()
           
 boolean getMarginsMirrored()
           
 Source getMarginsMirroredLine()
           
 float getMarginTop()
           
 Source getMarginTopLine()
           
 boolean getNoIndent()
           
 Source getNoIndentLine()
           
 float getPageHeight()
           
 Source getPageHeightLine()
           
 int getPageNumber()
           
 float getPageWidth()
           
 Source getPageWidthLine()
           
 float getParagraphIndent()
           
 Source getParagraphIndentLine()
           
 float getParagraphIndentRight()
           
 Source getParagraphIndentRightLine()
           
 float getParagraphSkip()
           
 int getParagraphSkipLine()
           
 float getPixelsPerInch()
           
 Source getPixelsPerInchLine()
           
 boolean getStrikethru()
           
 int getStrikethruLine()
           
 Underline getUnderline()
           
 float getUserSpecifiedColumnWidth()
           
 Source getUserSpecifiedColumnWidthLine()
           
 boolean inCodeSection()
           
 void init()
          Some data items need additional initialization.
 boolean isInCodeListing()
           
 void setAlignment(int newAlignment, Source fileAndLine)
           
 void setColumnCount(int newCount, Source fileAndLine)
           
 void setCommandTable(ICommandTable newTable)
           
 void setCurrColumn(int newColNumber)
           
 void setFirstLineIndent(float newFirstLineIndent, Source fileAndLine)
           
 void setInCodeListing(boolean isListing)
           
 void setInCodeSection(boolean inCode, Source fileAndLine)
           
 void setLeading(float newLeading, Source fileAndLine)
           
 void setLineHeight(float newLineHeight, Source fileAndLine)
           
 void setLineNumberLast(int newLastLineNumber, Source fileAndLine)
           
 void setLineNumberSkip(int newLineNumberSkip, Source fileAndLine)
           
 void setMarginBottom(float val, Source fileAndLine)
           
 void setMarginLeft(float val, Source fileAndLine)
           
 void setMarginRight(float val, Source fileAndLine)
           
 void setMarginsMirrored(boolean trueFalse, Source fileAndLine)
           
 void setMarginTop(float val, Source fileAndLine)
           
 void setNoIndent(boolean trueFalse, Source fileAndLine)
           
 void setPageHeight(float val, Source fileAndLine)
           
 void setPageNumber(int newPageNumber)
           
 void setPageWidth(float val, Source fileAndLine)
           
 void setParagraphIndent(float newParagraphIndent, Source fileAndLine)
           
 void setParagraphIndentRight(float newParagraphIndentRight, Source fileAndLine)
           
 void setParagraphSkip(float val, Source fileAndLine)
           
 void setStrikethru(boolean newStrikethru, Source fileAndLine)
           
 void setUserSpecifiedColumnWidth(float newWidth, Source fileAndLine)
           
 void setValue(DocData.Value field, boolean val, Source fileAndLine, java.lang.String name)
          Sets the new boolean value, updates line number, and table in systemStrings
 void setValue(DocData.Value field, float val, Source fileAndLine, java.lang.String name)
          Sets the new float value, updates line number, and table in systemStrings
 void setValue(DocData.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gdd

private GDD gdd

alignment

private DocData.Value alignment

codeSection

private DocData.Value codeSection

columnCount

protected DocData.Value columnCount

userSpecifiedColumnWidth

private DocData.Value userSpecifiedColumnWidth

commandTable

private ICommandTable commandTable

currColumn

private int currColumn

firstLineIndent

private DocData.Value firstLineIndent

inCodeListing

private boolean inCodeListing

leading

private DocData.Value leading

lineHeight

private DocData.Value lineHeight

lineNumberSkip

private DocData.Value lineNumberSkip

lineNumberLast

private DocData.Value lineNumberLast

marginBottom

private DocData.Value marginBottom

marginLeft

private DocData.Value marginLeft

marginRight

private DocData.Value marginRight

marginTop

private DocData.Value marginTop

marginsMirrored

private DocData.Value marginsMirrored

noIndent

private DocData.Value noIndent

pageHeight

private DocData.Value pageHeight

pageNumber

private int pageNumber

pageWidth

private DocData.Value pageWidth

paragraphIndent

private DocData.Value paragraphIndent

paragraphIndentRight

private DocData.Value paragraphIndentRight

paragraphSkip

private DocData.Value paragraphSkip

pixelsPerInch

private DocData.Value pixelsPerInch

strikethru

private DocData.Value strikethru

underline

protected Underline underline
Constructor Detail

DocData

public DocData()
Default ctor


DocData

public DocData(GDD gddIn)
Initializes the state of the PDF document.

Parameters:
gddIn - the GDD
Method Detail

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 structure and do the complex initialization separately.


setValue

public void setValue(DocData.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

public void setValue(DocData.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

public void setValue(DocData.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

getAlignment

public int getAlignment()

getAlignmentLine

public Source getAlignmentLine()

setAlignment

public void setAlignment(int newAlignment,
                         Source fileAndLine)

inCodeSection

public boolean inCodeSection()
Specified by:
inCodeSection in interface IOutputContext

getCodeSectionLine

public Source getCodeSectionLine()

setInCodeSection

public void setInCodeSection(boolean inCode,
                             Source fileAndLine)

getColumnCount

public int getColumnCount()

getColumnCountLine

public Source getColumnCountLine()

setColumnCount

public void setColumnCount(int newCount,
                           Source fileAndLine)

getCommandTable

public ICommandTable getCommandTable()

setCommandTable

public void setCommandTable(ICommandTable newTable)

getCurrColumn

public int getCurrColumn()

setCurrColumn

public void setCurrColumn(int newColNumber)

getFirstLineIndent

public float getFirstLineIndent()

getFirstLineIndentLine

public Source getFirstLineIndentLine()

setFirstLineIndent

public void setFirstLineIndent(float newFirstLineIndent,
                               Source fileAndLine)

getGdd

public GDD getGdd()
Specified by:
getGdd in interface IOutputContext

isInCodeListing

public boolean isInCodeListing()

setInCodeListing

public void setInCodeListing(boolean isListing)

getLeading

public float getLeading()

getLeadingLine

public Source getLeadingLine()

setLeading

public void setLeading(float newLeading,
                       Source fileAndLine)

getLineHeight

public float getLineHeight()

getLineHeightLine

public Source getLineHeightLine()

setLineHeight

public void setLineHeight(float newLineHeight,
                          Source fileAndLine)

getLineNumberLast

public int getLineNumberLast()

getLineNumberLastLine

public Source getLineNumberLastLine()

setLineNumberLast

public void setLineNumberLast(int newLastLineNumber,
                              Source fileAndLine)
Specified by:
setLineNumberLast in interface IOutputContext

getLineNumberSkip

public int getLineNumberSkip()

getLineNumberSkipLine

public Source getLineNumberSkipLine()

setLineNumberSkip

public void setLineNumberSkip(int newLineNumberSkip,
                              Source fileAndLine)
Specified by:
setLineNumberSkip in interface IOutputContext

getMarginBottom

public float getMarginBottom()

getMarginBottomLine

public Source getMarginBottomLine()

setMarginBottom

public void setMarginBottom(float val,
                            Source fileAndLine)

getMarginLeft

public float getMarginLeft()

getMarginLeftLine

public Source getMarginLeftLine()

setMarginLeft

public void setMarginLeft(float val,
                          Source fileAndLine)

getMarginRight

public float getMarginRight()

getMarginRightLine

public Source getMarginRightLine()

setMarginRight

public void setMarginRight(float val,
                           Source fileAndLine)

getMarginTop

public float getMarginTop()

getMarginTopLine

public Source getMarginTopLine()

setMarginTop

public void setMarginTop(float val,
                         Source fileAndLine)

getMarginsMirrored

public boolean getMarginsMirrored()

getMarginsMirroredLine

public Source getMarginsMirroredLine()

setMarginsMirrored

public void setMarginsMirrored(boolean trueFalse,
                               Source fileAndLine)

getNoIndent

public boolean getNoIndent()

getNoIndentLine

public Source getNoIndentLine()

setNoIndent

public void setNoIndent(boolean trueFalse,
                        Source fileAndLine)

getPageHeight

public float getPageHeight()

getPageHeightLine

public Source getPageHeightLine()

setPageHeight

public void setPageHeight(float val,
                          Source fileAndLine)

getPageNumber

public int getPageNumber()

setPageNumber

public void setPageNumber(int newPageNumber)

getPageWidth

public float getPageWidth()

getPageWidthLine

public Source getPageWidthLine()

setPageWidth

public void setPageWidth(float val,
                         Source fileAndLine)

getParagraphIndent

public float getParagraphIndent()

getParagraphIndentLine

public Source getParagraphIndentLine()

setParagraphIndent

public void setParagraphIndent(float newParagraphIndent,
                               Source fileAndLine)

getParagraphIndentRight

public float getParagraphIndentRight()

getParagraphIndentRightLine

public Source getParagraphIndentRightLine()

setParagraphIndentRight

public void setParagraphIndentRight(float newParagraphIndentRight,
                                    Source fileAndLine)

getParagraphSkip

public float getParagraphSkip()

getParagraphSkipLine

public int getParagraphSkipLine()

setParagraphSkip

public void setParagraphSkip(float val,
                             Source fileAndLine)

getPixelsPerInch

public float getPixelsPerInch()

getPixelsPerInchLine

public Source getPixelsPerInchLine()

getStrikethru

public boolean getStrikethru()

getStrikethruLine

public int getStrikethruLine()

setStrikethru

public void setStrikethru(boolean newStrikethru,
                          Source fileAndLine)

getUnderline

public Underline getUnderline()

getUserSpecifiedColumnWidth

public float getUserSpecifiedColumnWidth()

getUserSpecifiedColumnWidthLine

public Source getUserSpecifiedColumnWidthLine()

setUserSpecifiedColumnWidth

public void setUserSpecifiedColumnWidth(float newWidth,
                                        Source fileAndLine)


Copyright © 2008-10 Pacific Data Works LLC