ua.gradsoft.termware.printers
Class AbstractPrettyPrinter

java.lang.Object
  extended by ua.gradsoft.termware.printers.AbstractPrinter
      extended by ua.gradsoft.termware.printers.AbstractPrettyPrinter
All Implemented Interfaces:
IPrettyPrinter, IPrinter
Direct Known Subclasses:
TermWarePrinter

public abstract class AbstractPrettyPrinter
extends AbstractPrinter
implements IPrettyPrinter

Common functionality for pretty printing.

See Also:
IPrettyPrinter

Field Summary
protected  PrettyPrintWriter out_
          Child must use API of out_ for output, to use implemented pretty-printing algorithm.
 
Fields inherited from class ua.gradsoft.termware.printers.AbstractPrinter
outTag_, WS
 
Constructor Summary
protected AbstractPrettyPrinter(PrintWriter out, String outTag)
           
 
Method Summary
protected  void finalize()
           
 int getPageWidth()
           
 PrettyPrintWriter getPrettyPrintingOut()
           
 void setPageWidth(int width)
           
 
Methods inherited from class ua.gradsoft.termware.printers.AbstractPrinter
getOut, getTag, printWs, writeTerm
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ua.gradsoft.termware.IPrinter
flush, writeTerm
 

Field Detail

out_

protected PrettyPrintWriter out_
Child must use API of out_ for output, to use implemented pretty-printing algorithm.

Constructor Detail

AbstractPrettyPrinter

protected AbstractPrettyPrinter(PrintWriter out,
                                String outTag)
Method Detail

getPrettyPrintingOut

public final PrettyPrintWriter getPrettyPrintingOut()

getPageWidth

public int getPageWidth()
Specified by:
getPageWidth in interface IPrettyPrinter

setPageWidth

public void setPageWidth(int width)
Specified by:
setPageWidth in interface IPrettyPrinter

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable