public void update(PeriodAnalysisSelectionMessage info) {
if (info.getSource() != parent) {
// Find the datapoint in the model (could be minimal or full
// stats).
IPeriodAnalysisDatum datum = info.getDataPoint();
WWZStatistic foundStat = null;
for (WWZStatistic stat : model.getStats()) {
if (stat.equals(datum)) {
foundStat = stat;
break;
}
}
if (foundStat != null) {
double x = foundStat.getValue(model.getDomainType());
double y = foundStat.getValue(model.getRangeType());
chart.getXYPlot().setDomainCrosshairValue(x);
chart.getXYPlot().setRangeCrosshairValue(y);
}
}