public void validate(final IValidation results) {
    // Validate the well bore radius is positive.
    final int size = _size.get();
    if (size <= 0) {
      results.error(WELL_BORE_RADIUS, "Invalid bore radius: " + size);
    } else if (size == 0) {
      results.warning(WELL_BORE_RADIUS, "Zero bore radius specified.");
    }

    // Validate the well bore color is non-null.
    if (_color.isNull()) {
      results.error(WELL_BORE_COLOR, "No bore color specified.");
    }
  }
  public void validate(final IValidation results) {
    if (_scatterNumPoints.get() < 1) {
      results.error(SCATTER_NUM_POINTS, "The number of scatter points must be > 0.");
    }

    if (_histogramNumCells.get() < 1) {
      results.error(HISTOGRAM_NUM_CELLS, "The number of histogram cells must be > 0.");
    }

    if (_histogramMinValue.get() > _histogramMaxValue.get()) {
      results.error(
          HISTOGRAM_MIN_VALUE, "The histogram minimum value must be less than the maximum value.");
    }

    if (_pieNumWedges.get() < 2) {
      results.error(PIE_NUM_WEDGES, "The number of pie wedges must be >= 2.");
    }

    if (_gridImageNumRows.get() < 1) {
      results.error(GRID_IMAGE_NUM_ROWS, "The number of grid image rows must be > 0.");
    }

    if (_gridImageNumCols.get() < 1) {
      results.error(GRID_IMAGE_NUM_COLS, "The number of grid image columns must be > 0.");
    }
  }
  @Override
  public void validate(IValidation results) {
    // Validate the input grid is non-null and of the correct type.
    if (_inputGrid.isNull()) {
      results.error(_inputGrid, "No input grid specified.");
    }

    // Validate the output name is non-zero length.
    if (_outputGridName.isEmpty()) {
      results.error(_outputGridName, "No output grid name specified.");
    }

    // Validate the filter size
    if (!_filterMethodProp.get().getFilter().validateSize(_size.get())) {
      results.error(_size, _filterMethodProp.get().getFilter().getMessage());
    }

    // Check if an entry already exists in the datastore.
    if (!_inputGrid.isNull() && !_outputGridName.isEmpty()) {
      if (Grid3dFactory.existsInStore(_inputGrid.get(), _outputGridName.get())) {
        results.warning(_outputGridName, "Exists in datastore and will be overwritten.");
      }
    }
  }