public boolean isNoDataOverlayEnabled() { final Layer noDataLayer = getNoDataLayer(false); return noDataLayer != null && noDataLayer.isVisible(); }
public void setNoDataOverlayEnabled(boolean enabled) { if (isNoDataOverlayEnabled() != enabled) { getNoDataLayer(true).setVisible(enabled); } }
public void updateNoDataImage() { // change configuration of layer ; not setting MultiLevelSource final String expression = getRaster().getValidMaskExpression(); final ImageLayer noDataLayer = (ImageLayer) getNoDataLayer(false); if (noDataLayer != null) { if (expression != null) { final Color color = noDataLayer.getConfiguration().getValue( NoDataLayerType.PROPERTY_NAME_COLOR); final MultiLevelSource multiLevelSource = ColoredMaskImageMultiLevelSource.create(getRaster().getProduct(), color, expression, true, getBaseImageLayer().getImageToModelTransform()); noDataLayer.setMultiLevelSource(multiLevelSource); } else { noDataLayer.setMultiLevelSource(MultiLevelSource.NULL); } } }
/** * Called after SNAP preferences have changed. * This behaviour is deprecated since we want to uswe separate style editors for each layers. * * @param configuration the configuration. */ public void appyLayerProperties(PropertyMap configuration) { setScrollBarsShown(configuration.getPropertyBool(PREFERENCE_KEY_IMAGE_SCROLL_BARS_SHOWN, false)); layerCanvas.setAntialiasing(true); layerCanvas.setNavControlShown(configuration.getPropertyBool(PREFERENCE_KEY_IMAGE_NAV_CONTROL_SHOWN, true)); layerCanvas.setBackground( configuration.getPropertyColor("image.background.color", DEFAULT_IMAGE_BACKGROUND_COLOR)); layerCanvasMouseHandler.setInvertZooming(configuration.getPropertyBool(PREFERENCE_KEY_INVERT_ZOOMING, false)); ImageLayer imageLayer = getBaseImageLayer(); if (imageLayer != null) { ProductSceneImage.applyBaseImageLayerStyle(configuration, imageLayer); } Layer noDataLayer = getNoDataLayer(false); if (noDataLayer != null) { ProductSceneImage.applyNoDataLayerStyle(configuration, noDataLayer); } Layer collectionLayer = getVectorDataCollectionLayer(false); if (collectionLayer != null) { ProductSceneImage.applyFigureLayerStyle(configuration, collectionLayer); } GraticuleLayer graticuleLayer = getGraticuleLayer(false); if (graticuleLayer != null) { ProductSceneImage.applyGraticuleLayerStyle(configuration, graticuleLayer); } }