Revision 3733 trunk/extensions/extCAD/src/com/iver/cit/gvsig/gui/cad/tools/LineCADTool.java

View differences:

LineCADTool.java
1 1
package com.iver.cit.gvsig.gui.cad.tools;
2 2

  
3
import com.hardcode.driverManager.DriverLoadException;
4
import com.hardcode.gdbms.engine.data.driver.DriverException;
5
import com.hardcode.gdbms.engine.values.Value;
6
import com.hardcode.gdbms.engine.values.ValueFactory;
7 3
import com.iver.cit.gvsig.fmap.core.DefaultFeature;
8 4
import com.iver.cit.gvsig.fmap.core.GeneralPathX;
9 5
import com.iver.cit.gvsig.fmap.core.ShapeFactory;
......
79 75
    public void init() {
80 76

  
81 77
    }
82
    public void transition(java.util.BitSet sel, double x, double y){
78
    public void transition(FBitSet sel, double x, double y){
83 79
		_fsm.addpoint(sel,x,y);
84 80
	}
85 81
    /**
......
90 86
     * @param x par?metro x del punto que se pase en esta transici?n.
91 87
     * @param y par?metro y del punto que se pase en esta transici?n.
92 88
     */
93
    public void addpoint(java.util.BitSet sel, double x, double y) {
89
    public void addpoint(FBitSet sel, double x, double y) {
94 90
       // _fsm.addpoint(sel, x, y);
95 91

  
96 92
        LineCADToolState actualState = (LineCADToolState)_fsm.getPreviousState();
......
114 110
						2);
115 111
				elShape.moveTo(firstPoint.getX(), firstPoint.getY());
116 112
				elShape.lineTo(lastPoint.getX(), lastPoint.getY());
117
				int numFields=0;
118
				try {
119
					numFields = vea.getRecordset().getFieldCount();
120
				} catch (DriverException e) {
121
					// TODO Auto-generated catch block
122
					e.printStackTrace();
123
				} catch (DriverLoadException e) {
124
					// TODO Auto-generated catch block
125
					e.printStackTrace();
126
				}
127
				Value[] value=new Value[numFields];
128
				for (int i=0;i<value.length;i++){
129
					value[i]=ValueFactory.createNullValue();
130
				}
131
				DefaultFeature df=new DefaultFeature(ShapeFactory.createPolyline2D(elShape),value);
113
				DefaultFeature df=new DefaultFeature(ShapeFactory.createPolyline2D(elShape),null);
132 114
				vea.addRow(df);
133 115
			} catch (DriverIOException e) {
134 116
				e.printStackTrace();

Also available in: Unified diff