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