Browse Source

Pull request #15434: REPORT-137630 feat: 东区图表Tab切换性能优化

Merge in DESIGN/design from ~ZONGYU.WANG/design:fbp/feature to fbp/feature

* commit '7795fd6fbb264d7908fb0209796b2670554795b9':
  REPORT-137630 feat: 东区图表Tab切换性能优化
fbp/feature
Zongyu.Wang-王宗雨 2 weeks ago
parent
commit
3cf8cdbfbf
  1. 4
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java
  2. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartStylePane.java

4
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java

@ -17,6 +17,7 @@ import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.van.chart.designer.component.richText.VanChartRichEditorPane; import com.fr.van.chart.designer.component.richText.VanChartRichEditorPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -114,7 +115,10 @@ public class ChartOtherPane extends AbstractChartAttrPane {
if (ChartOtherPane.this.isHaveCondition()) { if (ChartOtherPane.this.isHaveCondition()) {
VanChartRichEditorPane.refreshCommonChartFieldNames(chart); VanChartRichEditorPane.refreshCommonChartFieldNames(chart);
ColSelectedWithSummaryMethodEditor.refreshCommonChartFieldNames(chart); ColSelectedWithSummaryMethodEditor.refreshCommonChartFieldNames(chart);
SwingUtilities.invokeLater(() -> {
conditionAttrPane.populateBean(chart); conditionAttrPane.populateBean(chart);
initListener(conditionAttrPane);
});
} }
} }

7
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartStylePane.java

@ -30,6 +30,7 @@ public class ChartStylePane extends AbstractChartAttrPane {
private Chart chart; private Chart chart;
private AttributeChangeListener listener; private AttributeChangeListener listener;
private BasicPane chartAxisPane; private BasicPane chartAxisPane;
private boolean chartStyleInitialized = false;
protected Chart getChart() { protected Chart getChart() {
return chart; return chart;
@ -64,12 +65,16 @@ public class ChartStylePane extends AbstractChartAttrPane {
@Override @Override
public void populate(ChartCollection collection) { public void populate(ChartCollection collection) {
this.chart = collection.getSelectedChart(); this.chart = collection.getSelectedChart();
// 子组件布局初始化,只在第一次进入的时候绘制
if (!chartStyleInitialized) {
this.remove(leftContentPane); this.remove(leftContentPane);
initContentPane(); initContentPane();
this.removeAttributeChangeListener(); this.removeAttributeChangeListener();
stylePane.populateBean(chart);
this.addAttributeChangeListener(listener); this.addAttributeChangeListener(listener);
this.initAllListeners(); this.initAllListeners();
chartStyleInitialized = true;
}
this.initAllListeners();
} }
@Override @Override

Loading…
Cancel
Save