Revision 4862
trunk/extensions/extAddEventTheme/src/com/iver/gvsig/addeventtheme/AddEventThemeDriver.java | ||
---|---|---|
60 | 60 |
import com.iver.cit.gvsig.fmap.core.FShape; |
61 | 61 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
62 | 62 |
import com.iver.cit.gvsig.fmap.core.ShapeFactory; |
63 |
import com.iver.cit.gvsig.fmap.drivers.BoundedShapes; |
|
64 | 63 |
import com.iver.cit.gvsig.fmap.drivers.DriverAttributes; |
65 | 64 |
import com.iver.cit.gvsig.fmap.drivers.VectorialDriver; |
66 | 65 |
import com.iver.cit.gvsig.fmap.layers.LayerFactory; |
... | ... | |
226 | 225 |
|
227 | 226 |
} |
228 | 227 |
|
229 |
public Rectangle2D getShapeBounds(int index) throws IOException {
|
|
230 |
return getShape(index).getBounds2D();
|
|
228 |
public int getFieldWidth(int i) throws DriverException {
|
|
229 |
return ds.getFieldWidth(i);
|
|
231 | 230 |
} |
232 |
|
|
233 |
public int getShapeType(int index) { |
|
234 |
return getShapeType(); |
|
235 |
} |
|
236 | 231 |
} |
trunk/extensions/extCAD/src/com/iver/cit/gvsig/EditionUtilities.java | ||
---|---|---|
109 | 109 |
FieldDescription[] fieldsDescrip = null; |
110 | 110 |
try { |
111 | 111 |
sds = lyrVect.getRecordset(); |
112 |
int numFields = sds.getFieldNames().length; |
|
112 |
// Para evitar el PK. |
|
113 |
int numFields = sds.getFieldNames().length; //-sds.getPKCardinality(); |
|
113 | 114 |
fieldsDescrip = new FieldDescription[numFields]; |
114 | 115 |
for (int i = 0; i < numFields; i++) { |
115 | 116 |
fieldsDescrip[i] = new FieldDescription(); |
116 | 117 |
fieldsDescrip[i].setFieldType(sds.getFieldType(i)); |
117 | 118 |
fieldsDescrip[i].setFieldName(sds.getFieldName(i)); |
118 |
fieldsDescrip[i].setFieldLength(200); |
|
119 |
fieldsDescrip[i].setFieldLength(sds.getFieldWidth(i)); |
|
120 |
System.out.println("Campo " + sds.getFieldName(i) + " con ancho= " + sds.getFieldWidth(i)); |
|
119 | 121 |
} |
120 | 122 |
} catch (DriverException e) { |
121 | 123 |
e.printStackTrace(); |
Also available in: Unified diff