Map<String, Product> getProductMap() { final Map<String, Product> productMap = new HashMap<>(5); productMap.put("source", getSourceProduct()); if (collocationCrsUI.getRadioButton().isSelected()) { productMap.put("collocateWith", collocationCrsUI.getCollocationProduct()); } return productMap; }
@Override public void propertyChange(PropertyChangeEvent evt) { collocateProductSelector.getProductNameComboBox().setEnabled(panel.isEnabled()); collocateProductSelector.getProductFileChooserButton().setEnabled(panel.isEnabled()); final boolean collocate = getRadioButton().isSelected(); getCrsUI().firePropertyChange("collocate", !collocate, collocate); } });
@Override protected void onReset() { final Product collocationProduct = collocationCrsUI.getCollocationProduct(); ImageGeometry imageGeometry; if (collocationCrsUI.getRadioButton().isSelected() && collocationProduct != null) { imageGeometry = ImageGeometry.createCollocationTargetGeometry(sourceProduct, collocationProduct); } else { imageGeometry = ImageGeometry.createTargetGeometry(sourceProduct, crs, null, null, null, null, null, null, null, null, null); } outputGeometryFormModel.resetToDefaults(imageGeometry); } }
parameterMap.put("addDeltaBands", reprojectionModel.addDeltaBands); parameterMap.put("noDataValue", reprojectionModel.noDataValue); if (!collocationCrsUI.getRadioButton().isSelected()) { CoordinateReferenceSystem selectedCrs = getSelectedCrs(); if (selectedCrs != null) {
} else { final Product collocationProduct = collocationCrsUI.getCollocationProduct(); if (collocationCrsUI.getRadioButton().isSelected() && collocationProduct != null) { workCopy = new OutputGeometryFormModel(sourceProduct, collocationProduct); } else {
private void updateProductSize() { int width = 0; int height = 0; final Product sourceProduct = getSourceProduct(); if (sourceProduct != null && crs != null) { if (!reprojectionModel.preserveResolution && outputGeometryModel != null) { PropertySet container = outputGeometryModel.getPropertySet(); width = container.getValue("width"); height = container.getValue("height"); } else { ImageGeometry iGeometry; final Product collocationProduct = collocationCrsUI.getCollocationProduct(); if (collocationCrsUI.getRadioButton().isSelected() && collocationProduct != null) { iGeometry = ImageGeometry.createCollocationTargetGeometry(sourceProduct, collocationProduct); } else { iGeometry = ImageGeometry.createTargetGeometry(sourceProduct, crs, null, null, null, null, null, null, null, null, null); } Rectangle imageRect = iGeometry.getImageRect(); width = imageRect.width; height = imageRect.height; } } infoForm.setWidth(width); infoForm.setHeight(height); }