Minor tweaks to EvAJob

This commit is contained in:
Marcel Kronfeld 2011-05-05 13:32:57 +00:00
parent 69272b4918
commit 88575949cd
2 changed files with 11 additions and 3 deletions

View File

@ -1044,6 +1044,11 @@ public abstract class AbstractStatistics implements InterfaceTextListener, Inter
}
}
public String[] getCurrentFieldHeaders() {
StringSelection fSel = m_StatsParams.getFieldSelection();
return fSel.getSelected();
}
/**
* Do some data collection on the population.
*

View File

@ -40,6 +40,7 @@ public class EvAJob implements Serializable, InterfaceStatisticsListener {
public EvAJob(InterfaceGOParameters params, InterfaceStatistics sts) {
this();
this.params = params;
if (sts instanceof AbstractStatistics) fieldHeaders=((AbstractStatistics)sts).getCurrentFieldHeaders();
sts.addDataListener(this);
}
@ -235,9 +236,11 @@ public class EvAJob implements Serializable, InterfaceStatisticsListener {
StringSelection newSel = (StringSelection) curSelection.clone();
curSelection.setAllSelectionStates(false);
for (String field : fieldHeaders) {
curSelection.setSelected(field, true);
}
if (fieldHeaders!=null) {
for (String field : fieldHeaders) {
curSelection.setSelected(field, true);
}
} else System.err.println("Warning, empty field selection in job " + this);
return newSel;
}
}