org.pz.platypus.plugin.pdf
Class PdfFont

java.lang.Object
  extended by org.pz.platypus.plugin.pdf.PdfFont
All Implemented Interfaces:
java.lang.Cloneable

public class PdfFont
extends java.lang.Object
implements java.lang.Cloneable

Handles fonts for the PDF plugin

Author:
alb

Field Summary
private  boolean bold
          is font bold?
private  PdfFontFactory fontFactory
          font factory for creating an iText font
private  GDD gdd
           
private  boolean italics
          is fond italic?
private  com.lowagie.text.Font iTfont
          the iText font
private  PdfData pdfData
           
private  float size
          font size
private  Source source
          file and line number of last change
private  java.lang.String typeface
          the font typeface in the form of a string used by iText
 
Constructor Summary
PdfFont(PdfData pdd)
           
PdfFont(PdfData pdd, java.lang.String fontName, PdfFont existingFont)
          Constructor for cloning an existing PdfFont, but specifying a different typeface.
 
Method Summary
 PdfFont clone()
           
 boolean getBold()
           
 java.lang.String getFace()
           
 boolean getItalics()
           
 com.lowagie.text.Font getItextFont()
          Get the iText font
 float getSize()
           
 Source getSource()
           
 void setBold(boolean onOff, Source newSource)
          set bold on/off and re-create the iText font to record the change.
 void setFace(java.lang.String newFace, Source newSource)
           
 void setItalics(boolean onOff, Source newSource)
          set italics on/off and re-create the iText font to record the change.
 void setSize(float newSize, Source newSource)
           
 void setToDefault()
          Initializes all PdfFont fields to defaults, and sets line number to 0
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iTfont

private com.lowagie.text.Font iTfont
the iText font


typeface

private java.lang.String typeface
the font typeface in the form of a string used by iText


size

private float size
font size


bold

private boolean bold
is font bold?


italics

private boolean italics
is fond italic?


source

private Source source
file and line number of last change


fontFactory

private PdfFontFactory fontFactory
font factory for creating an iText font


gdd

private GDD gdd

pdfData

private PdfData pdfData
Constructor Detail

PdfFont

public PdfFont(PdfData pdd)

PdfFont

public PdfFont(PdfData pdd,
               java.lang.String fontName,
               PdfFont existingFont)
Constructor for cloning an existing PdfFont, but specifying a different typeface.

Parameters:
pdd - PDF data
fontName - the name of the new font/typeface
existingFont - the font to clone the other attributes from
Method Detail

setToDefault

public void setToDefault()
Initializes all PdfFont fields to defaults, and sets line number to 0


clone

public PdfFont clone()
Overrides:
clone in class java.lang.Object

getBold

public boolean getBold()

getItalics

public boolean getItalics()

getItextFont

public com.lowagie.text.Font getItextFont()
Get the iText font

Returns:
the iText font

getFace

public java.lang.String getFace()

getSize

public float getSize()

getSource

public Source getSource()

setBold

public void setBold(boolean onOff,
                    Source newSource)
set bold on/off and re-create the iText font to record the change.

Parameters:
onOff - the new value for the italics setting
newSource - the file and line # of the token that changed italics

setItalics

public void setItalics(boolean onOff,
                       Source newSource)
set italics on/off and re-create the iText font to record the change.

Parameters:
onOff - the new value for the italics setting
newSource - the file and line # of the token that changed italics

setSize

public void setSize(float newSize,
                    Source newSource)

setFace

public void setFace(java.lang.String newFace,
                    Source newSource)


Copyright © 2008-10 Pacific Data Works LLC