private void setEnableState() {
   ProductNode productNode = lookup.lookup(ProductNode.class);
   boolean state = false;
   if (productNode != null) {
     Product product = productNode.getProduct();
     state =
         product != null
             && product.getGeoCoding() != null
             && product.getGeoCoding().canGetGeoPos()
             && product.getGeoCoding().canGetPixelPos();
   }
   setEnabled(state);
 }
예제 #2
0
 @Override
 public void nodeDataChanged(ProductNodeEvent event) {
   super.nodeDataChanged(event);
   if (!histogramPlotConfig.useRoiMask) {
     return;
   }
   final Mask roiMask = histogramPlotConfig.roiMask;
   if (roiMask == null) {
     return;
   }
   final ProductNode sourceNode = event.getSourceNode();
   if (!(sourceNode instanceof Mask)) {
     return;
   }
   final String maskName = sourceNode.getName();
   if (roiMask.getName().equals(maskName)) {
     model.removeStx(createHistogramConfig());
     updateComponents();
   }
 }