APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.print

public Class PrintJob2D

extends PrintJob
Class Inheritance
Imports
java.awt.Dimension, .Frame, .Graphics, .PrintJob, .JobAttributes, .PageAttributes, java.util.Properties, sun.java2d.Disposer, .DisposerRecord

A class which initiates and executes a print job using the underlying PrinterJob graphics conversions.
See Also
java.awt.Toolkit#getPrintJob

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final PrintJobDelegate

Constructor Summary

AccessConstructor and Description
public
PrintJob2D(Frame frame, String doctitle, final Properties props)

public
PrintJob2D(Frame frame, String doctitle, JobAttributes jobAttributes, PageAttributes pageAttributes)

Method Summary

Modifier and TypeMethod and Description
public synchronized void
end()

Implements abstract java.awt.PrintJob.end.

Ends the print job and does any necessary cleanup.

public Graphics
getGraphics()

Implements abstract java.awt.PrintJob.getGraphics.

Gets a Graphics object that will draw to the next page.

public Dimension
getPageDimension()

Implements abstract java.awt.PrintJob.getPageDimension.

Returns the dimensions of the page in pixels.

public int
getPageResolution()

Implements abstract java.awt.PrintJob.getPageResolution.

Returns the resolution of the page in pixels per inch.

public boolean
lastPageFirst()

Implements abstract java.awt.PrintJob.lastPageFirst.

Returns true if the last page will be printed first.

public boolean
Inherited from java.awt.PrintJob:
finalize

Field Detail

printJobDelegateback to summary
private final PrintJobDelegate printJobDelegate

Constructor Detail

PrintJob2Dback to summary
public PrintJob2D(Frame frame, String doctitle, final Properties props)
PrintJob2Dback to summary
public PrintJob2D(Frame frame, String doctitle, JobAttributes jobAttributes, PageAttributes pageAttributes)

Method Detail

endback to summary
public synchronized void end()

Implements abstract java.awt.PrintJob.end.

Ends the print job and does any necessary cleanup.

getGraphicsback to summary
public Graphics getGraphics()

Implements abstract java.awt.PrintJob.getGraphics.

Gets a Graphics object that will draw to the next page. The page is sent to the printer when the graphics object is disposed. This graphics object will also implement the PrintGraphics interface.

See Also
java.awt.PrintGraphics
getPageDimensionback to summary
public Dimension getPageDimension()

Implements abstract java.awt.PrintJob.getPageDimension.

Returns the dimensions of the page in pixels. The resolution of the page is chosen so that it is similar to the screen resolution. Except (since 1.3) when the application specifies a resolution. In that case it is scaled accordingly.

getPageResolutionback to summary
public int getPageResolution()

Implements abstract java.awt.PrintJob.getPageResolution.

Returns the resolution of the page in pixels per inch. Note that this doesn't have to correspond to the physical resolution of the printer.

lastPageFirstback to summary
public boolean lastPageFirst()

Implements abstract java.awt.PrintJob.lastPageFirst.

Returns true if the last page will be printed first.

printDialogback to summary
public boolean printDialog()
sun.print back to summary

private Class PrintJob2D.PrintJobDisposerRecord

extends Object
implements DisposerRecord
Class Inheritance
All Implemented Interfaces
sun.java2d.DisposerRecord

Field Summary

Modifier and TypeField and Description
private final PrintJobDelegate

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

printJobDelegateback to summary
private final PrintJobDelegate printJobDelegate

Constructor Detail

PrintJobDisposerRecordback to summary
pack-priv PrintJobDisposerRecord(PrintJobDelegate delegate)

Method Detail

disposeback to summary
public void dispose()

Implements sun.java2d.DisposerRecord.dispose.