java.awt.Toolkit#getPrintJob
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private PrintRequestAttributeSet | |
| private Graphics2D | currentGraphics
The last Graphics returned to the application via getGraphics. |
| private static final String | |
| private String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private Frame | |
| private PrintJobDelegate. | graphicsDrawn
Used to communicate between the application's thread and the PrinterJob's thread this message queue holds the list of Graphics into which the application has finished drawing, but that have not yet been returned to the PrinterJob thread. |
| private PrintJobDelegate. | graphicsToBeDrawn
The PrinterJob and the application run on different threads and communicate through a pair of message queues. |
| private static final MediaSizeName[] | |
| private JobAttributes | |
| private static final String | |
| private static final String | |
| private static final int[] | |
| private static final String | |
| private static final String | |
| private String | |
| private static final String | |
| private static final String | |
| private PageAttributes | |
| private PageFormat | pageFormat
The size of the page being used for the PrintJob. |
| private int | pageIndex
The zero based index of the page currently being rendered by the application. |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private PrinterJob | printerJob
The PrinterJob being uses to implement the PrintJob. |
| private Thread | printerJobThread
The thread on which PrinterJob is running. |
| private Properties | |
| private static final PageAttributes. | |
| private static final int[] |
| Access | Constructor and Description |
|---|---|
| public | |
| public | PrintJobDelegate(Frame frame, String doctitle, JobAttributes jobAttributes, PageAttributes pageAttributes)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| public synchronized void | |
| public Graphics | |
| public Dimension | |
| public int | |
| private double | |
| private static int[] | |
| private void | initPrintJob2D(Frame frame, String doctitle, JobAttributes jobAttributes, PageAttributes pageAttributes)
|
| public boolean | |
| public static MediaSizeName | |
| public int | Returns: PAGE_EXISTS if the page is rendered successfully or NO_SUCH_PAGE ifpageIndex specifies a
non-existent page.the context into which the page is drawn graphics, PageFormat the size and orientation of the page being drawn pageFormat, int the zero based index of the page to be drawn pageIndex)Implements java. Prints the page at the specified index into the specified
|
| public boolean | |
| public void | |
| private void | |
| private void | |
| private void | |
| public static PageAttributes. | |
| private void |
| A4 | back to summary |
|---|---|
| private static final String A4 | |
| attributes | back to summary |
|---|---|
| private PrintRequestAttributeSet attributes | |
| currentGraphics | back to summary |
|---|---|
| private Graphics2D currentGraphics The last Graphics returned to the application via getGraphics. This is the Graphics into which the application is currently drawing. | |
| DEST_PROP | back to summary |
|---|---|
| private static final String DEST_PROP | |
| docTitle | back to summary |
|---|---|
| private String docTitle | |
| EXECUTIVE | back to summary |
|---|---|
| private static final String EXECUTIVE | |
| FILE | back to summary |
|---|---|
| private static final String FILE | |
| FILENAME_PROP | back to summary |
|---|---|
| private static final String FILENAME_PROP | |
| frame | back to summary |
|---|---|
| private Frame frame | |
| graphicsDrawn | back to summary |
|---|---|
| private PrintJobDelegate. Used to communicate between the application's thread and the PrinterJob's thread this message queue holds the list of Graphics into which the application has finished drawing, but that have not yet been returned to the PrinterJob thread. Again, in practice, the length of this message queue is always 0 or 1. | |
| graphicsToBeDrawn | back to summary |
|---|---|
| private PrintJobDelegate. The PrinterJob and the application run on different threads and communicate through a pair of message queues. This queue is the list of Graphics that the PrinterJob has requested rendering for, but for which the application has not yet called getGraphics(). In practice the length of this message queue is always 0 or 1. | |
| JAVAXSIZES | back to summary |
|---|---|
| private static final MediaSizeName[] JAVAXSIZES | |
| jobAttributes | back to summary |
|---|---|
| private JobAttributes jobAttributes | |
| LANDSCAPE | back to summary |
|---|---|
| private static final String LANDSCAPE | |
| LEGAL | back to summary |
|---|---|
| private static final String LEGAL | |
| LENGTHS | back to summary |
|---|---|
| private static final int[] LENGTHS | |
| LETTER | back to summary |
|---|---|
| private static final String LETTER | |
| NUMCOPIES_PROP | back to summary |
|---|---|
| private static final String NUMCOPIES_PROP | |
| options | back to summary |
|---|---|
| private String options | |
| OPTIONS_PROP | back to summary |
|---|---|
| private static final String OPTIONS_PROP | |
| ORIENT_PROP | back to summary |
|---|---|
| private static final String ORIENT_PROP | |
| pageAttributes | back to summary |
|---|---|
| private PageAttributes pageAttributes | |
| pageFormat | back to summary |
|---|---|
| private PageFormat pageFormat The size of the page being used for the PrintJob. | |
| pageIndex | back to summary |
|---|---|
| private int pageIndex The zero based index of the page currently being rendered by the application. | |
| PAPERSIZE_PROP | back to summary |
|---|---|
| private static final String PAPERSIZE_PROP | |
| PORTRAIT | back to summary |
|---|---|
| private static final String PORTRAIT | |
| PRINTER | back to summary |
|---|---|
| private static final String PRINTER | |
| PRINTER_PROP | back to summary |
|---|---|
| private static final String PRINTER_PROP | |
| printerJob | back to summary |
|---|---|
| private PrinterJob printerJob The PrinterJob being uses to implement the PrintJob. | |
| printerJobThread | back to summary |
|---|---|
| private Thread printerJobThread The thread on which PrinterJob is running. This is different than the applications thread. | |
| props | back to summary |
|---|---|
| private Properties props | |
| SIZES | back to summary |
|---|---|
| private static final PageAttributes. | |
| WIDTHS | back to summary |
|---|---|
| private static final int[] WIDTHS | |
| PrintJobDelegate | back to summary |
|---|---|
| public PrintJobDelegate(Frame frame, String doctitle, final Properties props) | |
| PrintJobDelegate | back to summary |
|---|---|
| public PrintJobDelegate(Frame frame, String doctitle, JobAttributes jobAttributes, PageAttributes pageAttributes) | |
| copyAttributes | back to summary |
|---|---|
| private void copyAttributes(PrintService printServ) | |
| debugPrintAttributes | back to summary |
|---|---|
| private void debugPrintAttributes(boolean ja, boolean pa) | |
| end | back to summary |
|---|---|
| public synchronized void end() Ends the print job and does any necessary cleanup. | |
| getGraphics | back to summary |
|---|---|
| public Graphics 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.
| |
| getPageDimension | back to summary |
|---|---|
| public Dimension 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. | |
| getPageResolution | back to summary |
|---|---|
| public int 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. | |
| getPageResolutionInternal | back to summary |
|---|---|
| private double getPageResolutionInternal() | |
| getSize | back to summary |
|---|---|
| private static int[] getSize(PageAttributes. | |
| initPrintJob2D | back to summary |
|---|---|
| private void initPrintJob2D(Frame frame, String doctitle, JobAttributes jobAttributes, PageAttributes pageAttributes) | |
| lastPageFirst | back to summary |
|---|---|
| public boolean lastPageFirst() Returns true if the last page will be printed first. | |
| mapMedia | back to summary |
|---|---|
| public static MediaSizeName mapMedia(PageAttributes. | |
| back to summary | |
|---|---|
| public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException Implements java. Prints the page at the specified index into the specified
| |
| printDialog | back to summary |
|---|---|
| public boolean printDialog() | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |
| startPrinterJobThread | back to summary |
|---|---|
| private void startPrinterJobThread() | |
| translateInputProps | back to summary |
|---|---|
| private void translateInputProps() | |
| translateOutputProps | back to summary |
|---|---|
| private void translateOutputProps() | |
| unMapMedia | back to summary |
|---|---|
| public static PageAttributes. | |
| updateAttributes | back to summary |
|---|---|
| private void updateAttributes() | |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private ArrayList |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv synchronized boolean | |
| pack-priv synchronized void | |
| pack-priv synchronized void | |
| pack-priv synchronized boolean | |
| pack-priv synchronized Graphics2D |
| qid | back to summary |
|---|---|
| private String qid | |
| queue | back to summary |
|---|---|
| private ArrayList<Graphics2D> queue | |
| MessageQ | back to summary |
|---|---|
| pack-priv MessageQ(String id) | |
| append | back to summary |
|---|---|
| pack-priv synchronized boolean append(Graphics2D g) | |
| close | back to summary |
|---|---|
| pack-priv synchronized void close() | |
| closeWhenEmpty | back to summary |
|---|---|
| pack-priv synchronized void closeWhenEmpty() | |
| isClosed | back to summary |
|---|---|
| pack-priv synchronized boolean isClosed() | |
| pop | back to summary |
|---|---|
| pack-priv synchronized Graphics2D pop() | |