Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libDwg / src / org / gvsig / dwg / lib / objects / DwgAttdef.java @ 28969

History | View | Annotate | Download (7.06 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 org.gvsig.dwg.lib.objects;
36

    
37
import java.awt.geom.Point2D;
38

    
39
import org.gvsig.dwg.lib.DwgHandleReference;
40
import org.gvsig.dwg.lib.DwgObject;
41

    
42

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

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

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

    
337
}