Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/**
* This file is part of VisiCut.
* Copyright (C) 2011 Thomas Oster <thomas.oster@rwth-aachen.de>
* RWTH Aachen University - 52062 Aachen, Germany
*
* VisiCut is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* VisiCut is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with VisiCut. If not, see <http://www.gnu.org/licenses/>.
**/
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.t_oster.liblasercut;
/**
*
* @author Thomas Oster <thomas.oster@rwth-aachen.de>
*/
public class LaserJob
{
private String title;
private String name;
private String user;
private int resolution;
private int startX = 0;
private int startY = 0;
private VectorPart vPart;
private Raster3dPart r3dPart;
private RasterPart rPart;
public LaserJob(String title, String name, String user, int resolution, Raster3dPart r3dp, VectorPart vp, RasterPart rp)
{
this.title = title;
this.name = name;
this.user = user;
this.resolution = resolution;
this.vPart = vp;
this.r3dPart = r3dp;
this.rPart = rp;
}
public void setStartPoint(int x, int y)
{
startX = x;
startY = y;
}
public int getStartX()
{
return startX;
}
public int getStartY()
{
return startY;
}
public String getTitle()
{
return title;
}
public String getName()
{
return name;
}
public String getUser()
{
return user;
}
public boolean contains3dRaster()
{
return r3dPart != null && r3dPart.getRasterCount() > 0;
}
public boolean containsVector()
{
return vPart != null && vPart.getCommandList().length > 3;//every vector part starts with 3 commands
}
public boolean containsRaster()
{
return rPart != null && rPart.getRasterCount() > 0;
}
public int getResolution()
{
return resolution;
}
public VectorPart getVectorPart()
{
return vPart;
}
public Raster3dPart getRaster3dPart()
{
return r3dPart;
}
public RasterPart getRasterPart()
{
return rPart;
}
}