@Override protected boolean verifyUserInput() { boolean b = super.verifyUserInput(); String name = paramNewName.getValueAsText(); boolean bName = name != null && name.length() > 0; boolean subset = true; if (subsetRButton.isSelected() && subsetDef == null) { subset = false; showErrorDialog("Please define a valid spatial or spectral subset."); /*I18N*/ } return b && bName && subset; }
@Override protected boolean verifyUserInput() { String uncertaintyExpression = targetExprArea.getText(); if (uncertaintyExpression == null || uncertaintyExpression.trim().isEmpty()) { Dialogs.showError("Uncertainty expression is empty."); return false; } if (uncertaintyExpression.startsWith(ERROR_PREFIX)) { Dialogs.showError(uncertaintyExpression.substring(ERROR_PREFIX.length())); return false; } if (sourceBand.getProduct().containsBand(getBandName())) { Dialogs.showError("A raster with name '" + getBandName() + "' already exists."); return false; } return super.verifyUserInput(); }
@Override protected boolean verifyUserInput() { String name = _paramName.getValueAsText(); if (name == null || name.length() == 0) { showWarningDialog("The field '" + _paramName.getProperties().getLabel() + "' must not be empty"); /*I18N*/ return false; } if (StringUtils.contains(_currentProduct.getBandNames(), name)) { showErrorDialog("A band with the name '" + name + "' already exists.\n" + "Please choose a another one."); /*I18N*/ return false; } return super.verifyUserInput(); }
@Override protected boolean verifyUserInput() { if (!isValidExpression()) { showErrorDialog(Bundle.CTL_BandMathsDialog_ErrExpressionNotValid()); return false; } if (isTargetBandReferencedInExpression()) { showErrorDialog(Bundle.CTL_BandMathsDialog_ErrBandCannotBeReferenced(getBandName())); return false; } return super.verifyUserInput(); }