Statistics
| Revision:

svn-gvsig-desktop / branches / v10 / libraries / libDwg / src / com / iver / cit / jdwglib / dwg / objects / DwgAttdef.java @ 10539

History | View | Annotate | Download (7.08 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
        /**
73
         * @return Returns the alignmentPoint.
74
         */
75
        public Point2D getAlignmentPoint() {
76
                return alignmentPoint;
77
        }
78
        /**
79
         * @param alignmentPoint The alignmentPoint to set.
80
         */
81
        public void setAlignmentPoint(Point2D alignmentPoint) {
82
                this.alignmentPoint = alignmentPoint;
83
        }
84
        /**
85
         * @return Returns the dataFlag.
86
         */
87
        public int getDataFlag() {
88
                return dataFlag;
89
        }
90
        /**
91
         * @param dataFlag The dataFlag to set.
92
         */
93
        public void setDataFlag(int dataFlag) {
94
                this.dataFlag = dataFlag;
95
        }
96
        /**
97
         * @return Returns the elevation.
98
         */
99
        public double getElevation() {
100
                return elevation;
101
        }
102
        /**
103
         * @param elevation The elevation to set.
104
         */
105
        public void setElevation(double elevation) {
106
                this.elevation = elevation;
107
        }
108
        /**
109
         * @return Returns the extrusion.
110
         */
111
        public double[] getExtrusion() {
112
                return extrusion;
113
        }
114
        /**
115
         * @param extrusion The extrusion to set.
116
         */
117
        public void setExtrusion(double[] extrusion) {
118
                this.extrusion = extrusion;
119
        }
120
        /**
121
         * @return Returns the fieldLength.
122
         */
123
        public int getFieldLength() {
124
                return fieldLength;
125
        }
126
        /**
127
         * @param fieldLength The fieldLength to set.
128
         */
129
        public void setFieldLength(int fieldLength) {
130
                this.fieldLength = fieldLength;
131
        }
132
        /**
133
         * @return Returns the flags.
134
         */
135
        public int getFlags() {
136
                return flags;
137
        }
138
        /**
139
         * @param flags The flags to set.
140
         */
141
        public void setFlags(int flags) {
142
                this.flags = flags;
143
        }
144
        /**
145
         * @return Returns the generation.
146
         */
147
        public int getGeneration() {
148
                return generation;
149
        }
150
        /**
151
         * @param generation The generation to set.
152
         */
153
        public void setGeneration(int generation) {
154
                this.generation = generation;
155
        }
156
        /**
157
         * @return Returns the halign.
158
         */
159
        public int getHalign() {
160
                return halign;
161
        }
162
        /**
163
         * @param halign The halign to set.
164
         */
165
        public void setHalign(int halign) {
166
                this.halign = halign;
167
        }
168
        /**
169
         * @return Returns the height.
170
         */
171
        public double getHeight() {
172
                return height;
173
        }
174
        /**
175
         * @param height The height to set.
176
         */
177
        public void setHeight(double height) {
178
                this.height = height;
179
        }
180
        /**
181
         * @return Returns the insertionPoint.
182
         */
183
        public Point2D getInsertionPoint() {
184
                return insertionPoint;
185
        }
186
        /**
187
         * @param insertionPoint The insertionPoint to set.
188
         */
189
        public void setInsertionPoint(Point2D insertionPoint) {
190
                this.insertionPoint = insertionPoint;
191
        }
192
        /**
193
         * @return Returns the obliqueAngle.
194
         */
195
        public double getObliqueAngle() {
196
                return obliqueAngle;
197
        }
198
        /**
199
         * @param obliqueAngle The obliqueAngle to set.
200
         */
201
        public void setObliqueAngle(double obliqueAngle) {
202
                this.obliqueAngle = obliqueAngle;
203
        }
204
        /**
205
         * @return Returns the prompt.
206
         */
207
        public String getPrompt() {
208
                return prompt;
209
        }
210
        /**
211
         * @param prompt The prompt to set.
212
         */
213
        public void setPrompt(String prompt) {
214
                this.prompt = prompt;
215
        }
216
        /**
217
         * @return Returns the rotationAngle.
218
         */
219
        public double getRotationAngle() {
220
                return rotationAngle;
221
        }
222
        /**
223
         * @param rotationAngle The rotationAngle to set.
224
         */
225
        public void setRotationAngle(double rotationAngle) {
226
                this.rotationAngle = rotationAngle;
227
        }
228
        /**
229
         * @return Returns the styleHandle.
230
         */
231
        public DwgHandleReference getStyleHandle() {
232
                return styleHandle;
233
        }
234
        /**
235
         * @param styleHandle The styleHandle to set.
236
         */
237
        public void setStyleHandle(DwgHandleReference styleHandle) {
238
                this.styleHandle = styleHandle;
239
        }
240
        /**
241
         * @return Returns the tag.
242
         */
243
        public String getTag() {
244
                return tag;
245
        }
246
        /**
247
         * @param tag The tag to set.
248
         */
249
        public void setTag(String tag) {
250
                this.tag = tag;
251
        }
252
        /**
253
         * @return Returns the text.
254
         */
255
        public String getText() {
256
                return text;
257
        }
258
        /**
259
         * @param text The text to set.
260
         */
261
        public void setText(String text) {
262
                this.text = text;
263
        }
264
        /**
265
         * @return Returns the thickness.
266
         */
267
        public double getThickness() {
268
                return thickness;
269
        }
270
        /**
271
         * @param thickness The thickness to set.
272
         */
273
        public void setThickness(double thickness) {
274
                this.thickness = thickness;
275
        }
276
        /**
277
         * @return Returns the valign.
278
         */
279
        public int getValign() {
280
                return valign;
281
        }
282
        /**
283
         * @param valign The valign to set.
284
         */
285
        public void setValign(int valign) {
286
                this.valign = valign;
287
        }
288
        /**
289
         * @return Returns the widthFactor.
290
         */
291
        public double getWidthFactor() {
292
                return widthFactor;
293
        }
294
        /**
295
         * @param widthFactor The widthFactor to set.
296
         */
297
        public void setWidthFactor(double widthFactor) {
298
                this.widthFactor = widthFactor;
299
        }
300

    
301
        /* (non-Javadoc)
302
         * @see java.lang.Object#clone()
303
         */
304
        public Object clone(){
305
                DwgAttdef obj = new DwgAttdef(index);
306
                this.fill(obj);
307
                return obj;
308
        }
309
        
310
        protected void fill(DwgObject obj){
311
                super.fill(obj);
312
                DwgAttdef myObj = (DwgAttdef)obj;
313

    
314
                myObj.setAlignmentPoint(alignmentPoint);
315
                myObj.setDataFlag(dataFlag);
316
                myObj.setElevation(elevation);
317
                myObj.setExtrusion(extrusion);
318
                myObj.setFieldLength(fieldLength);
319
                myObj.setFlags(flags);
320
                myObj.setGeneration(generation);
321
                myObj.setHalign(halign);
322
                myObj.setHeight(height);
323
                myObj.setInsertionPoint(insertionPoint);
324
                myObj.setObliqueAngle(obliqueAngle);
325
                myObj.setPrompt(prompt);
326
                myObj.setRotationAngle(rotationAngle);
327
                myObj.setStyleHandle(styleHandle);
328
                myObj.setTag(tag);
329
                myObj.setText(text);
330
                myObj.setThickness(thickness);
331
                myObj.setValign(valign);
332
                myObj.setWidthFactor(widthFactor);
333
                
334
        }
335

    
336
}