Browse Source

Merge pull request #1918 in DESIGN/design from release/10.0 to bugfix/10.0

* commit '0d57309be0707556cead79900f80a438045e8b93':
  CHART-14813 dierta time
  Merge branch 'release/10.0' of https://code.fineres.com/scm/~yvan/design into release/10.0 # 请输入一个提交信息以解释此合并的必要性,尤其是将一个更新后的上游分支 # 合并到主题分支。 # # 以 '#' 开始的行将被忽略,而空的提交说明将终止提交。
  Merge branch 'release/10.0' of https://code.fineres.com/scm/~yvan/design into release/10.0 # 请输入一个提交信息以解释此合并的必要性,尤其是将一个更新后的上游分支 # 合并到主题分支。 # # 以 '#' 开始的行将被忽略,而空的提交说明将终止提交。
  Merge branch 'release/10.0' of https://code.fineres.com/scm/~yvan/design into release/10.0 # 请输入一个提交信息以解释此合并的必要性,尤其是将一个更新后的上游分支 # 合并到主题分支。 # # 以 '#' 开始的行将被忽略,而空的提交说明将终止提交。
  系列标记点界面
  REPORT-35906 数据集编辑的界面,在添加行数或修改行数后,代码中会做一部分重复添加,根据添加的顺序特点,删去多余的Component,解决bug
  结果数据不支持数据筛选
  系列和数据点提示界面
bugfix/10.0
superman 4 years ago
parent
commit
c1722bbde9
  1. 13
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java
  2. 6
      designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java
  3. 6
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java
  4. 99
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java
  5. 4
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxStylePane.java
  6. 123
      designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java
  7. 37
      designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java
  8. 5
      designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java
  9. 5
      designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java
  10. 59
      designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxTableDefinitionHelper.java

13
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MaxMemRowCountPanel.java

@ -1,5 +1,6 @@
package com.fr.design.data.tabledata.tabledatapane;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -11,6 +12,8 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.i18n.Toolkit;
import com.fr.stable.StringUtils;
public class MaxMemRowCountPanel extends UIToolbar {
@ -19,7 +22,7 @@ public class MaxMemRowCountPanel extends UIToolbar {
private static final String[] CACHE_LIST = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save_All_Records_In_Memory"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Max_Mem_Row_Count") };
private static final int MAX_WIDTH = getMaxComBoBoxWidth() > 200 ? 350 : 250;
private static final int MAX_COMPONENT_COUNT_OF_MAX_MEMORY = 4;
private static int getMaxComBoBoxWidth() {
int maxWidth = GraphHelper.getWidth(CACHE_LIST[0]);
for (int i = 1; i < CACHE_LIST.length; i++) {
@ -86,9 +89,13 @@ public class MaxMemRowCountPanel extends UIToolbar {
this.removeAll();
this.add(switchCache);
switchCache.setSelectedIndex(MAX_IN_MEMORY);
this.add(new UILabel(" "));
if (this.getComponentCount() == MAX_COMPONENT_COUNT_OF_MAX_MEMORY) {
//此处因为switchCache的setSelectedIndex可能会造成双层调用,然后因为重复添加组件产生bug,故而定义这个工具栏的正常最大组件数,做个判断
return;
}
this.add(new UILabel(StringUtils.BLANK));
this.add(numberSpinner);
this.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row")));
this.add(new UILabel(StringUtils.BLANK + Toolkit.i18nText("Fine-Design_Basic_Row")));
this.validate();
this.repaint();
}

6
designer-chart/src/main/java/com/fr/extended/chart/ExtendedOtherPane.java

@ -109,7 +109,7 @@ public class ExtendedOtherPane<T extends AbstractChart> extends AbstractChartAtt
}
});
autoRefreshTime = new UISpinner(0, Integer.MAX_VALUE, 1, 0);
autoRefreshTime = createIntervalTime();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f, 20};
@ -129,6 +129,10 @@ public class ExtendedOtherPane<T extends AbstractChart> extends AbstractChartAtt
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Refresh"), gapPane);
}
protected UISpinner createIntervalTime() {
return new UISpinner(1, Integer.MAX_VALUE, 5, 60);
}
private JPanel createHyperlinkPane() {
hyperLinkPane = new ExtendedChartHyperLinkPane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Insert_Hyperlink"), hyperLinkPane);

6
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java

@ -1,6 +1,8 @@
package com.fr.van.chart.box;
import com.fr.chart.chartattr.Plot;
import com.fr.plugin.chart.base.AttrTooltip;
import com.fr.plugin.chart.box.attr.AttrBoxTooltip;
import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane;
@ -14,6 +16,10 @@ public class VanChartBoxPlotTooltipPane extends VanChartPlotTooltipPane {
tooltipContentPane = new VanChartBoxTooltipContentPane(parent, VanChartBoxPlotTooltipPane.this);
}
protected AttrTooltip getAttrTooltip() {
return new AttrBoxTooltip();
}
protected boolean hasTooltipSeriesType() {
return false;
}

99
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java

@ -1,12 +1,107 @@
package com.fr.van.chart.box;
import com.fr.chart.chartattr.Plot;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.van.chart.column.VanChartColumnSeriesPane;
import com.fr.plugin.chart.box.VanChartBoxPlot;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartBeautyPane;
import com.fr.van.chart.designer.component.VanChartMarkerPane;
import com.fr.van.chart.designer.component.border.VanChartBorderPane;
import com.fr.van.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
public class VanChartBoxSeriesPane extends VanChartColumnSeriesPane {
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
public class VanChartBoxSeriesPane extends VanChartAbstractPlotSeriesPane {
private JPanel normalMarker;
private JPanel outlierMarker;
private VanChartMarkerPane normalValuePane;
private VanChartMarkerPane outlierValuePane;
public VanChartBoxSeriesPane(ChartStylePane parent, Plot plot) {
super(parent, plot);
}
protected JPanel getContentInPlotType() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{
new Component[]{createBorderPane()},
new Component[]{createNormalValuePane()},
new Component[]{createOutlierValuePane()}
};
contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return contentPane;
}
protected VanChartBorderPane createDiffBorderPane() {
return new VanChartBorderPane();
}
private JPanel createNormalValuePane() {
normalValuePane = new VanChartMarkerPane();
normalMarker = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Engine_Chart_Normal_Value"), normalValuePane);
return normalMarker;
}
private JPanel createOutlierValuePane() {
outlierValuePane = new VanChartMarkerPane();
outlierMarker = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Engine_Chart_Outlier_Value"), outlierValuePane);
return outlierMarker;
}
private void checkMarkerPane(boolean isDetailed) {
normalMarker.setVisible(isDetailed);
outlierMarker.setVisible(isDetailed);
}
protected void setColorPaneContent(JPanel panel) {
panel.add(createAlphaPane(), BorderLayout.SOUTH);
}
protected VanChartBeautyPane createStylePane() {
return null;
}
public void populateBean(Plot plot) {
if (plot == null) {
return;
}
super.populateBean(plot);
if (plot instanceof VanChartBoxPlot) {
normalValuePane.populate(((VanChartBoxPlot) plot).getNormalValue());
outlierValuePane.populate(((VanChartBoxPlot) plot).getOutlierValue());
checkMarkerPane(((VanChartBoxPlot) plot).isDetailed());
}
}
public void updateBean(Plot plot) {
if (plot == null) {
return;
}
if (plot instanceof VanChartBoxPlot) {
((VanChartBoxPlot) plot).setNormalValue(normalValuePane.update());
((VanChartBoxPlot) plot).setOutlierValue(outlierValuePane.update());
}
super.updateBean(plot);
}
}

4
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxStylePane.java

@ -2,11 +2,11 @@ package com.fr.van.chart.box;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.van.chart.bar.VanChartBarStylePane;
import com.fr.van.chart.designer.style.VanChartStylePane;
import java.util.List;
public class VanChartBoxStylePane extends VanChartBarStylePane {
public class VanChartBoxStylePane extends VanChartStylePane {
public VanChartBoxStylePane(AttributeChangeListener listener) {
super(listener);

123
designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java

@ -1,8 +1,12 @@
package com.fr.van.chart.box;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.base.AttrTooltipContent;
import com.fr.plugin.chart.box.attr.AttrBoxTooltipContent;
import com.fr.van.chart.designer.component.VanChartTooltipContentPane;
import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox;
import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithCheckBox;
import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.JPanel;
@ -10,6 +14,14 @@ import java.awt.Component;
public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
private VanChartFormatPaneWithCheckBox number;
private VanChartFormatPaneWithCheckBox max;
private VanChartFormatPaneWithCheckBox q3;
private VanChartFormatPaneWithCheckBox median;
private VanChartFormatPaneWithCheckBox q1;
private VanChartFormatPaneWithCheckBox min;
private VanChartFormatPaneWithCheckBox outlier;
public VanChartBoxTooltipContentPane(VanChartStylePane parent, JPanel showOnPane) {
super(parent, showOnPane);
}
@ -17,12 +29,121 @@ public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane {
protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) {
categoryNameFormatPane = new CategoryNameFormatPaneWithCheckBox(parent, showOnPane);
seriesNameFormatPane = new SeriesNameFormatPaneWithCheckBox(parent, showOnPane);
number = new VanChartFormatPaneWithCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Data_Number");
}
};
max = new VanChartFormatPaneWithCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Max_Value");
}
};
q3 = new VanChartFormatPaneWithCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Data_Q3");
}
};
median = new VanChartFormatPaneWithCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Data_Median");
}
};
q1 = new VanChartFormatPaneWithCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Data_Q1");
}
};
min = new VanChartFormatPaneWithCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Design_Chart_Min_Value");
}
};
outlier = new VanChartFormatPaneWithCheckBox(parent, showOnPane) {
protected String getCheckBoxText() {
return Toolkit.i18nText("Fine-Engine_Chart_Outlier_Value");
}
};
}
protected double[] getRowSize(double p) {
return new double[]{p, p, p, p, p, p, p, p, p};
}
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{categoryNameFormatPane, null},
new Component[]{seriesNameFormatPane, null}
new Component[]{seriesNameFormatPane, null},
new Component[]{number, null},
new Component[]{max, null},
new Component[]{q3, null},
new Component[]{median, null},
new Component[]{q1, null},
new Component[]{min, null},
new Component[]{outlier, null}
};
}
public boolean isDirty() {
return categoryNameFormatPane.isDirty()
|| seriesNameFormatPane.isDirty()
|| number.isDirty()
|| max.isDirty()
|| q3.isDirty()
|| median.isDirty()
|| q1.isDirty()
|| min.isDirty()
|| outlier.isDirty();
}
public void setDirty(boolean isDirty) {
categoryNameFormatPane.setDirty(isDirty);
seriesNameFormatPane.setDirty(isDirty);
number.setDirty(isDirty);
max.setDirty(isDirty);
q3.setDirty(isDirty);
median.setDirty(isDirty);
q1.setDirty(isDirty);
min.setDirty(isDirty);
outlier.setDirty(isDirty);
}
protected AttrTooltipContent createAttrTooltip() {
return new AttrBoxTooltipContent();
}
protected void populateFormatPane(AttrTooltipContent attrTooltipContent) {
categoryNameFormatPane.populate(attrTooltipContent.getCategoryFormat());
seriesNameFormatPane.populate(attrTooltipContent.getSeriesFormat());
if (attrTooltipContent instanceof AttrBoxTooltipContent) {
AttrBoxTooltipContent boxTooltipContent = (AttrBoxTooltipContent) attrTooltipContent;
number.populate(boxTooltipContent.getNumber());
max.populate(boxTooltipContent.getMax());
q3.populate(boxTooltipContent.getQ3());
median.populate(boxTooltipContent.getMedian());
q1.populate(boxTooltipContent.getQ1());
min.populate(boxTooltipContent.getMin());
outlier.populate(boxTooltipContent.getOutlier());
}
}
protected void updateFormatPane(AttrTooltipContent attrTooltipContent) {
categoryNameFormatPane.update(attrTooltipContent.getCategoryFormat());
seriesNameFormatPane.update(attrTooltipContent.getSeriesFormat());
if (attrTooltipContent instanceof AttrBoxTooltipContent) {
AttrBoxTooltipContent boxTooltipContent = (AttrBoxTooltipContent) attrTooltipContent;
number.update(boxTooltipContent.getNumber());
max.update(boxTooltipContent.getMax());
q3.update(boxTooltipContent.getQ3());
median.update(boxTooltipContent.getMedian());
q1.update(boxTooltipContent.getQ1());
min.update(boxTooltipContent.getMin());
outlier.update(boxTooltipContent.getOutlier());
}
}
}

37
designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java

@ -11,9 +11,8 @@ import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.plugin.chart.box.VanChartBoxPlot;
import com.fr.plugin.chart.box.data.VanBoxTableDefinition;
import com.fr.plugin.chart.box.data.VanBoxTableDefinitionHelper;
import com.fr.plugin.chart.box.data.VanBoxTableResultDefinition;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
@ -31,6 +30,7 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane {
private BoxPlotTableSeriesTypeUsePane seriesTypeComboxPane;
private BoxPlotTableResultDataSeriesPane resultDataSeriesPane;
private JPanel filterPane;
private ChartDataFilterPane dataScreeningPane;
private ChartDataPane parent;
@ -88,10 +88,10 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane {
dataScreeningPane = new ChartDataFilterPane(initplot, parent, false);
dataScreeningPane.setBorder(BorderFactory.createEmptyBorder(10, 24, 10, 15));
JPanel panel = new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), 290, 24, dataScreeningPane);
panel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
filterPane = new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), 290, 24, dataScreeningPane);
filterPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
return panel;
return filterPane;
}
private void initDataTypeListener() {
@ -109,6 +109,10 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane {
if (resultDataSeriesPane != null) {
resultDataSeriesPane.setVisible(dataType.getSelectedIndex() == 1);
}
if (filterPane != null) {
filterPane.setVisible(dataType.getSelectedIndex() == 0);
}
}
public void checkBoxUse(boolean hasUse) {
@ -144,10 +148,13 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane {
public void updateBean(ChartCollection collection) {
checkChartCollection(collection);
VanBoxTableDefinition table = VanBoxTableDefinitionHelper.getBoxTableDefinition(collection);
VanBoxTableDefinition table = BoxTableDefinitionHelper.getBoxTableDefinition(collection);
if (table != null) {
table.setDetailed(dataType.getSelectedIndex() == 0);
boolean isDetailed = dataType.getSelectedIndex() == 0;
table.setDetailed(isDetailed);
((VanChartBoxPlot) initplot).setDetailed(isDetailed);
}
if (seriesTypeComboxPane != null) {
seriesTypeComboxPane.updateBean(collection);
@ -164,7 +171,7 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane {
checkChartCollection(collection);
if (dataType != null) {
dataType.setSelectedIndex(VanBoxTableDefinitionHelper.isDetailedTableDataType(collection) ? 0 : 1);
dataType.setSelectedIndex(BoxTableDefinitionHelper.isDetailedTableDataType(collection) ? 0 : 1);
}
if (seriesTypeComboxPane != null) {
seriesTypeComboxPane.populateBean(collection);
@ -180,7 +187,7 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane {
}
private void checkChartCollection(ChartCollection collection) {
VanBoxTableDefinition table = VanBoxTableDefinitionHelper.getBoxTableDefinition(collection);
VanBoxTableDefinition table = BoxTableDefinitionHelper.getBoxTableDefinition(collection);
if (table == null) {
collection.getSelectedChart().setFilterDefinition(new VanBoxTableDefinition());
@ -188,26 +195,18 @@ public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane {
}
private void populateDataScreeningPane(ChartDataFilterPane dataScreeningPane, ChartCollection collection) {
NormalTableDataDefinition detailedDefinition = VanBoxTableDefinitionHelper.getBoxTableDetailedDefinition(collection);
VanBoxTableResultDefinition resultDefinition = VanBoxTableDefinitionHelper.getBoxTableResultDefinition(collection);
NormalTableDataDefinition detailedDefinition = BoxTableDefinitionHelper.getBoxTableDetailedDefinition(collection);
if (detailedDefinition != null) {
dataScreeningPane.populateDefinition(detailedDefinition, false);
} else if (resultDefinition != null) {
dataScreeningPane.populateDefinition(resultDefinition, false);
}
}
private void updateDataScreeningPane(ChartDataFilterPane dataScreeningPane, ChartCollection collection) {
NormalTableDataDefinition detailedDefinition = VanBoxTableDefinitionHelper.getBoxTableDetailedDefinition(collection);
VanBoxTableResultDefinition resultDefinition = VanBoxTableDefinitionHelper.getBoxTableResultDefinition(collection);
NormalTableDataDefinition detailedDefinition = BoxTableDefinitionHelper.getBoxTableDetailedDefinition(collection);
if (detailedDefinition != null) {
dataScreeningPane.updateDefinition(detailedDefinition);
}
if (resultDefinition != null) {
dataScreeningPane.updateDefinition(resultDefinition);
}
}
}

5
designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java

@ -8,7 +8,6 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.plugin.chart.box.data.VanBoxTableDefinition;
import com.fr.plugin.chart.box.data.VanBoxTableDefinitionHelper;
import com.fr.plugin.chart.box.data.VanBoxTableResultDefinition;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
@ -120,7 +119,7 @@ public class BoxPlotTableResultDataSeriesPane extends AbstractTableDataContentPa
public void populateBean(ChartCollection collection) {
super.populateBean(collection);
VanBoxTableResultDefinition definition = VanBoxTableDefinitionHelper.getBoxTableResultDefinition(collection);
VanBoxTableResultDefinition definition = BoxTableDefinitionHelper.getBoxTableResultDefinition(collection);
if (definition == null) {
return;
@ -136,7 +135,7 @@ public class BoxPlotTableResultDataSeriesPane extends AbstractTableDataContentPa
}
public void updateBean(ChartCollection collection) {
VanBoxTableDefinition table = VanBoxTableDefinitionHelper.getBoxTableDefinition(collection);
VanBoxTableDefinition table = BoxTableDefinitionHelper.getBoxTableDefinition(collection);
VanBoxTableResultDefinition definition = new VanBoxTableResultDefinition();

5
designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java

@ -18,7 +18,6 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.box.data.VanBoxTableDefinition;
import com.fr.plugin.chart.box.data.VanBoxTableDefinitionHelper;
import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
@ -168,7 +167,7 @@ public class BoxPlotTableSeriesTypeUsePane extends UIComboBoxPane<ChartCollectio
}
public void populateBean(ChartCollection collection) {
NormalTableDataDefinition definition = VanBoxTableDefinitionHelper.getBoxTableDetailedDefinition(collection);
NormalTableDataDefinition definition = BoxTableDefinitionHelper.getBoxTableDetailedDefinition(collection);
if (definition == null) {
categoryCombox.setSelectedItem(Toolkit.i18nText("Fine-Design_Chart_Use_None"));
@ -187,7 +186,7 @@ public class BoxPlotTableSeriesTypeUsePane extends UIComboBoxPane<ChartCollectio
}
public void updateBean(ChartCollection collection) {
VanBoxTableDefinition table = VanBoxTableDefinitionHelper.getBoxTableDefinition(collection);
VanBoxTableDefinition table = BoxTableDefinitionHelper.getBoxTableDefinition(collection);
if (table == null) {
return;

59
designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxTableDefinitionHelper.java

@ -0,0 +1,59 @@
package com.fr.van.chart.box.data.table;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.NormalTableDataDefinition;
import com.fr.plugin.chart.box.data.VanBoxTableDefinition;
import com.fr.plugin.chart.box.data.VanBoxTableResultDefinition;
public class BoxTableDefinitionHelper {
public static VanBoxTableDefinition getBoxTableDefinition(ChartCollection collection) {
if (collection != null) {
Chart chart = collection.getSelectedChart();
if (chart != null) {
TopDefinitionProvider definitionProvider = chart.getFilterDefinition();
if (definitionProvider instanceof VanBoxTableDefinition) {
return (VanBoxTableDefinition) definitionProvider;
}
}
}
return null;
}
public static VanBoxTableResultDefinition getBoxTableResultDefinition(ChartCollection collection) {
VanBoxTableDefinition table = getBoxTableDefinition(collection);
if (table != null) {
return table.getResultDefinition();
}
return null;
}
public static NormalTableDataDefinition getBoxTableDetailedDefinition(ChartCollection collection) {
VanBoxTableDefinition table = getBoxTableDefinition(collection);
if (table != null) {
return table.getDetailedDefinition();
}
return null;
}
public static boolean isDetailedTableDataType(ChartCollection collection) {
VanBoxTableDefinition table = getBoxTableDefinition(collection);
if (table != null) {
return table.isDetailed();
}
return true;
}
}
Loading…
Cancel
Save