Browse Source

REPORT-83195 卡顿点优化-单元格初次添加图表卡死

feature/x
John.Ying-应志浩 2 years ago
parent
commit
437c05bbc0
  1. 31
      designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java

31
designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java

@ -9,6 +9,7 @@ import com.fr.base.chart.BaseChartCollection;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.charttypes.ChartTypeManager; import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chartx.attr.ChartProvider; import com.fr.chartx.attr.ChartProvider;
import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONHelper;
import com.fr.design.ChartTypeInterfaceManager; import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.design.gui.chart.BaseChartPropertyPane; import com.fr.design.gui.chart.BaseChartPropertyPane;
@ -19,6 +20,7 @@ import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.Icon; import javax.swing.Icon;
import javax.swing.SwingWorker;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
@ -95,16 +97,25 @@ public class ChartPropertyPane extends BaseChartPropertyPane {
* @param ePane 面板 * @param ePane 面板
*/ */
public void populateChartPropertyPane(ChartCollection collection, TargetComponent<?> ePane) { public void populateChartPropertyPane(ChartCollection collection, TargetComponent<?> ePane) {
String chartID = collection.getSelectedChartProvider(ChartProvider.class).getID(); new SwingWorker<Void, Void>() {
updateChartEditPane(collection.getSelectedChartProvider(ChartProvider.class).getID()); @Override
setSupportCellData(true); protected Void doInBackground() throws Exception {
this.container.setEPane(ePane); GEOJSONHelper.getInstance();
return null;
if (ChartTypeManager.getInstance().chartExit(chartID)) { }
chartEditPane.populate(collection); @Override
} else { protected void done() {
GUICoreUtils.setEnabled(chartEditPane, false); String chartID = collection.getSelectedChartProvider(ChartProvider.class).getID();
} updateChartEditPane(collection.getSelectedChartProvider(ChartProvider.class).getID());
setSupportCellData(true);
container.setEPane(ePane);
if (ChartTypeManager.getInstance().chartExit(chartID)) {
chartEditPane.populate(collection);
} else {
GUICoreUtils.setEnabled(chartEditPane, false);
}
}
}.execute();
} }
/** /**

Loading…
Cancel
Save