edu.rice.cs.drjava.model.print
Class DrJavaBook
java.lang.Object
edu.rice.cs.drjava.model.print.DrJavaBook
- All Implemented Interfaces:
- Pageable
public class DrJavaBook
- extends Object
- implements Pageable
The DrJavaBook class is DrJava's implementation of a Pageable object. It
serves as the control class for printing, and is responsible for
preparing the print job of previewing or printing given the String
representation of the document.
- Version:
- $Id: DrJavaBook.java 4447 2008-04-18 16:06:34Z rcartwright $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PRINT_FONT
public static final Font PRINT_FONT
FOOTER_FONT
public static final Font FOOTER_FONT
LINE_FONT
public static final Font LINE_FONT
LINE_NUM_WIDTH
public float LINE_NUM_WIDTH
DrJavaBook
public DrJavaBook(String text,
String fileName,
PageFormat format)
- Constructs a DrJavaBook which a given content text, filename, and pageformat.
getNumberOfPages
public int getNumberOfPages()
- Specified by:
getNumberOfPages
in interface Pageable
- Returns:
- The number of pages in this print job.
getPageFormat
public PageFormat getPageFormat(int pageIndex)
- Returns the PageFormat for this print job.
- Specified by:
getPageFormat
in interface Pageable
- Parameters:
pageIndex
- The page number
- Returns:
- the PageFormat of this print job.
getPrintable
public Printable getPrintable(int pageIndex)
- Returns the Printable object for a given page.
- Specified by:
getPrintable
in interface Pageable
- Parameters:
pageIndex
- The page number.
- Returns:
- The Printable object for the given page.