Browse Source

Pull request #12556: REPORT-79271 feat:FVS支持图表单元格数据来源

Merge in DESIGN/design from ~CARLSON/design:release/11.0 to release/11.0

* commit '0c4d4294887ee33f577956ba647c58862b4ddd48':
  REPORT-79271 feat:兼容处理调整为新增功能点
  REPORT-79271 feat:考虑兼容
  REPORT-79271 feat:FVS支持图表单元格数据来源
newui
Carlson-洪金阳 1 year ago
parent
commit
b3cbcb1312
  1. 40
      designer-base/src/main/java/com/fr/design/mainframe/chart/mode/ChartEditContext.java
  2. 2
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java

40
designer-base/src/main/java/com/fr/design/mainframe/chart/mode/ChartEditContext.java

@ -3,6 +3,9 @@ package com.fr.design.mainframe.chart.mode;
import com.fr.common.annotations.Open; import com.fr.common.annotations.Open;
import com.fr.design.base.mode.DesignModeContext; import com.fr.design.base.mode.DesignModeContext;
import java.util.HashSet;
import java.util.Set;
/** /**
* @author shine * @author shine
* @version 10.0 * @version 10.0
@ -13,6 +16,19 @@ public class ChartEditContext {
private static ChartEditMode current = ChartEditMode.NORMAL; private static ChartEditMode current = ChartEditMode.NORMAL;
private static final Set<DuchampFeature> features = new HashSet<>();
/**
* 功能点枚举
*/
public enum DuchampFeature {
SUPPORT_REPORT_DATA
}
/**
* 切换图表编辑模式
* @param mode 图表编辑模式
*/
public static void switchTo(ChartEditMode mode) { public static void switchTo(ChartEditMode mode) {
current = mode; current = mode;
} }
@ -33,4 +49,28 @@ public class ChartEditContext {
public static boolean supportTheme() { public static boolean supportTheme() {
return !DesignModeContext.isDuchampMode(); return !DesignModeContext.isDuchampMode();
} }
/**
* 注册功能点
*/
public static void addDuchampFeature(DuchampFeature feature) {
features.add(feature);
}
/**
* 移除功能点
*/
public static void removeDuchampFeature(DuchampFeature feature) {
features.remove(feature);
}
/**
* 当前模式下是否支持单元格数据来源
*/
public static boolean supportReportData() {
if (normalMode()) {
return true;
}
return features.contains(DuchampFeature.SUPPORT_REPORT_DATA);
}
} }

2
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java

@ -68,7 +68,7 @@ public class NormalChartDataPane extends DataContentsPane {
label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT));
northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null}));
northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,8)); northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,8));
if (ChartEditContext.normalMode()) { if (ChartEditContext.supportReportData()) {
this.add(northPane, BorderLayout.NORTH); this.add(northPane, BorderLayout.NORTH);
} }
this.add(cardPane, BorderLayout.CENTER); this.add(cardPane, BorderLayout.CENTER);

Loading…
Cancel
Save