root / trunk / libraries / libDwg / src / com / iver / cit / jdwglib / dwg / objects / DwgAttdef.java @ 9927
History | View | Annotate | Download (7.46 KB)
1 |
/* jdwglib. Java Library for reading Dwg files.
|
---|---|
2 |
*
|
3 |
* Author: Jose Morell Rama (jose.morell@gmail.com).
|
4 |
* Port from the Pythoncad Dwg library by Art Haas.
|
5 |
*
|
6 |
* Copyright (C) 2005 Jose Morell, IVER TI S.A. and Generalitat Valenciana
|
7 |
*
|
8 |
* This program is free software; you can redistribute it and/or
|
9 |
* modify it under the terms of the GNU General Public License
|
10 |
* as published by the Free Software Foundation; either version 2
|
11 |
* of the License, or (at your option) any later version.
|
12 |
*
|
13 |
* This program is distributed in the hope that it will be useful,
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16 |
* GNU General Public License for more details.
|
17 |
*
|
18 |
* You should have received a copy of the GNU General Public License
|
19 |
* along with this program; if not, write to the Free Software
|
20 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
21 |
*
|
22 |
* For more information, contact:
|
23 |
*
|
24 |
* Jose Morell (jose.morell@gmail.com)
|
25 |
*
|
26 |
* or
|
27 |
*
|
28 |
* IVER TI S.A.
|
29 |
* C/Salamanca, 50
|
30 |
* 46005 Valencia
|
31 |
* Spain
|
32 |
* +34 963163400
|
33 |
* dac@iver.es
|
34 |
*/
|
35 |
package com.iver.cit.jdwglib.dwg.objects; |
36 |
|
37 |
import java.awt.geom.Point2D; |
38 |
|
39 |
import com.iver.cit.jdwglib.dwg.DwgObject; |
40 |
|
41 |
/**
|
42 |
* The DwgAttdef class represents a DWG Attdef
|
43 |
*
|
44 |
* @author jmorell
|
45 |
*/
|
46 |
public class DwgAttdef extends DwgObject { |
47 |
public DwgAttdef(int index) { |
48 |
super(index);
|
49 |
} |
50 |
private int dataFlag; |
51 |
private double elevation; |
52 |
private Point2D insertionPoint; |
53 |
private Point2D alignmentPoint; |
54 |
private double[] extrusion; |
55 |
private double thickness; |
56 |
private double obliqueAngle; |
57 |
private double rotationAngle; |
58 |
private double height; |
59 |
private double widthFactor; |
60 |
private String text; |
61 |
private int generation; |
62 |
private int halign; |
63 |
private int valign; |
64 |
private String tag; |
65 |
private int fieldLength; |
66 |
private int flags; |
67 |
private String prompt; |
68 |
private int styleHandle; |
69 |
|
70 |
|
71 |
/* (non-Javadoc)
|
72 |
* @see java.lang.Object#clone()
|
73 |
*/
|
74 |
public Object clone() { |
75 |
DwgAttdef dwgAttdef = new DwgAttdef(index);
|
76 |
dwgAttdef.setType(type); |
77 |
dwgAttdef.setHandle(handle); |
78 |
dwgAttdef.setVersion(version); |
79 |
dwgAttdef.setMode(mode); |
80 |
dwgAttdef.setLayerHandle(layerHandle); |
81 |
dwgAttdef.setColor(color); |
82 |
dwgAttdef.setNumReactors(numReactors); |
83 |
dwgAttdef.setNoLinks(noLinks); |
84 |
dwgAttdef.setLinetypeFlags(linetypeFlags); |
85 |
dwgAttdef.setPlotstyleFlags(plotstyleFlags); |
86 |
dwgAttdef.setSizeInBits(sizeInBits); |
87 |
dwgAttdef.setExtendedData(extendedData); |
88 |
dwgAttdef.setGraphicData(graphicData); |
89 |
//dwgAttdef.setInsideBlock(insideBlock);
|
90 |
dwgAttdef.setDataFlag(dataFlag); |
91 |
dwgAttdef.setElevation(elevation); |
92 |
dwgAttdef.setInsertionPoint(insertionPoint); |
93 |
dwgAttdef.setAlignmentPoint(alignmentPoint); |
94 |
dwgAttdef.setExtrusion(extrusion); |
95 |
dwgAttdef.setThickness(thickness); |
96 |
dwgAttdef.setObliqueAngle(obliqueAngle); |
97 |
dwgAttdef.setRotationAngle(rotationAngle); |
98 |
dwgAttdef.setHeight(height); |
99 |
dwgAttdef.setWidthFactor(widthFactor); |
100 |
dwgAttdef.setText(text); |
101 |
dwgAttdef.setGeneration(generation); |
102 |
dwgAttdef.setHalign(halign); |
103 |
dwgAttdef.setValign(valign); |
104 |
dwgAttdef.setTag(tag); |
105 |
dwgAttdef.setFieldLength(fieldLength); |
106 |
dwgAttdef.setFlags(flags); |
107 |
dwgAttdef.setPrompt(prompt); |
108 |
dwgAttdef.setStyleHandle(styleHandle); |
109 |
return dwgAttdef;
|
110 |
} |
111 |
/**
|
112 |
* @return Returns the alignmentPoint.
|
113 |
*/
|
114 |
public Point2D getAlignmentPoint() { |
115 |
return alignmentPoint;
|
116 |
} |
117 |
/**
|
118 |
* @param alignmentPoint The alignmentPoint to set.
|
119 |
*/
|
120 |
public void setAlignmentPoint(Point2D alignmentPoint) { |
121 |
this.alignmentPoint = alignmentPoint;
|
122 |
} |
123 |
/**
|
124 |
* @return Returns the dataFlag.
|
125 |
*/
|
126 |
public int getDataFlag() { |
127 |
return dataFlag;
|
128 |
} |
129 |
/**
|
130 |
* @param dataFlag The dataFlag to set.
|
131 |
*/
|
132 |
public void setDataFlag(int dataFlag) { |
133 |
this.dataFlag = dataFlag;
|
134 |
} |
135 |
/**
|
136 |
* @return Returns the elevation.
|
137 |
*/
|
138 |
public double getElevation() { |
139 |
return elevation;
|
140 |
} |
141 |
/**
|
142 |
* @param elevation The elevation to set.
|
143 |
*/
|
144 |
public void setElevation(double elevation) { |
145 |
this.elevation = elevation;
|
146 |
} |
147 |
/**
|
148 |
* @return Returns the extrusion.
|
149 |
*/
|
150 |
public double[] getExtrusion() { |
151 |
return extrusion;
|
152 |
} |
153 |
/**
|
154 |
* @param extrusion The extrusion to set.
|
155 |
*/
|
156 |
public void setExtrusion(double[] extrusion) { |
157 |
this.extrusion = extrusion;
|
158 |
} |
159 |
/**
|
160 |
* @return Returns the fieldLength.
|
161 |
*/
|
162 |
public int getFieldLength() { |
163 |
return fieldLength;
|
164 |
} |
165 |
/**
|
166 |
* @param fieldLength The fieldLength to set.
|
167 |
*/
|
168 |
public void setFieldLength(int fieldLength) { |
169 |
this.fieldLength = fieldLength;
|
170 |
} |
171 |
/**
|
172 |
* @return Returns the flags.
|
173 |
*/
|
174 |
public int getFlags() { |
175 |
return flags;
|
176 |
} |
177 |
/**
|
178 |
* @param flags The flags to set.
|
179 |
*/
|
180 |
public void setFlags(int flags) { |
181 |
this.flags = flags;
|
182 |
} |
183 |
/**
|
184 |
* @return Returns the generation.
|
185 |
*/
|
186 |
public int getGeneration() { |
187 |
return generation;
|
188 |
} |
189 |
/**
|
190 |
* @param generation The generation to set.
|
191 |
*/
|
192 |
public void setGeneration(int generation) { |
193 |
this.generation = generation;
|
194 |
} |
195 |
/**
|
196 |
* @return Returns the halign.
|
197 |
*/
|
198 |
public int getHalign() { |
199 |
return halign;
|
200 |
} |
201 |
/**
|
202 |
* @param halign The halign to set.
|
203 |
*/
|
204 |
public void setHalign(int halign) { |
205 |
this.halign = halign;
|
206 |
} |
207 |
/**
|
208 |
* @return Returns the height.
|
209 |
*/
|
210 |
public double getHeight() { |
211 |
return height;
|
212 |
} |
213 |
/**
|
214 |
* @param height The height to set.
|
215 |
*/
|
216 |
public void setHeight(double height) { |
217 |
this.height = height;
|
218 |
} |
219 |
/**
|
220 |
* @return Returns the insertionPoint.
|
221 |
*/
|
222 |
public Point2D getInsertionPoint() { |
223 |
return insertionPoint;
|
224 |
} |
225 |
/**
|
226 |
* @param insertionPoint The insertionPoint to set.
|
227 |
*/
|
228 |
public void setInsertionPoint(Point2D insertionPoint) { |
229 |
this.insertionPoint = insertionPoint;
|
230 |
} |
231 |
/**
|
232 |
* @return Returns the obliqueAngle.
|
233 |
*/
|
234 |
public double getObliqueAngle() { |
235 |
return obliqueAngle;
|
236 |
} |
237 |
/**
|
238 |
* @param obliqueAngle The obliqueAngle to set.
|
239 |
*/
|
240 |
public void setObliqueAngle(double obliqueAngle) { |
241 |
this.obliqueAngle = obliqueAngle;
|
242 |
} |
243 |
/**
|
244 |
* @return Returns the prompt.
|
245 |
*/
|
246 |
public String getPrompt() { |
247 |
return prompt;
|
248 |
} |
249 |
/**
|
250 |
* @param prompt The prompt to set.
|
251 |
*/
|
252 |
public void setPrompt(String prompt) { |
253 |
this.prompt = prompt;
|
254 |
} |
255 |
/**
|
256 |
* @return Returns the rotationAngle.
|
257 |
*/
|
258 |
public double getRotationAngle() { |
259 |
return rotationAngle;
|
260 |
} |
261 |
/**
|
262 |
* @param rotationAngle The rotationAngle to set.
|
263 |
*/
|
264 |
public void setRotationAngle(double rotationAngle) { |
265 |
this.rotationAngle = rotationAngle;
|
266 |
} |
267 |
/**
|
268 |
* @return Returns the styleHandle.
|
269 |
*/
|
270 |
public int getStyleHandle() { |
271 |
return styleHandle;
|
272 |
} |
273 |
/**
|
274 |
* @param styleHandle The styleHandle to set.
|
275 |
*/
|
276 |
public void setStyleHandle(int styleHandle) { |
277 |
this.styleHandle = styleHandle;
|
278 |
} |
279 |
/**
|
280 |
* @return Returns the tag.
|
281 |
*/
|
282 |
public String getTag() { |
283 |
return tag;
|
284 |
} |
285 |
/**
|
286 |
* @param tag The tag to set.
|
287 |
*/
|
288 |
public void setTag(String tag) { |
289 |
this.tag = tag;
|
290 |
} |
291 |
/**
|
292 |
* @return Returns the text.
|
293 |
*/
|
294 |
public String getText() { |
295 |
return text;
|
296 |
} |
297 |
/**
|
298 |
* @param text The text to set.
|
299 |
*/
|
300 |
public void setText(String text) { |
301 |
this.text = text;
|
302 |
} |
303 |
/**
|
304 |
* @return Returns the thickness.
|
305 |
*/
|
306 |
public double getThickness() { |
307 |
return thickness;
|
308 |
} |
309 |
/**
|
310 |
* @param thickness The thickness to set.
|
311 |
*/
|
312 |
public void setThickness(double thickness) { |
313 |
this.thickness = thickness;
|
314 |
} |
315 |
/**
|
316 |
* @return Returns the valign.
|
317 |
*/
|
318 |
public int getValign() { |
319 |
return valign;
|
320 |
} |
321 |
/**
|
322 |
* @param valign The valign to set.
|
323 |
*/
|
324 |
public void setValign(int valign) { |
325 |
this.valign = valign;
|
326 |
} |
327 |
/**
|
328 |
* @return Returns the widthFactor.
|
329 |
*/
|
330 |
public double getWidthFactor() { |
331 |
return widthFactor;
|
332 |
} |
333 |
/**
|
334 |
* @param widthFactor The widthFactor to set.
|
335 |
*/
|
336 |
public void setWidthFactor(double widthFactor) { |
337 |
this.widthFactor = widthFactor;
|
338 |
} |
339 |
} |