Revision 839
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/dxf/DXFMemoryDriver.java | ||
---|---|---|
5 | 5 |
*/ |
6 | 6 |
package com.iver.cit.gvsig.fmap.drivers.dxf; |
7 | 7 |
|
8 |
import java.awt.Color; |
|
9 |
import java.awt.Font; |
|
8 | 10 |
import java.awt.geom.Point2D; |
9 | 11 |
import java.io.File; |
10 | 12 |
import java.io.IOException; |
... | ... | |
125 | 127 |
//FShape aux; |
126 | 128 |
|
127 | 129 |
for (int i=0;i<features.size();i++) { |
130 |
|
|
131 |
auxRowTxt[ID_FIELD_HEIGHTTEXT] = ValueFactory.createValue(0); |
|
132 |
auxRowTxt[ID_FIELD_ROTATIONTEXT] = ValueFactory.createValue(0); |
|
133 |
auxRowTxt[ID_FIELD_TEXT] = ValueFactory.createNullValue(); |
|
134 |
|
|
128 | 135 |
Feature fea = (Feature)features.get(i); |
129 | 136 |
if (fea.getGeometry() instanceof Point) { |
130 | 137 |
// m_BoundingBox.add((Rectangle2D.Double)fea.getGeometry().getExtent().toRectangle2D()); |
... | ... | |
274 | 281 |
|
275 | 282 |
defaultLegend = LegendFactory.createVectorialUniqueValueLegend(getShapeType()); |
276 | 283 |
defaultLegend.setFieldName("Color"); |
284 |
|
|
285 |
defaultLegend.setLabelField("Text"); |
|
286 |
defaultLegend.setDefaultSymbol(new FSymbol(getShapeType())); |
|
287 |
defaultLegend.getDefaultSymbol().setShapeVisible(false); |
|
288 |
defaultLegend.getDefaultSymbol().setFontSizeInPixels(false); |
|
289 |
defaultLegend.getDefaultSymbol().setFont(new Font("SansSerif", Font.PLAIN, 9)); |
|
290 |
defaultLegend.getDefaultSymbol().setFontColor(Color.BLACK); |
|
291 |
float heightText = 10; |
|
292 |
defaultLegend.getDefaultSymbol().setFontSize(heightText); |
|
293 |
defaultLegend.setLabelHeightField("HeightText"); |
|
294 |
defaultLegend.setLabelRotationField("RotationText"); |
|
295 |
|
|
277 | 296 |
ReadDriver rs = this; |
278 | 297 |
IntValue clave; |
279 | 298 |
FSymbol theSymbol = null; |
... | ... | |
281 | 300 |
try { |
282 | 301 |
for (long j = 0; j < rs.getRowCount(); j++) |
283 | 302 |
{ |
303 |
System.out.println("initialize(): j = " + j); |
|
284 | 304 |
clave =(IntValue) rs.getFieldValue(j,ID_FIELD_COLOR); |
285 | 305 |
if (defaultLegend.getSymbolByValue(clave) == null) |
286 | 306 |
{ |
... | ... | |
308 | 328 |
* @see com.iver.cit.gvsig.fmap.drivers.MemoryDriver#getShapeType() |
309 | 329 |
*/ |
310 | 330 |
public int getShapeType() { |
311 |
return 15;
|
|
331 |
return FShape.MULTI;
|
|
312 | 332 |
} |
313 | 333 |
|
314 | 334 |
/* (non-Javadoc) |
Also available in: Unified diff