}
mainCombo.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
ReportResultColumn selection = (ReportResultColumn) mainCombo.getSelectedItem();
AggregateFunction function = (AggregateFunction) subCombo.getSelectedItem();
if(selection != null) {
MathExpressionReportResultAgreg sample = new MathExpressionReportResultAgreg(
selection, AggregateFunction.ASIS, context);
Class cls = null;
try {
cls = sample.getCls();
} catch (ReportException ex) {
Message.warning(MathExpressionReportResultAgregPanel.this, ex);
function = null;
}
fillFunctions(cls, function);
}
subCombo.setEnabled(selection != null);
}
});
subCombo.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
ReportResultColumn selection = (ReportResultColumn) mainCombo.getSelectedItem();
AggregateFunction function = (AggregateFunction) subCombo.getSelectedItem();
if(selection != null
&& function != null) {
if(me == null) {
me = new MathExpressionReportResultAgreg(selection, function, context);