Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.w3c.tidy
Class PPrint  view PPrint download PPrint.java

java.lang.Object
  extended byorg.w3c.tidy.PPrint

public class PPrint
extends java.lang.Object


Field Summary
private static short ATTRIBVALUE
           
private static short CDATA
           
private static short COMMENT
           
private  Configuration configuration
           
private  int count
           
static short EFFECT_BLEND
           
static short EFFECT_BOX_IN
           
static short EFFECT_BOX_OUT
           
static short EFFECT_CHK_ACROSS
           
static short EFFECT_CHK_DOWN
           
static short EFFECT_CIRCLE_IN
           
static short EFFECT_CIRCLE_OUT
           
static short EFFECT_HORZ_BLINDS
           
static short EFFECT_RANDOM
           
static short EFFECT_RND_BARS_HORZ
           
static short EFFECT_RND_BARS_VERT
           
static short EFFECT_RND_DISSOLVE
           
static short EFFECT_SPLIT_HORZ_IN
           
static short EFFECT_SPLIT_HORZ_OUT
           
static short EFFECT_SPLIT_VIRT_IN
           
static short EFFECT_SPLIT_VIRT_OUT
           
static short EFFECT_STRIPS_LEFT_DOWN
           
static short EFFECT_STRIPS_LEFT_UP
           
static short EFFECT_STRIPS_RIGHT_DOWN
           
static short EFFECT_STRIPS_RIGHT_UP
           
static short EFFECT_VERT_BLINDS
           
static short EFFECT_WIPE_DOWN
           
static short EFFECT_WIPE_LEFT
           
static short EFFECT_WIPE_RIGHT
           
static short EFFECT_WIPE_UP
           
private  boolean inAttVal
           
private  boolean InString
           
private  int lbufsize
           
private  int[] linebuf
           
private  int linelen
           
private static short NORMAL
           
private static short NOWRAP
           
private static short PREFORMATTED
           
private  int slide
           
private  Node slidecontent
           
private  int wraphere
           
 
Constructor Summary
PPrint(Configuration configuration)
           
 
Method Summary
private  void addC(int c, int index)
           
 void addTransitionEffect(Lexer lexer, Node root, short effect, double duration)
           
private static boolean afterSpace(Node node)
           
 void condFlushLine(Out fout, int indent)
           
 int countSlides(Node node)
           
 void createSlides(Lexer lexer, Node root)
           
 void flushLine(Out fout, int indent)
           
static int getUTF8(byte[] str, int start, MutableInteger ch)
           
private  void printAsp(Out fout, int indent, Node node)
           
private  void printAttribute(Out fout, int indent, Node node, AttVal attr)
           
private  void printAttrs(Out fout, int indent, Node node, AttVal attr)
           
private  void printAttrValue(Out fout, int indent, java.lang.String value, int delim, boolean wrappable)
           
private  void printCDATA(Out fout, int indent, Node node)
           
private  void printChar(int c, short mode)
           
private  void printComment(Out fout, int indent, Node node)
           
private  void printDocType(Out fout, int indent, Node node)
           
private  void printEndTag(Out fout, short mode, int indent, Node node)
           
private  void printJste(Out fout, int indent, Node node)
           
private  void printNavBar(Out fout, int indent)
           
private  void printPhp(Out fout, int indent, Node node)
           
private  void printPI(Out fout, int indent, Node node)
           
private  void printSection(Out fout, int indent, Node node)
           
 void printSlide(Out fout, short mode, int indent, Lexer lexer)
           
private  void printString(Out fout, int indent, java.lang.String str)
           
private  void printTag(Lexer lexer, Out fout, short mode, int indent, Node node)
           
private  void printText(Out fout, short mode, int indent, byte[] textarray, int start, int end)
           
 void printTree(Out fout, short mode, int indent, Lexer lexer, Node node)
           
private  void printVertSpacer(Out fout, int indent)
           
 void printXMLTree(Out fout, short mode, int indent, Lexer lexer, Node node)
           
static int putUTF8(byte[] buf, int start, int c)
           
private  boolean shouldIndent(Node node)
           
private  void wrapAttrVal(Out fout, int indent, boolean inString)
           
private  void wrapLine(Out fout, int indent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EFFECT_BLEND

public static final short EFFECT_BLEND
See Also:
Constant Field Values

EFFECT_BOX_IN

public static final short EFFECT_BOX_IN
See Also:
Constant Field Values

EFFECT_BOX_OUT

public static final short EFFECT_BOX_OUT
See Also:
Constant Field Values

EFFECT_CIRCLE_IN

public static final short EFFECT_CIRCLE_IN
See Also:
Constant Field Values

EFFECT_CIRCLE_OUT

public static final short EFFECT_CIRCLE_OUT
See Also:
Constant Field Values

EFFECT_WIPE_UP

public static final short EFFECT_WIPE_UP
See Also:
Constant Field Values

EFFECT_WIPE_DOWN

public static final short EFFECT_WIPE_DOWN
See Also:
Constant Field Values

EFFECT_WIPE_RIGHT

public static final short EFFECT_WIPE_RIGHT
See Also:
Constant Field Values

EFFECT_WIPE_LEFT

public static final short EFFECT_WIPE_LEFT
See Also:
Constant Field Values

EFFECT_VERT_BLINDS

public static final short EFFECT_VERT_BLINDS
See Also:
Constant Field Values

EFFECT_HORZ_BLINDS

public static final short EFFECT_HORZ_BLINDS
See Also:
Constant Field Values

EFFECT_CHK_ACROSS

public static final short EFFECT_CHK_ACROSS
See Also:
Constant Field Values

EFFECT_CHK_DOWN

public static final short EFFECT_CHK_DOWN
See Also:
Constant Field Values

EFFECT_RND_DISSOLVE

public static final short EFFECT_RND_DISSOLVE
See Also:
Constant Field Values

EFFECT_SPLIT_VIRT_IN

public static final short EFFECT_SPLIT_VIRT_IN
See Also:
Constant Field Values

EFFECT_SPLIT_VIRT_OUT

public static final short EFFECT_SPLIT_VIRT_OUT
See Also:
Constant Field Values

EFFECT_SPLIT_HORZ_IN

public static final short EFFECT_SPLIT_HORZ_IN
See Also:
Constant Field Values

EFFECT_SPLIT_HORZ_OUT

public static final short EFFECT_SPLIT_HORZ_OUT
See Also:
Constant Field Values

EFFECT_STRIPS_LEFT_DOWN

public static final short EFFECT_STRIPS_LEFT_DOWN
See Also:
Constant Field Values

EFFECT_STRIPS_LEFT_UP

public static final short EFFECT_STRIPS_LEFT_UP
See Also:
Constant Field Values

EFFECT_STRIPS_RIGHT_DOWN

public static final short EFFECT_STRIPS_RIGHT_DOWN
See Also:
Constant Field Values

EFFECT_STRIPS_RIGHT_UP

public static final short EFFECT_STRIPS_RIGHT_UP
See Also:
Constant Field Values

EFFECT_RND_BARS_HORZ

public static final short EFFECT_RND_BARS_HORZ
See Also:
Constant Field Values

EFFECT_RND_BARS_VERT

public static final short EFFECT_RND_BARS_VERT
See Also:
Constant Field Values

EFFECT_RANDOM

public static final short EFFECT_RANDOM
See Also:
Constant Field Values

NORMAL

private static final short NORMAL
See Also:
Constant Field Values

PREFORMATTED

private static final short PREFORMATTED
See Also:
Constant Field Values

COMMENT

private static final short COMMENT
See Also:
Constant Field Values

ATTRIBVALUE

private static final short ATTRIBVALUE
See Also:
Constant Field Values

NOWRAP

private static final short NOWRAP
See Also:
Constant Field Values

CDATA

private static final short CDATA
See Also:
Constant Field Values

linebuf

private int[] linebuf

lbufsize

private int lbufsize

linelen

private int linelen

wraphere

private int wraphere

inAttVal

private boolean inAttVal

InString

private boolean InString

slide

private int slide

count

private int count

slidecontent

private Node slidecontent

configuration

private Configuration configuration
Constructor Detail

PPrint

public PPrint(Configuration configuration)
Method Detail

getUTF8

public static int getUTF8(byte[] str,
                          int start,
                          MutableInteger ch)

putUTF8

public static int putUTF8(byte[] buf,
                          int start,
                          int c)

addC

private void addC(int c,
                  int index)

wrapLine

private void wrapLine(Out fout,
                      int indent)

wrapAttrVal

private void wrapAttrVal(Out fout,
                         int indent,
                         boolean inString)

flushLine

public void flushLine(Out fout,
                      int indent)

condFlushLine

public void condFlushLine(Out fout,
                          int indent)

printChar

private void printChar(int c,
                       short mode)

printText

private void printText(Out fout,
                       short mode,
                       int indent,
                       byte[] textarray,
                       int start,
                       int end)

printString

private void printString(Out fout,
                         int indent,
                         java.lang.String str)

printAttrValue

private void printAttrValue(Out fout,
                            int indent,
                            java.lang.String value,
                            int delim,
                            boolean wrappable)

printAttribute

private void printAttribute(Out fout,
                            int indent,
                            Node node,
                            AttVal attr)

printAttrs

private void printAttrs(Out fout,
                        int indent,
                        Node node,
                        AttVal attr)

afterSpace

private static boolean afterSpace(Node node)

printTag

private void printTag(Lexer lexer,
                      Out fout,
                      short mode,
                      int indent,
                      Node node)

printEndTag

private void printEndTag(Out fout,
                         short mode,
                         int indent,
                         Node node)

printComment

private void printComment(Out fout,
                          int indent,
                          Node node)

printDocType

private void printDocType(Out fout,
                          int indent,
                          Node node)

printPI

private void printPI(Out fout,
                     int indent,
                     Node node)

printAsp

private void printAsp(Out fout,
                      int indent,
                      Node node)

printJste

private void printJste(Out fout,
                       int indent,
                       Node node)

printPhp

private void printPhp(Out fout,
                      int indent,
                      Node node)

printCDATA

private void printCDATA(Out fout,
                        int indent,
                        Node node)

printSection

private void printSection(Out fout,
                          int indent,
                          Node node)

shouldIndent

private boolean shouldIndent(Node node)

printTree

public void printTree(Out fout,
                      short mode,
                      int indent,
                      Lexer lexer,
                      Node node)

printXMLTree

public void printXMLTree(Out fout,
                         short mode,
                         int indent,
                         Lexer lexer,
                         Node node)

countSlides

public int countSlides(Node node)

printVertSpacer

private void printVertSpacer(Out fout,
                             int indent)

printNavBar

private void printNavBar(Out fout,
                         int indent)

printSlide

public void printSlide(Out fout,
                       short mode,
                       int indent,
                       Lexer lexer)

addTransitionEffect

public void addTransitionEffect(Lexer lexer,
                                Node root,
                                short effect,
                                double duration)

createSlides

public void createSlides(Lexer lexer,
                         Node root)