Revision 18803
trunk/extensions/extRasterTools-SE/src/org/gvsig/rastertools/RasterModule.java | ||
---|---|---|
52 | 52 |
|
53 | 53 |
import com.iver.andami.PluginServices; |
54 | 54 |
import com.iver.andami.plugins.Extension; |
55 |
import com.iver.andami.ui.mdiManager.IWindow; |
|
55 | 56 |
import com.iver.cit.gvsig.fmap.MapContext; |
56 | 57 |
import com.iver.cit.gvsig.fmap.MapControl; |
57 | 58 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
... | ... | |
476 | 477 |
* @see org.gvsig.raster.util.ConfigurationListener#actionConfigurationChanged(org.gvsig.raster.util.ConfigurationEvent) |
477 | 478 |
*/ |
478 | 479 |
public void actionConfigurationChanged(ConfigurationEvent e) { |
480 |
if (e.getKey().equals("nodata_transparency_enabled")) { |
|
481 |
boolean noDataTransparent = ((Boolean) e.getValue()).booleanValue(); |
|
482 |
IWindow[] f = PluginServices.getMDIManager().getAllWindows(); |
|
483 |
if (f == null) |
|
484 |
return; |
|
485 |
for (int i = 0; i < f.length; i++) { |
|
486 |
if (f[i] instanceof View) { |
|
487 |
View vista = (View) f[i]; |
|
488 |
IProjectView model = vista.getModel(); |
|
489 |
MapContext map = model.getMapContext(); |
|
490 |
FLayers lyrs = map.getLayers(); |
|
491 |
for (int j = 0; j < lyrs.getLayersCount(); j++) { |
|
492 |
if(lyrs.getLayer(j) instanceof FLyrRasterSE) |
|
493 |
((FLyrRasterSE)lyrs.getLayer(j)).getDataSource().getTransparencyFilesStatus().activeNoData(noDataTransparent); |
|
494 |
} |
|
495 |
} |
|
496 |
} |
|
497 |
|
|
498 |
return; |
|
499 |
} |
|
500 |
|
|
479 | 501 |
if (e.getKey().equals("general_auto_preview")) { |
480 | 502 |
autoRefreshView = ((Boolean) e.getValue()).booleanValue(); |
481 | 503 |
return; |
Also available in: Unified diff