private Double magDelta;
@Override
public void invoke(ISeriesInfoProvider seriesInfo) {
SingleSeriesSelectionDialog seriesSelector = new SingleSeriesSelectionDialog(
Mediator.getInstance().getObservationPlotModel(
AnalysisType.RAW_DATA));
if (!seriesSelector.isCancelled()) {
// Get magnitude shift.
List<ITextComponent<?>> inputFields = new ArrayList<ITextComponent<?>>();
DoubleField magDeltaField = new DoubleField("Magnitude Change",
null, null, magDelta);
inputFields.add(magDeltaField);
MultiEntryComponentDialog magDeltaDlg = new MultiEntryComponentDialog(
"Magnitude Change Input", inputFields);
// Create a new series with the adjusted magnitude.
if (!magDeltaDlg.isCancelled()) {
magDelta = magDeltaField.getValue();
SeriesType type = seriesSelector.getSeries();
List<ValidObservation> obs = seriesInfo.getObservations(type);
String description = String.format("%s shifted by %s", type
.getDescription(), NumericPrecisionPrefs
.formatMag(magDelta));