org.pz.platypus.plugin.pdf.commands
Class PdfFsize

java.lang.Object
  extended by org.pz.platypus.plugin.pdf.commands.PdfFsize
All Implemented Interfaces:
IOutputCommand

public class PdfFsize
extends java.lang.Object
implements IOutputCommand

Implementation of fsize (in font family of commands) for PDF plugin

Author:
alb

Field Summary
private  java.lang.String root
           
 
Constructor Summary
PdfFsize()
           
 
Method Summary
 java.lang.String getRoot()
          get the root of the command.
(package private)  boolean inEmptyParagraph(com.lowagie.text.Paragraph iTPara)
          Sees if any text has been written to the current paragraph.
 int process(IOutputContext context, Token tok, int tokNum)
          method for processing this command in the output plugin.
private  void updateLeading(IOutputContext context, Token tok, int tokNum, float newFontSize)
          Updates the leading by running the command PdfLeading with the new value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

root

private java.lang.String root
Constructor Detail

PdfFsize

public PdfFsize()
Method Detail

process

public int process(IOutputContext context,
                   Token tok,
                   int tokNum)
Description copied from interface: IOutputCommand
method for processing this command in the output plugin.

Specified by:
process in interface IOutputCommand
Parameters:
context - the context/state of the output document
tok - the command token as found in the token stream
tokNum - the number of the token in the token list

updateLeading

private void updateLeading(IOutputContext context,
                           Token tok,
                           int tokNum,
                           float newFontSize)
Updates the leading by running the command PdfLeading with the new value

Parameters:
context - context of current token, needed by PdfLeading
tok - the current token for font size, from which to extract data for the leading command
tokNum - the number of the font size token
newFontSize - the font size we're moving to.

inEmptyParagraph

boolean inEmptyParagraph(com.lowagie.text.Paragraph iTPara)
Sees if any text has been written to the current paragraph.

Parameters:
iTPara - the current paragraph
Returns:
true if no text has been written, false otherwise.

getRoot

public java.lang.String getRoot()
Description copied from interface: IOutputCommand
get the root of the command. For example, fsize: in [fsize:12pt]

Specified by:
getRoot in interface IOutputCommand
Returns:
the root as a string


Copyright © 2008-10 Pacific Data Works LLC