Revision 9057
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java | ||
---|---|---|
92 | 92 |
import com.iver.cit.gvsig.fmap.operations.strategies.Strategy; |
93 | 93 |
import com.iver.cit.gvsig.fmap.operations.strategies.StrategyManager; |
94 | 94 |
import com.iver.cit.gvsig.fmap.operations.strategies.VisitException; |
95 |
import com.iver.cit.gvsig.fmap.rendering.ClassifiedLegendInfo; |
|
95 | 96 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
96 | 97 |
import com.iver.cit.gvsig.fmap.rendering.LegendChangedEvent; |
97 | 98 |
import com.iver.cit.gvsig.fmap.rendering.LegendFactory; |
... | ... | |
1355 | 1356 |
|
1356 | 1357 |
} |
1357 | 1358 |
|
1359 |
public void beforePrinting(PrintRequestAttributeSet properties) { |
|
1360 |
VectorialLegend vl=(VectorialLegend)getLegend(); |
|
1361 |
if (vl instanceof ClassifiedLegendInfo) { |
|
1362 |
ClassifiedLegendInfo clsfLegend = (ClassifiedLegendInfo) vl; |
|
1363 |
ISymbol[] symbols=clsfLegend.getSymbols(); |
|
1364 |
for (int i=0;i<symbols.length;i++) { |
|
1365 |
symbols[i].setPrintingProperties(properties); |
|
1366 |
} |
|
1367 |
} |
|
1368 |
if (vl.getDefaultSymbol()!=null) { |
|
1369 |
vl.getDefaultSymbol().setPrintingProperties(properties); |
|
1370 |
} |
|
1371 |
} |
|
1372 |
|
|
1373 |
public void afterPrinting() { |
|
1374 |
VectorialLegend vl=(VectorialLegend)getLegend(); |
|
1375 |
if (vl instanceof ClassifiedLegendInfo) { |
|
1376 |
ClassifiedLegendInfo clsfLegend = (ClassifiedLegendInfo) vl; |
|
1377 |
ISymbol[] symbols=clsfLegend.getSymbols(); |
|
1378 |
for (int i=0;i<symbols.length;i++) { |
|
1379 |
symbols[i].setPrintingProperties(null); |
|
1380 |
} |
|
1381 |
} |
|
1382 |
if (vl.getDefaultSymbol()!=null) { |
|
1383 |
vl.getDefaultSymbol().setPrintingProperties(null); |
|
1384 |
} |
|
1385 |
|
|
1386 |
} |
|
1387 |
|
|
1358 | 1388 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/DefaultStrategy.java | ||
---|---|---|
56 | 56 |
import com.iver.cit.gvsig.fmap.ViewPort; |
57 | 57 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
58 | 58 |
import com.iver.cit.gvsig.fmap.core.ISymbol; |
59 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
|
60 | 59 |
import com.iver.cit.gvsig.fmap.drivers.DriverAttributes; |
61 | 60 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
62 | 61 |
import com.iver.cit.gvsig.fmap.layers.FBitSet; |
... | ... | |
69 | 68 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.Selectable; |
70 | 69 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.SingleLayer; |
71 | 70 |
import com.iver.cit.gvsig.fmap.rendering.VectorialLegend; |
72 |
import com.iver.cit.gvsig.fmap.rendering.styling.FStyle2D; |
|
73 | 71 |
import com.iver.utiles.swing.threads.Cancellable; |
74 | 72 |
import com.iver.utiles.swing.threads.CancellableMonitorable; |
75 | 73 |
|
... | ... | |
306 | 304 |
*/ |
307 | 305 |
public void print(Graphics2D g, ViewPort viewPort, Cancellable cancel, PrintRequestAttributeSet properties) |
308 | 306 |
throws DriverException { |
309 |
draw(null, g, viewPort, cancel); // Quiero ejecutar el draw del padre, que es el que va sin acelaraci?n!! |
|
307 |
if (capa instanceof FLyrVect) { |
|
308 |
((FLyrVect)capa).beforePrinting(properties); |
|
309 |
draw(null, g, viewPort, cancel); // Quiero ejecutar el draw del padre, que es el que va sin acelaraci?n!! |
|
310 |
((FLyrVect)capa).afterPrinting(); |
|
311 |
}else{ |
|
312 |
draw(null, g, viewPort, cancel); // Quiero ejecutar el draw del padre, que es el que va sin acelaraci?n!! |
|
313 |
} |
|
310 | 314 |
} |
311 | 315 |
|
312 | 316 |
public void process(FeatureVisitor visitor, Rectangle2D rectangle) throws DriverException, VisitException { |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/ShpStrategy.java | ||
---|---|---|
359 | 359 |
return; |
360 | 360 |
} |
361 | 361 |
FLyrVect lyr = (FLyrVect) getCapa(); |
362 |
lyr.beforePrinting(printProperties); |
|
363 |
|
|
362 | 364 |
Selectable selectable = lyr.getRecordset(); |
363 |
// Selectable selection = (Selectable) getCapa().; |
|
364 | 365 |
ICoordTrans ct = getCapa().getCoordTrans(); |
365 | 366 |
BitSet bitSet = selectable.getSelection(); |
366 | 367 |
BoundedShapes shapeBounds = (BoundedShapes) adapter.getDriver(); |
... | ... | |
425 | 426 |
geom.reProject(ct); |
426 | 427 |
} |
427 | 428 |
|
428 |
symbol.setPrintingProperties(printProperties); |
|
429 | 429 |
geom.draw(g, viewPort, symbol); |
430 |
symbol.setPrintingProperties(null); |
|
431 |
|
|
430 |
|
|
432 | 431 |
} |
433 | 432 |
} |
434 | 433 |
|
... | ... | |
438 | 437 |
long t2 = System.currentTimeMillis(); |
439 | 438 |
// logger.debug("adapter.stop()"); |
440 | 439 |
adapter.stop(); |
441 |
|
|
440 |
lyr.afterPrinting(); |
|
442 | 441 |
// System.out.println(t2 - t1); |
443 | 442 |
} catch (DriverIOException e) { |
444 | 443 |
throw new DriverException(e); |
... | ... | |
450 | 449 |
throw new DriverException(e); |
451 | 450 |
} |
452 | 451 |
|
452 |
|
|
453 | 453 |
} |
454 | 454 |
|
455 | 455 |
public FBitSet queryByShape(IGeometry g, int relationship) |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/v02/FSymbol.java | ||
---|---|---|
1244 | 1244 |
if (stroke != null) { |
1245 | 1245 |
strokeValue=(int)stroke.getLineWidth(); |
1246 | 1246 |
double d=strokeValue*DPI/72; |
1247 |
this.setStroke(new BasicStroke((int)d)); |
|
1247 |
this.setStroke(new BasicStroke((int)d,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND));
|
|
1248 | 1248 |
} |
1249 | 1249 |
FGraphicUtilities.DrawShape(g, affineTransform, shp, this); |
1250 | 1250 |
this.setStroke(new BasicStroke(strokeValue)); |
Also available in: Unified diff