voji.ui
Class JPrintPreview.PrintPreviewPrintJob

java.lang.Object
  |
  +--java.awt.PrintJob
        |
        +--voji.ui.JPrintPreview.PrintPreviewPrintJob
Enclosing class:
JPrintPreview

protected class JPrintPreview.PrintPreviewPrintJob
extends java.awt.PrintJob

This is the table model for ResultTables


Field Summary
protected  PageGraphics pageGraphics
          The internal page graphics object
protected  java.awt.PrintJob templatePrintJob
          The template print job
 
Constructor Summary
JPrintPreview.PrintPreviewPrintJob(java.awt.PrintJob templatePrintJob)
          Constructs a PrintPreviewPrintJob using the given template.
 
Method Summary
 void end()
          Ends the print job and does any necessary cleanup.
 java.awt.Graphics getGraphics()
          Gets a Graphics object that will draw to the next page.
 java.awt.Dimension getPageDimension()
          Returns the dimensions of the page in pixels
 int getPageResolution()
          Returns the resolution of the page in pixels per inch.
 boolean lastPageFirst()
          Returns true if the last page will be printed first.
 
Methods inherited from class java.awt.PrintJob
finalize
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

templatePrintJob

protected java.awt.PrintJob templatePrintJob
The template print job


pageGraphics

protected PageGraphics pageGraphics
The internal page graphics object

Constructor Detail

JPrintPreview.PrintPreviewPrintJob

public JPrintPreview.PrintPreviewPrintJob(java.awt.PrintJob templatePrintJob)
Constructs a PrintPreviewPrintJob using the given template. It behaves as the template print job, but it draws the pages into a JPrintPreview.

Parameters:
templatePrintJob - the PrintJob that should be used as a template for this print job.
Method Detail

getGraphics

public java.awt.Graphics getGraphics()
Gets a Graphics object that will draw to the next page. This graphics object will not implement the PrintGraphics interface, so you should embed it into a CopyPrintJob.

Specified by:
getGraphics in class java.awt.PrintJob
Returns:
a PageGraphics object which draws to the next page.

getPageDimension

public java.awt.Dimension getPageDimension()
Returns the dimensions of the page in pixels

Specified by:
getPageDimension in class java.awt.PrintJob

getPageResolution

public int getPageResolution()
Returns the resolution of the page in pixels per inch. Since this is a preview, this will return the screen resolution.

Specified by:
getPageResolution in class java.awt.PrintJob

lastPageFirst

public boolean lastPageFirst()
Returns true if the last page will be printed first. Since this is a preview, this will always return false.

Specified by:
lastPageFirst in class java.awt.PrintJob

end

public void end()
Ends the print job and does any necessary cleanup. This method unlocks the preview. Only unlocked previews can create a new print job.

Specified by:
end in class java.awt.PrintJob