/** * apply the properties * * @return success */ public boolean applyProperties() { if (!super.applyProperties()) { return false; } boolean changed = false; String what = ""; try { what = "Bad bin value"; changed |= (binRoundToField.getTime() != binRoundTo) || (binWidth != binWidthField.getTime()); binRoundTo = binRoundToField.getTime(); binWidth = binWidthField.getTime(); what = "Bad grid points X value"; changed |= (gridX != gridProperties.getGridX()); what = "Bad grid points Y value"; changed |= (gridY != gridProperties.getGridY()); what = "Bad grid passes value"; changed |= (numGridPasses != gridProperties.getNumGridPasses()); what = "Bad grid unit value"; changed |= (!gridUnit.equals(gridProperties.getGridUnit())); what = "Bad grid search value"; changed |= (gridSearchRadius != gridProperties.getGridSearchRadius()); what = "Bad grid gain value"; changed |= (gridGain != gridProperties.getGridGain()); } catch (NumberFormatException nfe) { LogUtil.userErrorMessage(what); return false; } gridX = gridProperties.getGridX(); gridY = gridProperties.getGridY(); gridUnit = gridProperties.getGridUnit(); numGridPasses = gridProperties.getNumGridPasses(); gridGain = gridProperties.getGridGain(); gridSearchRadius = gridProperties.getGridSearchRadius(); if (makeGridFields != makeGridFieldsCbx.isSelected()) { makeGridFields = makeGridFieldsCbx.isSelected(); dataChoices = null; getDataChoices(); getDataContext().dataSourceChanged(this); } if (changed) { flushCache(); } return true; }
/** Gets called by the {@link DataManager} when this DataSource has been removed. */ public void doRemove() { super.doRemove(); if (gridProperties != null) { gridProperties.doRemove(); } }