org.rosuda.JGR.util
Class DocumentRenderer

java.lang.Object
  extended by org.rosuda.JGR.util.DocumentRenderer
All Implemented Interfaces:
Printable

public class DocumentRenderer
extends Object
implements Printable


Field Summary
protected  int currentPage
           
protected  JEditorPane jeditorPane
           
protected  double pageEndY
           
protected  double pageStartY
           
protected  PageFormat pFormat
           
protected  PrinterJob pJob
           
protected  boolean scaleWidthToFit
           
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
DocumentRenderer()
           
 
Method Summary
 Document getDocument()
           
 boolean getScaleWidthToFit()
           
 void pageDialog()
           
 int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
           
 void print(HTMLDocument htmlDocument)
           
 void print(JEditorPane jedPane)
           
 void print(PlainDocument plainDocument)
           
protected  void printDialog()
           
protected  boolean printView(Graphics2D graphics2D, Shape allocation, View view)
           
protected  void setContentType(String type)
           
 void setDocument(HTMLDocument htmlDocument)
           
 void setDocument(JEditorPane jedPane)
           
 void setDocument(PlainDocument plainDocument)
           
protected  void setDocument(String type, Document document)
           
 void setScaleWidthToFit(boolean scaleWidth)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentPage

protected int currentPage

jeditorPane

protected JEditorPane jeditorPane

pageEndY

protected double pageEndY

pageStartY

protected double pageStartY

scaleWidthToFit

protected boolean scaleWidthToFit

pFormat

protected PageFormat pFormat

pJob

protected PrinterJob pJob
Constructor Detail

DocumentRenderer

public DocumentRenderer()
Method Detail

getDocument

public Document getDocument()

getScaleWidthToFit

public boolean getScaleWidthToFit()

pageDialog

public void pageDialog()

print

public int print(Graphics graphics,
                 PageFormat pageFormat,
                 int pageIndex)
Specified by:
print in interface Printable

print

public void print(HTMLDocument htmlDocument)

print

public void print(JEditorPane jedPane)

print

public void print(PlainDocument plainDocument)

printDialog

protected void printDialog()

printView

protected boolean printView(Graphics2D graphics2D,
                            Shape allocation,
                            View view)

setContentType

protected void setContentType(String type)

setDocument

public void setDocument(HTMLDocument htmlDocument)

setDocument

public void setDocument(JEditorPane jedPane)

setDocument

public void setDocument(PlainDocument plainDocument)

setDocument

protected void setDocument(String type,
                           Document document)

setScaleWidthToFit

public void setScaleWidthToFit(boolean scaleWidth)