Browse Source
* commit 'c1722bbde917c6adb0481aa576d8006276bc5d97': 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-30352 在文本域的init方法里添加setMargin() 系列标记点界面 REPORT-35906 数据集编辑的界面,在添加行数或修改行数后,代码中会做一部分重复添加,根据添加的顺序特点,删去多余的Component,解决bug 结果数据不支持数据筛选 系列和数据点提示界面research/11.0
superman
4 years ago
11 changed files with 324 additions and 34 deletions
@ -1,12 +1,107 @@ |
|||||||
package com.fr.van.chart.box; |
package com.fr.van.chart.box; |
||||||
|
|
||||||
import com.fr.chart.chartattr.Plot; |
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.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) { |
public VanChartBoxSeriesPane(ChartStylePane parent, Plot plot) { |
||||||
super(parent, 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); |
||||||
|
} |
||||||
} |
} |
||||||
|
@ -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…
Reference in new issue