org.pz.platypus.plugin.html.commands
Class HtmlHardCR

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

public class HtmlHardCR
extends java.lang.Object
implements IOutputCommand

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).

Author:
ask

Field Summary
private  java.lang.String root
           
 
Constructor Summary
HtmlHardCR()
           
 
Method Summary
 java.lang.String getRoot()
          get the root of the command.
private  boolean isFirstTokenInLine(IOutputContext 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(IOutputContext 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

HtmlHardCR

public HtmlHardCR()
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

isFirstTokenInLine

private boolean isFirstTokenInLine(IOutputContext 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: 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