class PrintSubInstance
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
dpi
Stores the DPI used for the raster, cut through and engrave vector parts.
|
private LaserJobCreator |
laserJob
The laser job that is used when the plate is about to be cut
|
private PrintInstance |
parent
The printInstance where the plate belongs to.
|
private java.awt.Frame |
printSubDialogFrame
The frame containing the confirmation dialog
|
private PrintSubDialogWindow |
printSubDialogWindow
The confirmation dialog that is called before the laser job is send
to the laser cutter
|
private java.util.ArrayList<Shape> |
shapesPlaced
Stores the shapes with all of their properties placed on this plate
|
Constructor and Description |
---|
PrintSubInstance(PrintInstance parent)
Creates a new object of type printSubInstance.
|
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
checkOverlap()
Checks whether shapes placed on the plate do not overlap.
|
private PrintSubDialogWindow |
createPrintSubDialog(java.lang.String printJobName)
Creates the print confirmation window for this printSubInstance (plate).
|
(package private) java.util.ArrayList<Shape> |
getPlacedShapes()
Returns all the shapes that have been placed on the plate
|
(package private) void |
nextJob()
Signals that the cutting process is finished.
|
(package private) void |
placeShape(Shape shape)
Signals that the shape contained in the parameter has been placed on the plate.
|
(package private) void |
print(java.lang.String printJobName)
Singals that the plate with its placed shapes should be printed.
|
(package private) void |
printSVG(java.lang.String exportPath)
This method exports the layout of the placed shapes on the plate as SVG.
|
(package private) void |
sendLaserJob()
Signals that the plate is ready to be cut.
|
(package private) void |
setDPI(int dpi)
Sets the DPI that is needed to create a vector or raster part for a laser job.
|
(package private) void |
setLaserCutter(LaserCutter cutter,
java.lang.String ipAddress)
Sets the laser cutter in the laser job associates with the plate which will be cut.
|
(package private) void |
unplaceShape(Shape shape)
Signals that the shape contained in the parameter has been removed from the plate.
|
private java.util.ArrayList<Shape> shapesPlaced
private LaserJobCreator laserJob
private PrintSubDialogWindow printSubDialogWindow
private java.awt.Frame printSubDialogFrame
private PrintInstance parent
private int dpi
PrintSubInstance(PrintInstance parent)
parent
- The printInstance the printSubInstance belongs to.
In the printInstance the unplaced shapes for the material of the plate is stored.
The printInstance manages several function of its printSubInstances.
To be able to signal whether the printSubInstance is ready, with for example cutting,
it needs to know the printInstance to who it belongs.void setLaserCutter(LaserCutter cutter, java.lang.String ipAddress)
cutter
- An enum emulator that entails the type of the laser cutteripAddress
- The address of the laser cutter as a String. Can be a ip address, host name or port.void placeShape(Shape shape)
shape
- The shape that has been added to the platevoid unplaceShape(Shape shape)
shape
- The shape that has been removed from the platejava.util.ArrayList<Shape> getPlacedShapes()
void print(java.lang.String printJobName)
printJobName
- The name, thickness of the material and the printSubInstance number of the platevoid setDPI(int dpi)
dpi
- The dpi to be used for the cuttingvoid sendLaserJob()
void nextJob()
private PrintSubDialogWindow createPrintSubDialog(java.lang.String printJobName)
printJobName
- The name of the job the print confirmation window belongs to. The name consists
of the name and thickness of the material the plate belongs to and the
printSubInstance number of the platevoid printSVG(java.lang.String exportPath)
printJobName
- The path the where the SVG File should be exportedboolean checkOverlap()