public class ImagePrintDialog extends Object implements Printable, ActionListener
Modifier and Type | Class and Description |
---|---|
protected class |
ImagePrintDialog.PrintWorker
Performs all the print calculations in a separate thread.
|
Modifier and Type | Field and Description |
---|---|
protected MainImageDisplay |
imageDisplay
The target image display
|
protected ProgressPanel |
progressPanel
Panel used to display print progress
|
NO_SUCH_PAGE, PAGE_EXISTS
Constructor and Description |
---|
ImagePrintDialog(MainImageDisplay imageDisplay)
Initialize with the target image display object.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
Called for the Print button in the preview window
|
void |
preview()
Display a preview of the image to be printed in a popup window.
|
void |
print()
Prints the contents of the current image display image area.
|
int |
print(Graphics g,
PageFormat pf,
int pageIndex)
For the Printable interface: Render the image contents onto a
printable graphics context.
|
void |
startPrint(String msg)
Initialize printing.
|
protected MainImageDisplay imageDisplay
protected ProgressPanel progressPanel
public ImagePrintDialog(MainImageDisplay imageDisplay)
public void preview()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void print()
public int print(Graphics g, PageFormat pf, int pageIndex) throws PrinterException
print
in interface Printable
PrinterException
public void startPrint(String msg)
msg
- the message for the progress dialogCopyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.