Statistics
| Revision:

root / trunk / libraries / libDwg / src / com / iver / cit / jdwglib / dwg / objects / DwgLinearDimension.java @ 9930

History | View | Annotate | Download (8.76 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 DwgLinearDimension class represents a DWG Linear dimension
43
 * 
44
 * @author jmorell
45
 */
46
public class DwgLinearDimension extends DwgObject {
47
        public DwgLinearDimension(int index) {
48
                super(index);
49
                // TODO Auto-generated constructor stub
50
        }
51
        private double[] extrusion;
52
        private Point2D textMidpoint;
53
        private double elevation;
54
        private int flags;
55
        private String text;
56
        private double rotation;
57
        private double horizDir;
58
        private double[] insScale;
59
        private double insRotation;
60
        private int attachmentPoint;
61
        private int linespaceStyle;
62
        private double linespaceFactor;
63
        private double actualMeasurement;
64
        private Point2D pt12;
65
        private double[] pt10;
66
        private double[] pt13;
67
        private double[] pt14;
68
        private double extRotation;
69
        private double dimensionRotation;
70
        private int dimstyleHandle;
71
        private int anonBlockHandle;
72
    /**
73
     * @return Returns the elevation.
74
     */
75
    public double getElevation() {
76
        return elevation;
77
    }
78
    /**
79
     * @param elevation The elevation to set.
80
     */
81
    public void setElevation(double elevation) {
82
        this.elevation = elevation;
83
    }
84
        /* (non-Javadoc)
85
         * @see java.lang.Object#clone()
86
         */
87
        public Object clone() {
88
                DwgLinearDimension dwgLinearDimension = new DwgLinearDimension(index);
89
                dwgLinearDimension.setType(type);
90
                dwgLinearDimension.setHandle(handle);
91
                dwgLinearDimension.setVersion(version);
92
                dwgLinearDimension.setMode(mode);
93
                dwgLinearDimension.setLayerHandle(layerHandle);
94
                dwgLinearDimension.setColor(color);
95
                dwgLinearDimension.setNumReactors(numReactors);
96
                dwgLinearDimension.setNoLinks(noLinks);
97
                dwgLinearDimension.setLinetypeFlags(linetypeFlags);
98
                dwgLinearDimension.setPlotstyleFlags(plotstyleFlags);
99
                dwgLinearDimension.setSizeInBits(sizeInBits);
100
                dwgLinearDimension.setExtendedData(extendedData);
101
                dwgLinearDimension.setGraphicData(graphicData);
102
                //dwgLinearDimension.setInsideBlock(insideBlock);
103
                dwgLinearDimension.setTextMidpoint(textMidpoint);
104
                dwgLinearDimension.setElevation(elevation);
105
                dwgLinearDimension.setFlags(flags);
106
                dwgLinearDimension.setText(text);
107
                dwgLinearDimension.setRotation(rotation);
108
                dwgLinearDimension.setHorizDir(horizDir);
109
                dwgLinearDimension.setInsScale(insScale);
110
                dwgLinearDimension.setInsRotation(insRotation);
111
                dwgLinearDimension.setAttachmentPoint(attachmentPoint);
112
                dwgLinearDimension.setLinespaceStyle(linespaceStyle);
113
                dwgLinearDimension.setLinespaceFactor(linespaceFactor);
114
                dwgLinearDimension.setActualMeasurement(actualMeasurement);
115
                dwgLinearDimension.setPt12(pt12);
116
                dwgLinearDimension.setPt10(pt10);
117
                dwgLinearDimension.setPt13(pt13);
118
                dwgLinearDimension.setPt14(pt14);
119
                dwgLinearDimension.setExtRotation(extRotation);
120
                dwgLinearDimension.setDimensionRotation(dimensionRotation);
121
                dwgLinearDimension.setDimstyleHandle(dimstyleHandle);
122
                dwgLinearDimension.setAnonBlockHandle(anonBlockHandle);
123
                return dwgLinearDimension;
124
        }
125
        /**
126
         * @return Returns the actualMeasurement.
127
         */
128
        public double getActualMeasurement() {
129
                return actualMeasurement;
130
        }
131
        /**
132
         * @param actualMeasurement The actualMeasurement to set.
133
         */
134
        public void setActualMeasurement(double actualMeasurement) {
135
                this.actualMeasurement = actualMeasurement;
136
        }
137
        /**
138
         * @return Returns the anonBlockHandle.
139
         */
140
        public int getAnonBlockHandle() {
141
                return anonBlockHandle;
142
        }
143
        /**
144
         * @param anonBlockHandle The anonBlockHandle to set.
145
         */
146
        public void setAnonBlockHandle(int anonBlockHandle) {
147
                this.anonBlockHandle = anonBlockHandle;
148
        }
149
        /**
150
         * @return Returns the attachmentPoint.
151
         */
152
        public int getAttachmentPoint() {
153
                return attachmentPoint;
154
        }
155
        /**
156
         * @param attachmentPoint The attachmentPoint to set.
157
         */
158
        public void setAttachmentPoint(int attachmentPoint) {
159
                this.attachmentPoint = attachmentPoint;
160
        }
161
        /**
162
         * @return Returns the dimensionRotation.
163
         */
164
        public double getDimensionRotation() {
165
                return dimensionRotation;
166
        }
167
        /**
168
         * @param dimensionRotation The dimensionRotation to set.
169
         */
170
        public void setDimensionRotation(double dimensionRotation) {
171
                this.dimensionRotation = dimensionRotation;
172
        }
173
        /**
174
         * @return Returns the dimstyleHandle.
175
         */
176
        public int getDimstyleHandle() {
177
                return dimstyleHandle;
178
        }
179
        /**
180
         * @param dimstyleHandle The dimstyleHandle to set.
181
         */
182
        public void setDimstyleHandle(int dimstyleHandle) {
183
                this.dimstyleHandle = dimstyleHandle;
184
        }
185
        /**
186
         * @return Returns the extRotation.
187
         */
188
        public double getExtRotation() {
189
                return extRotation;
190
        }
191
        /**
192
         * @param extRotation The extRotation to set.
193
         */
194
        public void setExtRotation(double extRotation) {
195
                this.extRotation = extRotation;
196
        }
197
        /**
198
         * @return Returns the extrusion.
199
         */
200
        public double[] getExtrusion() {
201
                return extrusion;
202
        }
203
        /**
204
         * @param extrusion The extrusion to set.
205
         */
206
        public void setExtrusion(double[] extrusion) {
207
                this.extrusion = extrusion;
208
        }
209
        /**
210
         * @return Returns the flags.
211
         */
212
        public int getFlags() {
213
                return flags;
214
        }
215
        /**
216
         * @param flags The flags to set.
217
         */
218
        public void setFlags(int flags) {
219
                this.flags = flags;
220
        }
221
        /**
222
         * @return Returns the horizDir.
223
         */
224
        public double getHorizDir() {
225
                return horizDir;
226
        }
227
        /**
228
         * @param horizDir The horizDir to set.
229
         */
230
        public void setHorizDir(double horizDir) {
231
                this.horizDir = horizDir;
232
        }
233
        /**
234
         * @return Returns the insRotation.
235
         */
236
        public double getInsRotation() {
237
                return insRotation;
238
        }
239
        /**
240
         * @param insRotation The insRotation to set.
241
         */
242
        public void setInsRotation(double insRotation) {
243
                this.insRotation = insRotation;
244
        }
245
        /**
246
         * @return Returns the insScale.
247
         */
248
        public double[] getInsScale() {
249
                return insScale;
250
        }
251
        /**
252
         * @param insScale The insScale to set.
253
         */
254
        public void setInsScale(double[] insScale) {
255
                this.insScale = insScale;
256
        }
257
        /**
258
         * @return Returns the linespaceFactor.
259
         */
260
        public double getLinespaceFactor() {
261
                return linespaceFactor;
262
        }
263
        /**
264
         * @param linespaceFactor The linespaceFactor to set.
265
         */
266
        public void setLinespaceFactor(double linespaceFactor) {
267
                this.linespaceFactor = linespaceFactor;
268
        }
269
        /**
270
         * @return Returns the linespaceStyle.
271
         */
272
        public int getLinespaceStyle() {
273
                return linespaceStyle;
274
        }
275
        /**
276
         * @param linespaceStyle The linespaceStyle to set.
277
         */
278
        public void setLinespaceStyle(int linespaceStyle) {
279
                this.linespaceStyle = linespaceStyle;
280
        }
281
        /**
282
         * @return Returns the pt10.
283
         */
284
        public double[] getPt10() {
285
                return pt10;
286
        }
287
        /**
288
         * @param pt10 The pt10 to set.
289
         */
290
        public void setPt10(double[] pt10) {
291
                this.pt10 = pt10;
292
        }
293
        /**
294
         * @return Returns the pt12.
295
         */
296
        public Point2D getPt12() {
297
                return pt12;
298
        }
299
        /**
300
         * @param pt12 The pt12 to set.
301
         */
302
        public void setPt12(Point2D pt12) {
303
                this.pt12 = pt12;
304
        }
305
        /**
306
         * @return Returns the pt13.
307
         */
308
        public double[] getPt13() {
309
                return pt13;
310
        }
311
        /**
312
         * @param pt13 The pt13 to set.
313
         */
314
        public void setPt13(double[] pt13) {
315
                this.pt13 = pt13;
316
        }
317
        /**
318
         * @return Returns the pt14.
319
         */
320
        public double[] getPt14() {
321
                return pt14;
322
        }
323
        /**
324
         * @param pt14 The pt14 to set.
325
         */
326
        public void setPt14(double[] pt14) {
327
                this.pt14 = pt14;
328
        }
329
        /**
330
         * @return Returns the rotation.
331
         */
332
        public double getRotation() {
333
                return rotation;
334
        }
335
        /**
336
         * @param rotation The rotation to set.
337
         */
338
        public void setRotation(double rotation) {
339
                this.rotation = rotation;
340
        }
341
        /**
342
         * @return Returns the text.
343
         */
344
        public String getText() {
345
                return text;
346
        }
347
        /**
348
         * @param text The text to set.
349
         */
350
        public void setText(String text) {
351
                this.text = text;
352
        }
353
        /**
354
         * @return Returns the textMidpoint.
355
         */
356
        public Point2D getTextMidpoint() {
357
                return textMidpoint;
358
        }
359
        /**
360
         * @param textMidpoint The textMidpoint to set.
361
         */
362
        public void setTextMidpoint(Point2D textMidpoint) {
363
                this.textMidpoint = textMidpoint;
364
        }
365
}