Platypus

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

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

public class PdfHardCR
extends java.lang.Object
implements OutputCommandable

Force a hard CR/LF (note: this command does *not* force an end of paragraph) Note that the main token processor in Pdf.Start() will check the token after []. If it's a [cr], that [cr] is ignored (so that the next line does not begin with a blank).


Field Summary
private  java.lang.String root
           
 
Constructor Summary
PdfHardCR()
           
 
Method Summary
 java.lang.String getRoot()
          get the root of the command.
private  boolean isFirstTokenInLine(OutputContextable context, Token tok, int tokNum)
          Determines whether the current [] is the first token in the line (which means either the absolute first token, or the first token other than a command).
 int process(OutputContextable context, Token tok, int tokNum)
          method for processing this command in the output plugin.
 
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

PdfHardCR

public PdfHardCR()
Method Detail

process

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

Specified by:
process in interface OutputCommandable
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

isFirstTokenInLine

private boolean isFirstTokenInLine(OutputContextable context,
                                   Token tok,
                                   int tokNum)
Determines whether the current [] is the first token in the line (which means either the absolute first token, or the first token other than a command).

Parameters:
context - PdfData containing the Source fields for this token
tok - present token
tokNum - present token number
Returns:
true if first token as specified above, or false if not.

getRoot

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

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

Platypus

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