public class PrintDialog
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private LaserCutterSettings |
laserCutterSettings
Contains the settings to be used for the laser cutter.
|
private java.util.ArrayList<Shape> |
preparedShapes
Contains the shapes that are suitable to be used in the print dialog.
|
private java.awt.Frame |
printDialogFrame
Contains the frame of the print dialog window
|
private PrintDialogInstance |
printDialogInstance
The instance which will handle the shapes.
|
private PrintDialogWindow |
printDialogWindow
Contains the object that manages the print dialog window
|
private java.util.ArrayList<PrintInstance> |
printInstances
Contains the print instances to be used in the print dialog
|
private java.util.List<Shape> |
shapes
Contains the shapes that have to be copied and altered to be compatible with the print dialog
|
Constructor and Description |
---|
PrintDialog(java.util.List<Shape> shapes)
Creates an object that initialises a print dialog and calculates the objects
which are necessary for the print dialog
|
Modifier and Type | Method and Description |
---|---|
private PrintDialogWindow |
addPrintDialogFrame(int theWidth,
int theHeight,
java.util.ArrayList<PrintInstance> printInstances)
Creates a new frame and registers a new PrintDialogFrame with it.
|
private void |
calculateInstances()
Determines the print instances.
|
private void |
copyShapes()
This method copies the shapes stored in shapes and stores the copies in preparedShapes.
|
private void |
loadPrintSettings()
This method loads the settings for the laser cutter if any exists.
|
void |
preparePrintDialog()
Prepares the print dialog.
|
private java.util.List<Shape> shapes
private java.util.ArrayList<Shape> preparedShapes
private java.util.ArrayList<PrintInstance> printInstances
private PrintDialogInstance printDialogInstance
private LaserCutterSettings laserCutterSettings
private PrintDialogWindow printDialogWindow
private java.awt.Frame printDialogFrame
public PrintDialog(java.util.List<Shape> shapes)
shapes
- Contains all the shapes which should be printedpublic void preparePrintDialog()
private void loadPrintSettings()
private void copyShapes()
private void calculateInstances()
private PrintDialogWindow addPrintDialogFrame(int theWidth, int theHeight, java.util.ArrayList<PrintInstance> printInstances)
theWidth
- Sets the width of the print dialog window in PxtheHeight
- Sets the height of the print dialog window in PxprintInstances
- The printInstances to be used for the print dialog