root / branches / v10 / libraries / libFMap / src / com / iver / cit / gvsig / fmap / drivers / DXFLayerDefinition.java @ 16006
History | View | Annotate | Download (1.74 KB)
1 |
package com.iver.cit.gvsig.fmap.drivers; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
import java.sql.Types; |
5 |
|
6 |
import com.iver.cit.gvsig.fmap.core.FShape; |
7 |
|
8 |
public class DXFLayerDefinition extends LayerDefinition { |
9 |
|
10 |
private File dxfFile; |
11 |
|
12 |
public DXFLayerDefinition() {
|
13 |
super();
|
14 |
FieldDescription layerField = new FieldDescription();
|
15 |
layerField.setFieldName("Layer");
|
16 |
layerField.setFieldType(Types.VARCHAR);
|
17 |
FieldDescription colorField = new FieldDescription();
|
18 |
colorField.setFieldName("Color");
|
19 |
colorField.setFieldType(Types.INTEGER);
|
20 |
FieldDescription elevationField= new FieldDescription();
|
21 |
elevationField.setFieldName("Elevation");
|
22 |
elevationField.setFieldType(Types.FLOAT);
|
23 |
FieldDescription thicknessField= new FieldDescription();
|
24 |
thicknessField.setFieldName("Thickness");
|
25 |
thicknessField.setFieldType(Types.FLOAT);
|
26 |
FieldDescription textField= new FieldDescription();
|
27 |
textField.setFieldName("Text");
|
28 |
textField.setFieldType(Types.VARCHAR);
|
29 |
FieldDescription heightTextField= new FieldDescription();
|
30 |
heightTextField.setFieldName("heightText");
|
31 |
heightTextField.setFieldType(Types.FLOAT);
|
32 |
FieldDescription rotationTextField= new FieldDescription();
|
33 |
rotationTextField.setFieldName("rotationText");
|
34 |
rotationTextField.setFieldType(Types.FLOAT);
|
35 |
|
36 |
FieldDescription[] fieldsDXF = new FieldDescription[7]; |
37 |
fieldsDXF[0] = layerField;
|
38 |
fieldsDXF[1] = colorField;
|
39 |
fieldsDXF[2] = elevationField;
|
40 |
fieldsDXF[3] = thicknessField;
|
41 |
fieldsDXF[4] = textField;
|
42 |
fieldsDXF[5] = heightTextField;
|
43 |
fieldsDXF[6] = rotationTextField;
|
44 |
this.setFieldsDesc(fieldsDXF);
|
45 |
} |
46 |
|
47 |
public FieldDescription[] getFieldsDesc() { |
48 |
return super.getFieldsDesc(); |
49 |
} |
50 |
|
51 |
public int getShapeType() { |
52 |
return FShape.MULTI;
|
53 |
} |
54 |
|
55 |
public void setFile(File newFile) { |
56 |
dxfFile = newFile; |
57 |
} |
58 |
|
59 |
} |