`[all packages] [package ] [class hierarchy] [index]`

# public abstract class Printer

(source file: Printer.java)

    java.lang.Object
       |
       +----Printer

The pure class interface.

    public abstract class Printer

  A class of printers. You can print strings in roman, bold, italic and typewriter to a printer. The printer will also keep track of indentation.

  Author:
    Alan Jeffrey
  Version: v1.0 1998/06/02

##

Printer()
  Create a new printer.

##

close()
  Close the output stream down.
indent()
  Indent by one level.
newLine()
  Print a new line.
outdent()
  Undo one level of indentation.
print(Printable)
  Print a printable term.
printA(Printable)
  Print a term as an `atom' (bracketed by default).
printArray(Printable[], String)
  Print an array of terms.
printArrow()
  Print a right arrow.
printB(Printable)
  Print a bracketed term.
printBold(String)
  Print a string in roman.
printItalic(String)
  Print a string in italic.
printLBrace()
  Print a left brace.
printNewLine()
  Print a new line.
printOtimes()
  Print an otimes symbol.
printRBrace()
  Print a right brace.
printRawString(String)
  An abstract method to print a string with no clever formatting. This is the only method a
printRoman(String)
  Print a string in roman.
printSpace()
  Print a space.
printString(String)
  Print a string.
printSubscript(Printable)
  Print a subscripted term.
printTypewriter(String)
  Print a string in typewriter.

##

Printer

    public Printer();

  Create a new printer.

##

printRawString

    public abstract void printRawString(String s);

  An abstract method to print a string with no clever formatting. This is the only method a subclass needs to implement, all the others have default implementations.

  Parameters:
    s - the string to print.

printString

    public void printString(String s);

  Print a string.

  Parameters:
    s - the string to print.

printNewLine

    public void printNewLine();

  Print a new line.

printRoman

    public void printRoman(String s);

  Print a string in roman.

  Parameters:
    s - the string to print.

printBold

    public void printBold(String s);

  Print a string in roman.

  Parameters:
    s - the string to print.

printItalic

    public void printItalic(String s);

  Print a string in italic.

  Parameters:
    s - the string to print.

printTypewriter

    public void printTypewriter(String s);

  Print a string in typewriter.

  Parameters:
    s - the string to print.

printSpace

    public void printSpace();

  Print a space.

printLBrace

    public void printLBrace();

  Print a left brace.

printArrow

    public void printArrow();

  Print a right arrow.

printRBrace

    public void printRBrace();

  Print a right brace.

printOtimes

    public void printOtimes();

  Print an otimes symbol.

printSubscript

    public void printSubscript(Printable p);

  Print a subscripted term.

  Parameters:
    p - the term to be printed.

printArray

    public void printArray(Printable[] Ps,
                           String separator);

  Print an array of terms.

  Parameters:
    Ps - the terms to be printed.
    separator - the string to print between terms.

print

    public void print(Printable p);

  Print a printable term.

  Parameters:
    p - the term to be printed.

printA

    public void printA(Printable p);

  Print a term as an `atom' (bracketed by default).

  Parameters:
    p - the term to be printed.

printB

    public void printB(Printable p);

  Print a bracketed term.

  Parameters:
    p - the term to be printed.

newLine

    public void newLine();

  Print a new line.

indent

    public void indent();

  Indent by one level.

outdent

    public void outdent();

  Undo one level of indentation.

close

    public void close();

  Close the output stream down.

`[all packages] [package ] [class hierarchy] [index]`

###### Printer.html