Statistics
| Revision:

root / trunk / libraries / libDwg / src / com / iver / cit / jdwglib / dwg / objects / DwgAttdef.java @ 10012

History | View | Annotate | Download (7.56 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.DwgHandleReference;
40
import com.iver.cit.jdwglib.dwg.DwgObject;
41

    
42
/**
43
 * The DwgAttdef class represents a DWG Attdef
44
 * 
45
 * @author jmorell
46
 */
47
public class DwgAttdef extends DwgObject {
48
        public DwgAttdef(int index) {
49
                super(index);
50
        }
51
        private int dataFlag;
52
        private double elevation;
53
        private Point2D insertionPoint;
54
        private Point2D alignmentPoint;
55
        private double[] extrusion;
56
        private double thickness;
57
        private double obliqueAngle;
58
        private double rotationAngle;
59
        private double height;
60
        private double widthFactor;
61
        private String text;
62
        private int generation;
63
        private int halign;
64
        private int valign;
65
        private String tag;
66
        private int fieldLength;
67
        private int flags;
68
        private String prompt;
69
        private DwgHandleReference styleHandle = null;
70
        
71
        
72
        /* (non-Javadoc)
73
         * @see java.lang.Object#clone()
74
         */
75
        public Object clone() {
76
                DwgAttdef dwgAttdef = new DwgAttdef(index);
77
                dwgAttdef.setType(type);
78
                dwgAttdef.setHandle(handle);
79
                dwgAttdef.setVersion(version);
80
                dwgAttdef.setMode(mode);
81
                dwgAttdef.setLayerHandle(layerHandle);
82
                dwgAttdef.setColor(color);
83
                dwgAttdef.setNumReactors(numReactors);
84
                dwgAttdef.setNoLinks(noLinks);
85
                dwgAttdef.setLinetypeFlags(linetypeFlags);
86
                dwgAttdef.setPlotstyleFlags(plotstyleFlags);
87
                dwgAttdef.setSizeInBits(sizeInBits);
88
                dwgAttdef.setExtendedData(extendedData);
89
                dwgAttdef.setGraphicData(graphicData);
90
                //dwgAttdef.setInsideBlock(insideBlock);
91
                dwgAttdef.setDataFlag(dataFlag);
92
                dwgAttdef.setElevation(elevation);
93
                dwgAttdef.setInsertionPoint(insertionPoint);
94
                dwgAttdef.setAlignmentPoint(alignmentPoint);
95
                dwgAttdef.setExtrusion(extrusion);
96
                dwgAttdef.setThickness(thickness);
97
                dwgAttdef.setObliqueAngle(obliqueAngle);
98
                dwgAttdef.setRotationAngle(rotationAngle);
99
                dwgAttdef.setHeight(height);
100
                dwgAttdef.setWidthFactor(widthFactor);
101
                dwgAttdef.setText(text);
102
                dwgAttdef.setGeneration(generation);
103
                dwgAttdef.setHalign(halign);
104
                dwgAttdef.setValign(valign);
105
                dwgAttdef.setTag(tag);
106
                dwgAttdef.setFieldLength(fieldLength);
107
                dwgAttdef.setFlags(flags);
108
                dwgAttdef.setPrompt(prompt);
109
                dwgAttdef.setStyleHandle(styleHandle);
110
                return dwgAttdef;
111
        }
112
        /**
113
         * @return Returns the alignmentPoint.
114
         */
115
        public Point2D getAlignmentPoint() {
116
                return alignmentPoint;
117
        }
118
        /**
119
         * @param alignmentPoint The alignmentPoint to set.
120
         */
121
        public void setAlignmentPoint(Point2D alignmentPoint) {
122
                this.alignmentPoint = alignmentPoint;
123
        }
124
        /**
125
         * @return Returns the dataFlag.
126
         */
127
        public int getDataFlag() {
128
                return dataFlag;
129
        }
130
        /**
131
         * @param dataFlag The dataFlag to set.
132
         */
133
        public void setDataFlag(int dataFlag) {
134
                this.dataFlag = dataFlag;
135
        }
136
        /**
137
         * @return Returns the elevation.
138
         */
139
        public double getElevation() {
140
                return elevation;
141
        }
142
        /**
143
         * @param elevation The elevation to set.
144
         */
145
        public void setElevation(double elevation) {
146
                this.elevation = elevation;
147
        }
148
        /**
149
         * @return Returns the extrusion.
150
         */
151
        public double[] getExtrusion() {
152
                return extrusion;
153
        }
154
        /**
155
         * @param extrusion The extrusion to set.
156
         */
157
        public void setExtrusion(double[] extrusion) {
158
                this.extrusion = extrusion;
159
        }
160
        /**
161
         * @return Returns the fieldLength.
162
         */
163
        public int getFieldLength() {
164
                return fieldLength;
165
        }
166
        /**
167
         * @param fieldLength The fieldLength to set.
168
         */
169
        public void setFieldLength(int fieldLength) {
170
                this.fieldLength = fieldLength;
171
        }
172
        /**
173
         * @return Returns the flags.
174
         */
175
        public int getFlags() {
176
                return flags;
177
        }
178
        /**
179
         * @param flags The flags to set.
180
         */
181
        public void setFlags(int flags) {
182
                this.flags = flags;
183
        }
184
        /**
185
         * @return Returns the generation.
186
         */
187
        public int getGeneration() {
188
                return generation;
189
        }
190
        /**
191
         * @param generation The generation to set.
192
         */
193
        public void setGeneration(int generation) {
194
                this.generation = generation;
195
        }
196
        /**
197
         * @return Returns the halign.
198
         */
199
        public int getHalign() {
200
                return halign;
201
        }
202
        /**
203
         * @param halign The halign to set.
204
         */
205
        public void setHalign(int halign) {
206
                this.halign = halign;
207
        }
208
        /**
209
         * @return Returns the height.
210
         */
211
        public double getHeight() {
212
                return height;
213
        }
214
        /**
215
         * @param height The height to set.
216
         */
217
        public void setHeight(double height) {
218
                this.height = height;
219
        }
220
        /**
221
         * @return Returns the insertionPoint.
222
         */
223
        public Point2D getInsertionPoint() {
224
                return insertionPoint;
225
        }
226
        /**
227
         * @param insertionPoint The insertionPoint to set.
228
         */
229
        public void setInsertionPoint(Point2D insertionPoint) {
230
                this.insertionPoint = insertionPoint;
231
        }
232
        /**
233
         * @return Returns the obliqueAngle.
234
         */
235
        public double getObliqueAngle() {
236
                return obliqueAngle;
237
        }
238
        /**
239
         * @param obliqueAngle The obliqueAngle to set.
240
         */
241
        public void setObliqueAngle(double obliqueAngle) {
242
                this.obliqueAngle = obliqueAngle;
243
        }
244
        /**
245
         * @return Returns the prompt.
246
         */
247
        public String getPrompt() {
248
                return prompt;
249
        }
250
        /**
251
         * @param prompt The prompt to set.
252
         */
253
        public void setPrompt(String prompt) {
254
                this.prompt = prompt;
255
        }
256
        /**
257
         * @return Returns the rotationAngle.
258
         */
259
        public double getRotationAngle() {
260
                return rotationAngle;
261
        }
262
        /**
263
         * @param rotationAngle The rotationAngle to set.
264
         */
265
        public void setRotationAngle(double rotationAngle) {
266
                this.rotationAngle = rotationAngle;
267
        }
268
        /**
269
         * @return Returns the styleHandle.
270
         */
271
        public DwgHandleReference getStyleHandle() {
272
                return styleHandle;
273
        }
274
        /**
275
         * @param styleHandle The styleHandle to set.
276
         */
277
        public void setStyleHandle(DwgHandleReference styleHandle) {
278
                this.styleHandle = styleHandle;
279
        }
280
        /**
281
         * @return Returns the tag.
282
         */
283
        public String getTag() {
284
                return tag;
285
        }
286
        /**
287
         * @param tag The tag to set.
288
         */
289
        public void setTag(String tag) {
290
                this.tag = tag;
291
        }
292
        /**
293
         * @return Returns the text.
294
         */
295
        public String getText() {
296
                return text;
297
        }
298
        /**
299
         * @param text The text to set.
300
         */
301
        public void setText(String text) {
302
                this.text = text;
303
        }
304
        /**
305
         * @return Returns the thickness.
306
         */
307
        public double getThickness() {
308
                return thickness;
309
        }
310
        /**
311
         * @param thickness The thickness to set.
312
         */
313
        public void setThickness(double thickness) {
314
                this.thickness = thickness;
315
        }
316
        /**
317
         * @return Returns the valign.
318
         */
319
        public int getValign() {
320
                return valign;
321
        }
322
        /**
323
         * @param valign The valign to set.
324
         */
325
        public void setValign(int valign) {
326
                this.valign = valign;
327
        }
328
        /**
329
         * @return Returns the widthFactor.
330
         */
331
        public double getWidthFactor() {
332
                return widthFactor;
333
        }
334
        /**
335
         * @param widthFactor The widthFactor to set.
336
         */
337
        public void setWidthFactor(double widthFactor) {
338
                this.widthFactor = widthFactor;
339
        }
340
}