Revision 13773
trunk/extensions/extWCS/src/com/iver/cit/gvsig/fmap/layers/FLyrWCS.java | ||
---|---|---|
383 | 383 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#draw(java.awt.image.BufferedImage, java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort, com.iver.cit.gvsig.fmap.operations.Cancellable, double) |
384 | 384 |
*/ |
385 | 385 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale) throws ReadDriverException { |
386 |
|
|
386 |
enableStopped(); |
|
387 | 387 |
if (isWithinScale(scale)){ |
388 | 388 |
Point2D p = viewPort.getOffset(); |
389 | 389 |
// p will be (0, 0) when drawing a view or other when painting onto |
... | ... | |
453 | 453 |
e.printStackTrace(); |
454 | 454 |
} |
455 | 455 |
} |
456 |
disableStopped(); |
|
456 | 457 |
Runtime r = Runtime.getRuntime(); |
457 | 458 |
long mem = r.totalMemory() - r.freeMemory(); |
458 | 459 |
System.err.println("Memoria total: " + (mem / 1024) +"KB"); |
... | ... | |
465 | 466 |
* @throws LoadLayerException |
466 | 467 |
*/ |
467 | 468 |
private void initializeRasterLayer(MultiRasterDataset[][] datasets, IBuffer[][] buf) throws LoadLayerException { |
468 |
super.init(); |
|
469 | 469 |
if(this.filterList != null) |
470 | 470 |
getRender().setFilterList(filterList); |
471 | 471 |
if(this.transparency != null) |
... | ... | |
479 | 479 |
names[i][j] = datasets[i][j].getDataset(0)[0].getFName(); |
480 | 480 |
super.setLoadParams(names); |
481 | 481 |
} |
482 |
super.init(); |
|
482 | 483 |
if(buf != null) { |
483 | 484 |
int drawablesBandCount = layerRaster.getDataSource().getBands().getDrawableBandsCount(); |
484 | 485 |
IBuffer buff = ((CompositeDataset)dataset).generateBuffer(buf, drawablesBandCount); |
... | ... | |
659 | 660 |
* @throws ReadDriverException |
660 | 661 |
* @throws LoadLayerException |
661 | 662 |
*/ |
662 |
private void rasterProcess(String filePath, Graphics2D g, ViewPort vp, double scale, Cancellable cancel) throws ReadDriverException, LoadLayerException { |
|
663 |
private void rasterProcess(String filePath, Graphics2D g, ViewPort vp, double scale, Cancellable cancel) throws ReadDriverException, LoadLayerException {
|
|
663 | 664 |
//Cerramos el dataset asociado a la capa si est? abierto. |
664 | 665 |
if(layerRaster != null) { |
665 | 666 |
layerRaster.setRemoveRasterFlag(true); |
... | ... | |
708 | 709 |
|
709 | 710 |
/* |
710 | 711 |
* (non-Javadoc) |
712 |
* @see org.gvsig.fmap.raster.IRasterRendering#getRenderFilterList() |
|
713 |
*/ |
|
714 |
public RasterFilterList getRenderFilterList(){ |
|
715 |
return (filterList != null) ? filterList : getRender().getFilterList(); |
|
716 |
} |
|
717 |
|
|
718 |
/* |
|
719 |
* (non-Javadoc) |
|
720 |
* @see org.gvsig.fmap.raster.IRasterRendering#getRenderTransparency() |
|
721 |
*/ |
|
722 |
public GridTransparency getRenderTransparency() { |
|
723 |
return (transparency != null) ? transparency : getRender().getLastTransparency(); |
|
724 |
} |
|
725 |
|
|
726 |
/* |
|
727 |
* (non-Javadoc) |
|
728 |
* @see org.gvsig.raster.hierarchy.IRasterRendering#getRenderBands() |
|
729 |
*/ |
|
730 |
public int[] getRenderBands() { |
|
731 |
return (renderBands != null) ? renderBands : getRender().getRenderBands(); |
|
732 |
} |
|
733 |
|
|
734 |
/* |
|
735 |
* (non-Javadoc) |
|
711 | 736 |
* @see org.gvsig.fmap.raster.layers.FLyrRasterSE#print(java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort, com.iver.utiles.swing.threads.Cancellable, double, javax.print.attribute.PrintRequestAttributeSet) |
712 | 737 |
*/ |
713 | 738 |
public void print(Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, PrintRequestAttributeSet properties) throws ReadDriverException { |
trunk/extensions/extWMS/src/com/iver/cit/gvsig/fmap/layers/FLyrWMS.java | ||
---|---|---|
526 | 526 |
else{ |
527 | 527 |
if(claseStr != null && !claseStr.equals("")){ |
528 | 528 |
try{ |
529 |
Class clase = Class.forName(claseStr);
|
|
529 |
Class clase = LayerFactory.getLayerClassForLayerClassName(claseStr);
|
|
530 | 530 |
Constructor constr = clase.getConstructor(null); |
531 | 531 |
status = (IStatusRaster)constr.newInstance(null); |
532 | 532 |
if(status != null) { |
... | ... | |
688 | 688 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, |
689 | 689 |
Cancellable cancel,double scale) throws ReadDriverException { |
690 | 690 |
callCount = 0; // mess code |
691 |
enableStopped(); |
|
691 | 692 |
if (isWithinScale(scale)){ |
692 | 693 |
Point2D p = viewPort.getOffset(); |
693 | 694 |
// p will be (0, 0) when drawing a view or other when painting onto |
... | ... | |
760 | 761 |
} |
761 | 762 |
} |
762 | 763 |
} |
764 |
disableStopped(); |
|
763 | 765 |
// Runtime r = Runtime.getRuntime(); |
764 | 766 |
// long mem = r.totalMemory() - r.freeMemory(); |
765 | 767 |
// System.err.println("Memoria total: " + (mem / 1024) +"KB"); |
... | ... | |
772 | 774 |
* @throws LoadLayerException |
773 | 775 |
*/ |
774 | 776 |
private void initializeRasterLayer(MultiRasterDataset[][] datasets, IBuffer[][] buf) throws LoadLayerException { |
775 |
super.init(); |
|
776 | 777 |
if(this.filterList != null) |
777 | 778 |
getRender().setFilterList(filterList); |
778 | 779 |
if(this.transparency != null) |
... | ... | |
786 | 787 |
names[i][j] = datasets[i][j].getDataset(0)[0].getFName(); |
787 | 788 |
super.setLoadParams(names); |
788 | 789 |
} |
790 |
super.init(); |
|
789 | 791 |
if(buf != null) { |
790 | 792 |
int drawablesBandCount = layerRaster.getDataSource().getBands().getDrawableBandsCount(); |
791 | 793 |
IBuffer buff = ((CompositeDataset)dataset).generateBuffer(buf, drawablesBandCount); |
... | ... | |
971 | 973 |
RasterFilterListManager filterManager = new RasterFilterListManager(filterList); |
972 | 974 |
ColorTableListManager ctm = new ColorTableListManager(filterManager); |
973 | 975 |
ctm.addColorTableFilter((GridPalette)param); |
976 |
filterList.move(ColorTableFilter.class, 0); |
|
977 |
filterList.controlTypes(); |
|
974 | 978 |
} |
975 | 979 |
layerRaster.getRender().setFilterList(filterList); |
976 | 980 |
} |
... | ... | |
993 | 997 |
|
994 | 998 |
} |
995 | 999 |
|
1000 |
/* |
|
1001 |
* (non-Javadoc) |
|
1002 |
* @see org.gvsig.fmap.raster.IRasterRendering#getRenderFilterList() |
|
1003 |
*/ |
|
1004 |
public RasterFilterList getRenderFilterList(){ |
|
1005 |
return (filterList != null) ? filterList : getRender().getFilterList(); |
|
1006 |
} |
|
996 | 1007 |
|
1008 |
/* |
|
1009 |
* (non-Javadoc) |
|
1010 |
* @see org.gvsig.fmap.raster.IRasterRendering#getRenderTransparency() |
|
1011 |
*/ |
|
1012 |
public GridTransparency getRenderTransparency() { |
|
1013 |
return (transparency != null) ? transparency : getRender().getLastTransparency(); |
|
1014 |
} |
|
1015 |
|
|
1016 |
/* |
|
1017 |
* (non-Javadoc) |
|
1018 |
* @see org.gvsig.raster.hierarchy.IRasterRendering#getRenderBands() |
|
1019 |
*/ |
|
1020 |
public int[] getRenderBands() { |
|
1021 |
return (renderBands != null) ? renderBands : getRender().getRenderBands(); |
|
1022 |
} |
|
1023 |
|
|
997 | 1024 |
/** |
998 | 1025 |
* This is the method used to draw a tile in a WMS mosaic layer. |
999 | 1026 |
* @throws LoadLayerException |
Also available in: Unified diff