The Graphics object returned by the getGraphics() method of PrintJob always implements this PrintGraphics interface. You can use this fact to distinguish a Graphics object that draws to the screen from one that generates hardcopy. This is a useful thing to do in a paint() method when you want to generate hardcopy that differs somewhat from what is displayed on-screen.
The getPrintJob() method defined by this interface can also be used, of course, to return the PrintJob with which the PrintGraphics object is associated.
public abstract interface PrintGraphics { // Public Instance Methods public abstract PrintJob getPrintJob(); }
This HTML Help has been published using the chm2web software. |