Browse Source

fix: fvs图表配置不保存不生效 #REPORT-94359

release/11.0
shine 2 years ago
parent
commit
e9383fb4bf
  1. 9
      designer-base/src/main/java/com/fr/design/gui/chart/BaseChartPropertyPane.java
  2. 10
      designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java

9
designer-base/src/main/java/com/fr/design/gui/chart/BaseChartPropertyPane.java

@ -3,6 +3,7 @@ package com.fr.design.gui.chart;
import com.fr.base.chart.BaseChartCollection;
import com.fr.design.designer.TargetComponent;
import com.fr.design.mainframe.DockingView;
import org.jetbrains.annotations.Nullable;
/**
* 图表属性界面 抽象, 用于多工程协作..
@ -14,8 +15,12 @@ public abstract class BaseChartPropertyPane extends DockingView {
* 设置是否支持单元格数据.
*/
public abstract void setSupportCellData(boolean supportCellData);
public abstract void populateChartPropertyPane(BaseChartCollection collection, TargetComponent<?> ePane);
public void populateChartPropertyPane(BaseChartCollection collection, TargetComponent<?> ePane) {
populateChartPropertyPane(collection, ePane, null);
}
public abstract void populateChartPropertyPane(BaseChartCollection collection, TargetComponent<?> ePane, @Nullable Runnable callback);
public abstract ChartEditPaneProvider getChartEditPane();

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

@ -17,6 +17,7 @@ import com.fr.design.gui.chart.ChartEditPaneProvider;
import com.fr.design.gui.frpane.UITitlePanel;
import com.fr.design.mainframe.chart.ChartEditPane;
import com.fr.design.utils.gui.GUICoreUtils;
import org.jetbrains.annotations.Nullable;
import javax.swing.BorderFactory;
import javax.swing.Icon;
@ -96,7 +97,7 @@ public class ChartPropertyPane extends BaseChartPropertyPane {
* @param collection 收集图表
* @param ePane 面板
*/
public void populateChartPropertyPane(ChartCollection collection, TargetComponent<?> ePane) {
public void populateChartPropertyPane(ChartCollection collection, TargetComponent<?> ePane, @Nullable Runnable callback) {
new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
@ -114,6 +115,9 @@ public class ChartPropertyPane extends BaseChartPropertyPane {
} else {
GUICoreUtils.setEnabled(chartEditPane, false);
}
if (callback != null) {
callback.run();
}
}
}.execute();
}
@ -123,9 +127,9 @@ public class ChartPropertyPane extends BaseChartPropertyPane {
* @param collection 收集图表
* @param ePane 面板
*/
public void populateChartPropertyPane(BaseChartCollection collection, TargetComponent<?> ePane) {
public void populateChartPropertyPane(BaseChartCollection collection, TargetComponent<?> ePane, @Nullable Runnable callback) {
if (collection instanceof ChartCollection) {
populateChartPropertyPane((ChartCollection) collection, ePane);
populateChartPropertyPane((ChartCollection) collection, ePane, callback);
}
}

Loading…
Cancel
Save