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-王宗雨 1 month ago
parent
commit
3cf8cdbfbf
  1. 6
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartOtherPane.java
  2. 15
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartStylePane.java

6
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 javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
@ -114,7 +115,10 @@ public class ChartOtherPane extends AbstractChartAttrPane {
if (ChartOtherPane.this.isHaveCondition()) {
VanChartRichEditorPane.refreshCommonChartFieldNames(chart);
ColSelectedWithSummaryMethodEditor.refreshCommonChartFieldNames(chart);
conditionAttrPane.populateBean(chart);
SwingUtilities.invokeLater(() -> {
conditionAttrPane.populateBean(chart);
initListener(conditionAttrPane);
});
}
}

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

Loading…
Cancel
Save