Revision 711

View differences:

trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/dgn/DgnMemoryDriver.java
8 8
import java.util.Comparator;
9 9
import java.util.TreeMap;
10 10

  
11
import com.hardcode.gdbms.engine.values.IntValue;
12
import com.hardcode.gdbms.engine.values.StringValue;
13
import com.hardcode.gdbms.engine.values.Value;
14
import com.hardcode.gdbms.engine.values.ValueFactory;
11 15
import com.iver.cit.gvsig.fmap.core.FPoint2D;
12 16
import com.iver.cit.gvsig.fmap.core.FPoint3D;
13 17
import com.iver.cit.gvsig.fmap.core.FPolygon2D;
......
60 64
    	
61 65
    	m_DgnReader = new DGNReader(m_Fich.getAbsolutePath());
62 66
    	
63
    	Object [] auxRow = new Object[7];
64
    	Object [] cellRow = new Object[7];
65
    	Object [] complexRow = new Object[7];
67
    	Value [] auxRow = new Value[7];
68
    	Value [] cellRow = new Value[7];
69
    	Value [] complexRow = new Value[7];
66 70
		ArrayList arrayFields = new ArrayList();
67 71
		arrayFields.add("ID");
68 72
		arrayFields.add("Entity");
......
126 130
		        			if (bEsPoligono)
127 131
		        			{
128 132
								if (complex_index_fill_color != -1)
129
									auxRow[ID_FIELD_COLOR] = new Integer(complex_index_fill_color);
133
									auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(complex_index_fill_color);
130 134

  
131 135
		        				addShape(new FPolygon2D(elementoCompuesto), auxRow);
132 136
		        			}
......
144 148
				{
145 149
					case DGNFileHeader.DGNST_SHARED_CELL_DEFN:
146 150
						bInsideCell = true;
147
						cellRow[ID_FIELD_ID] = new Integer(elemento.element_id);
148
		                cellRow[ID_FIELD_LAYER] = new Integer(elemento.level);
149
		                cellRow[ID_FIELD_COLOR] = new Integer(elemento.color);
150
		                cellRow[ID_FIELD_ENTITY] = new String("Shared Cell");
151
						cellRow[ID_FIELD_ID] = ValueFactory.createValue(elemento.element_id);
152
		                cellRow[ID_FIELD_LAYER] = ValueFactory.createValue(elemento.level);
153
		                cellRow[ID_FIELD_COLOR] = ValueFactory.createValue(elemento.color);
154
		                cellRow[ID_FIELD_ENTITY] = ValueFactory.createValue("Shared Cell");
151 155
						break;
152 156
					case DGNFileHeader.DGNST_CELL_HEADER:
153 157
						bInsideCell = true;
154 158
						DGNElemCellHeader psCellHeader = (DGNElemCellHeader) elemento;
155
						cellRow[ID_FIELD_ID] = new Integer(elemento.element_id);
156
		                cellRow[ID_FIELD_LAYER] = new Integer(elemento.level);
157
		                cellRow[ID_FIELD_COLOR] = new Integer(elemento.color);
158
		                cellRow[ID_FIELD_ENTITY] = new String("Cell");
159
						cellRow[ID_FIELD_ID] = ValueFactory.createValue(elemento.element_id);
160
		                cellRow[ID_FIELD_LAYER] = ValueFactory.createValue(elemento.level);
161
		                cellRow[ID_FIELD_COLOR] = ValueFactory.createValue(elemento.color);
162
		                cellRow[ID_FIELD_ENTITY] = ValueFactory.createValue("Cell");
159 163
		                complex_index_fill_color = m_DgnReader.DGNGetShapeFillInfo(elemento);
160 164
		                // System.err.println("Cell Header " + complex_index_fill_color);
161 165
						break;
......
166 170
						contadorSubElementos = 0;
167 171
						DGNElemComplexHeader psComplexHeader = (DGNElemComplexHeader) elemento;
168 172
						numSubElementos = psComplexHeader.numelems;
169
						complexRow[ID_FIELD_ID] = new Integer(elemento.element_id);
170
		                complexRow[ID_FIELD_LAYER] = new Integer(elemento.level);
171
		                complexRow[ID_FIELD_COLOR] = new Integer(elemento.color);
172
		                complexRow[ID_FIELD_ENTITY] = new String("Complex");
173
						complexRow[ID_FIELD_ID] = ValueFactory.createValue(elemento.element_id);
174
		                complexRow[ID_FIELD_LAYER] = ValueFactory.createValue(elemento.level);
175
		                complexRow[ID_FIELD_COLOR] = ValueFactory.createValue(elemento.color);
176
		                complexRow[ID_FIELD_ENTITY] = ValueFactory.createValue("Complex");
173 177
		                
174 178
						
175 179
						if (psComplexHeader.type == DGNFileHeader.DGNT_COMPLEX_SHAPE_HEADER)
......
205 209
						// todav?a no est? metido.
206 210
		               DGNElemMultiPoint psLine = (DGNElemMultiPoint) elemento;			                		                
207 211
		                
208
		                auxRow[ID_FIELD_LAYER] = new Integer(elemento.level);
209
		                auxRow[ID_FIELD_COLOR] = new Integer(elemento.color);
212
		                auxRow[ID_FIELD_LAYER] = ValueFactory.createValue(elemento.level);
213
		                auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(elemento.color);
210 214
		                
211 215
		                if ((psLine.num_vertices == 2) && (psLine.vertices[0].x == psLine.vertices[1].x)
212 216
		                		&& (psLine.vertices[0].y == psLine.vertices[1].y))
213 217
		                {
214
		                	auxRow[ID_FIELD_ENTITY] = new String("Point");
218
		                	auxRow[ID_FIELD_ENTITY] = ValueFactory.createValue("Point");
215 219
		                	addShape(new FPoint3D(psLine.vertices[0].x,
216 220
		                			psLine.vertices[0].y,psLine.vertices[0].z), auxRow);
217 221
		                }
......
244 248
				               				psLine.vertices[i].y);
245 249
			               }
246 250
				               	
247
			               auxRow[ID_FIELD_ID] = new Integer(elemento.element_id);
248
		                	auxRow[ID_FIELD_ENTITY] = new String("Multipoint");
251
			               auxRow[ID_FIELD_ID] = ValueFactory.createValue(elemento.element_id);
252
		                	auxRow[ID_FIELD_ENTITY] = ValueFactory.createValue("Multipoint");
249 253
		                	
250 254
		                	
251 255
		                	if ((psLine.vertices[0].x == psLine.vertices[psLine.num_vertices-1].x)
......
258 262
									elemento.color = m_DgnReader.DGNGetShapeFillInfo(elemento);
259 263
									// System.err.println("fill color = " + elemento.color);
260 264
									if (elemento.color != -1)
261
										auxRow[ID_FIELD_COLOR] = new Integer(elemento.color);
265
										auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(elemento.color);
262 266
								}
263 267
		                		
264 268
		                		if (elemento.complex == 0)
......
312 316
     	              	//Aqu? podr?amos hacer cosas con la coordenada Z
313 317
     	              }
314 318
     	              
315
     	              auxRow[ID_FIELD_ID] = new Integer(elemento.element_id);
316
		               auxRow[ID_FIELD_ENTITY] = new String("Arc");
317
		               auxRow[ID_FIELD_LAYER] = new Integer(elemento.level);
318
		               auxRow[ID_FIELD_COLOR] = new Integer(elemento.color);
319
     	              auxRow[ID_FIELD_ID] = ValueFactory.createValue(elemento.element_id);
320
		               auxRow[ID_FIELD_ENTITY] = ValueFactory.createValue("Arc");
321
		               auxRow[ID_FIELD_LAYER] = ValueFactory.createValue(elemento.level);
322
		               auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(elemento.color);
319 323
		               
320 324
		               /* Line2D.Double ejeMayor = new Line2D.Double(psArc.origin.x - psArc.primary_axis, psArc.origin.y, 
321 325
		               		psArc.origin.x + psArc.primary_axis, psArc.origin.y);
......
356 360
		                FPoint2D elShapeTxt = new FPoint3D(
357 361
		                		psText.origin.x, psText.origin.y,psText.origin.z);
358 362
		                		                
359
		                auxRow[ID_FIELD_ID] = new Integer(elemento.element_id);
360
		                auxRow[ID_FIELD_ENTITY] = new String("Text");
361
		                auxRow[ID_FIELD_LAYER] = new Integer(elemento.level);
362
		                auxRow[ID_FIELD_COLOR] = new Integer(elemento.color);
363
		                auxRow[ID_FIELD_ID] = ValueFactory.createValue(elemento.element_id);
364
		                auxRow[ID_FIELD_ENTITY] = ValueFactory.createValue("Text");
365
		                auxRow[ID_FIELD_LAYER] = ValueFactory.createValue(elemento.level);
366
		                auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(elemento.color);
363 367
		                heightText = (float) psText.height_mult;
364
		                auxRow[ID_FIELD_HEIGHTTEXT] = new Double(heightText);
365
		                auxRow[ID_FIELD_ROTATIONTEXT] = new Double(psText.rotation);
366
		                auxRow[ID_FIELD_TEXT] = psText.string; // .trim();
368
		                auxRow[ID_FIELD_HEIGHTTEXT] = ValueFactory.createValue(heightText);
369
		                auxRow[ID_FIELD_ROTATIONTEXT] = ValueFactory.createValue(psText.rotation);
370
		                auxRow[ID_FIELD_TEXT] = ValueFactory.createValue(psText.string); // .trim();
367 371
		                addShape(elShapeTxt, 
368 372
		                		auxRow);
369 373
		                
......
406 410
			if (bEsPoligono)
407 411
			{
408 412
				if (complex_index_fill_color != -1)
409
					auxRow[ID_FIELD_COLOR] = new Integer(complex_index_fill_color);
413
					auxRow[ID_FIELD_COLOR] = ValueFactory.createValue(complex_index_fill_color);
410 414

  
411 415
				addShape(new FPolygon2D(elementoCompuesto), auxRow);
412 416
			}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/FPolygon2D.java
23 23
    public FPolygon2D(GeneralPathX gpx) {
24 24
    	super(gpx);
25 25
    }
26
	public FShape cloneFShape() {
27
		return new FPolygon2D((GeneralPathX) gp.clone());
28
	}
26 29

  
27 30
    /**
28 31
     * @see com.iver.cit.gvsig.fmap.core.IGeometry#draw(java.awt.Graphics2D,
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/FPolygon3D.java
22 22
        super(gpx);
23 23
        this.pZ = pZ;
24 24
    }
25
	public FShape cloneFShape() {
26
		// TODO:
27
		return null;
28
	}
25 29

  
26 30
}
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/v02/FGraphicUtilities.java
169 169
        }
170 170

  
171 171
        g2.setColor(theSymbol.getColor());
172
        
173
        /* if (shp instanceof FPolygon2D)
174
        {
175
        	System.out.println("Entra pol?gono");
176
        } */
172 177

  
173 178
        switch (shp.getShapeType()) {
174 179
            case FShape.POINT: //Tipo punto

Also available in: Unified diff