|
|
|
@ -5,6 +5,7 @@ import com.fr.base.Utils;
|
|
|
|
|
import com.fr.base.chart.chartdata.TopDefinitionProvider; |
|
|
|
|
import com.fr.chart.chartattr.Bar2DPlot; |
|
|
|
|
import com.fr.chart.chartattr.ChartCollection; |
|
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
|
import com.fr.chart.chartdata.NormalReportDataDefinition; |
|
|
|
|
import com.fr.design.event.UIObserver; |
|
|
|
|
import com.fr.design.event.UIObserverListener; |
|
|
|
@ -21,6 +22,7 @@ import java.awt.*;
|
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -37,6 +39,10 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
|
|
|
|
|
private ArrayList<TinyFormulaPane> formualList = new ArrayList<TinyFormulaPane>(); |
|
|
|
|
private UIObserverListener uiobListener = null; |
|
|
|
|
|
|
|
|
|
public List<TinyFormulaPane> getFormualList() { |
|
|
|
|
return formualList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public CategoryPlotMoreCateReportDataContentPane() { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -110,13 +116,13 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
boxPane.remove(newButtonPane); |
|
|
|
|
formualList.remove(pane); |
|
|
|
|
checkAddButton(); |
|
|
|
|
checkComponent(); |
|
|
|
|
relayoutPane(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
delButton.registerChangeListener(uiobListener); |
|
|
|
|
|
|
|
|
|
checkAddButton(); |
|
|
|
|
checkComponent(); |
|
|
|
|
relayoutPane(); |
|
|
|
|
|
|
|
|
|
return pane; |
|
|
|
@ -127,6 +133,10 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
|
|
|
|
|
addButton.setEnabled(size < 2); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void checkComponent() { |
|
|
|
|
checkAddButton(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void relayoutPane() { |
|
|
|
|
this.revalidate(); |
|
|
|
|
} |
|
|
|
@ -173,15 +183,20 @@ public class CategoryPlotMoreCateReportDataContentPane extends CategoryPlotRepor
|
|
|
|
|
super.updateBean(collection); |
|
|
|
|
|
|
|
|
|
TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); |
|
|
|
|
Plot plot = collection.getSelectedChart().getPlot(); |
|
|
|
|
if (definition instanceof NormalReportDataDefinition) { |
|
|
|
|
NormalReportDataDefinition reportDefinition = (NormalReportDataDefinition) definition; |
|
|
|
|
|
|
|
|
|
reportDefinition.clearMoreCate(); |
|
|
|
|
updateMoreCate(reportDefinition, plot); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void updateMoreCate(NormalReportDataDefinition reportDefinition, Plot plot) { |
|
|
|
|
for (int i = 0, size = formualList.size(); i < size; i++) { |
|
|
|
|
TinyFormulaPane pane = formualList.get(i); |
|
|
|
|
reportDefinition.addMoreCate(canBeFormula(pane.updateBean())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |