svn-gvsig-desktop / tags / v1_1_Build_1002 / libraries / libFMap / src / com / iver / cit / gvsig / fmap / drivers / DXFLayerDefinition.java @ 12070
History | View | Annotate | Download (1.71 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 |
layerField.setFieldName("Color");
|
19 |
layerField.setFieldType(Types.INTEGER);
|
20 |
FieldDescription elevationField= new FieldDescription();
|
21 |
layerField.setFieldName("Elevation");
|
22 |
layerField.setFieldType(Types.FLOAT);
|
23 |
FieldDescription thicknessField= new FieldDescription();
|
24 |
layerField.setFieldName("Thickness");
|
25 |
layerField.setFieldType(Types.FLOAT);
|
26 |
FieldDescription textField= new FieldDescription();
|
27 |
layerField.setFieldName("Text");
|
28 |
layerField.setFieldType(Types.VARCHAR);
|
29 |
FieldDescription heightTextField= new FieldDescription();
|
30 |
layerField.setFieldName("heightText");
|
31 |
layerField.setFieldType(Types.FLOAT);
|
32 |
FieldDescription rotationTextField= new FieldDescription();
|
33 |
layerField.setFieldName("rotationText");
|
34 |
layerField.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 |
} |