From 002b56f0ccea2923e917ffbebf35945867530dd0 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Sat, 18 Jul 2020 13:35:18 +0800 Subject: [PATCH 1/6] =?UTF-8?q?CHART-11549=20=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E7=AE=B1=E5=9E=8B=E5=9B=BE=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ChartTypeInterfaceManager.java | 3 + .../box/BoxIndependentVanChartInterface.java | 85 ++++++++++++++++++ .../chart/box/VanChartBoxConditionPane.java | 53 +++++++++++ .../fr/van/chart/box/VanChartBoxPlotPane.java | 45 ++++++++++ .../van/chart/box/VanChartBoxSeriesPane.java | 12 +++ .../com/fr/design/images/form/toolbar/box.png | Bin 0 -> 1960 bytes .../com/fr/van/chart/box.images/box.png | Bin 0 -> 918 bytes 7 files changed, 198 insertions(+) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxConditionPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java create mode 100755 designer-chart/src/main/resources/com/fr/design/images/form/toolbar/box.png create mode 100755 designer-chart/src/main/resources/com/fr/van/chart/box.images/box.png diff --git a/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java b/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java index 8480d24647..b50c740a32 100644 --- a/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java +++ b/designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java @@ -49,6 +49,7 @@ import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.PiePlot4VanChart; import com.fr.plugin.chart.area.VanChartAreaPlot; +import com.fr.plugin.chart.box.VanChartBoxPlot; import com.fr.plugin.chart.bubble.VanChartBubblePlot; import com.fr.plugin.chart.column.VanChartColumnPlot; import com.fr.plugin.chart.custom.VanChartCustomPlot; @@ -79,6 +80,7 @@ import com.fr.stable.StringUtils; import com.fr.stable.plugin.ExtraChartDesignClassManagerProvider; import com.fr.van.chart.area.AreaIndependentVanChartInterface; import com.fr.van.chart.bar.BarIndependentVanChartInterface; +import com.fr.van.chart.box.BoxIndependentVanChartInterface; import com.fr.van.chart.bubble.BubbleIndependentVanChartInterface; import com.fr.van.chart.column.VanColumnChartTypeUI; import com.fr.van.chart.custom.CustomIndependentVanChartInterface; @@ -202,6 +204,7 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr addChartTypeInterface(VAN_CHART_PRIORITY, VanChartWordCloudPlot.WORD_CLOUD_PLOT_ID, new WordCloudIndependentVanChartInterface()); addChartTypeInterface(VAN_CHART_PRIORITY, VanChartGanttPlot.VAN_CHART_GANTT_PLOT_ID, new GanttIndependentVanChartInterface()); addChartTypeInterface(VAN_CHART_PRIORITY, VanChartStructurePlot.STRUCTURE_PLOT_ID, new VanStructureChartTypeUI()); + addChartTypeInterface(VAN_CHART_PRIORITY, VanChartBoxPlot.VAN_CHART_BOX_PLOT_ID, new BoxIndependentVanChartInterface()); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java new file mode 100644 index 0000000000..655ce7cae7 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java @@ -0,0 +1,85 @@ +package com.fr.van.chart.box; + +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.Plot; +import com.fr.design.beans.BasicBeanPane; +import com.fr.design.condition.ConditionAttributesPane; +import com.fr.design.gui.frpane.AttributeChangeListener; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.van.chart.bar.VanChartBarStylePane; +import com.fr.van.chart.designer.other.VanChartInteractivePane; +import com.fr.van.chart.designer.other.VanChartOtherPane; +import com.fr.van.chart.designer.other.zoom.ZoomPane; +import com.fr.van.chart.designer.style.VanChartStylePane; +import com.fr.van.chart.vanchart.AbstractMultiCategoryVanChartUI; + +import java.awt.Component; + +public class BoxIndependentVanChartInterface extends AbstractMultiCategoryVanChartUI { + + public String getName() { + return Toolkit.i18nText("Fine-Design_Chart_New_Box"); + } + + public String[] getSubName() { + return new String[]{ + Toolkit.i18nText("Fine-Design_Chart_New_Box") + }; + } + + public String[] getDemoImagePath() { + return new String[]{ + "com/fr/plugin/chart/demo/image/box.png" + }; + } + + public String getIconPath() { + return "com/fr/design/images/form/toolbar/box.png"; + } + + public AbstractChartTypePane getPlotTypePane() { + return new VanChartBoxPlotPane(); + } + + public ConditionAttributesPane getPlotConditionPane(Plot plot) { + return new VanChartBoxConditionPane(plot); + } + + public BasicBeanPane getPlotSeriesPane(ChartStylePane parent, Plot plot) { + return new VanChartBoxSeriesPane(parent, plot); + } + + public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener) { + VanChartStylePane stylePane = new VanChartBarStylePane(listener); + VanChartOtherPane otherPane = new VanChartOtherPane() { + + protected BasicBeanPane createInteractivePane() { + return new VanChartInteractivePane() { + + protected Component[][] createToolBarComponents() { + return new Component[][]{ + new Component[]{null, exportImages}, + new Component[]{null, fullScreenDisplay} + }; + } + + protected double[] getToolBarRowSize() { + double p = TableLayout.PREFERRED; + return new double[]{p, p}; + } + + protected ZoomPane createZoomPane() { + return new ZoomPane(); + } + }; + } + }; + + return new AbstractChartAttrPane[]{stylePane, otherPane}; + } + +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxConditionPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxConditionPane.java new file mode 100644 index 0000000000..c0412a9f38 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxConditionPane.java @@ -0,0 +1,53 @@ +package com.fr.van.chart.box; + +import com.fr.chart.base.AttrAlpha; +import com.fr.chart.base.AttrBackground; +import com.fr.chart.base.AttrBorder; +import com.fr.chart.chartattr.Plot; +import com.fr.design.chart.series.SeriesCondition.ChartConditionPane; +import com.fr.design.chart.series.SeriesCondition.DataSeriesConditionPane; +import com.fr.design.chart.series.SeriesCondition.LabelAlphaPane; +import com.fr.plugin.chart.box.VanChartBoxPlot; +import com.fr.plugin.chart.type.ConditionKeyType; +import com.fr.van.chart.column.VanChartColumnLabelBorderPane; +import com.fr.van.chart.designer.other.condition.item.VanChartColumnSeriesColorConditionPane; + +import java.awt.Dimension; + +public class VanChartBoxConditionPane extends DataSeriesConditionPane { + + public VanChartBoxConditionPane(Plot plot) { + super(plot); + } + + protected void initComponents() { + super.initComponents(); + + liteConditionPane.setPreferredSize(new Dimension(300, 400)); + } + + protected void addBasicAction() { + classPaneMap.put(AttrBackground.class, new VanChartColumnSeriesColorConditionPane(this)); + classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this)); + classPaneMap.put(AttrBorder.class, new VanChartColumnLabelBorderPane(this)); + } + + protected void addStyleAction() { + } + + protected ChartConditionPane createListConditionPane() { + + return new ChartConditionPane() { + + @Override + protected ConditionKeyType[] conditionKeyTypes() { + return ConditionKeyType.BOX_CONDITION_KEY_TYPES; + } + }; + } + + + public Class class4Correspond() { + return VanChartBoxPlot.class; + } +} \ No newline at end of file diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotPane.java new file mode 100644 index 0000000000..2679f7eba4 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotPane.java @@ -0,0 +1,45 @@ +package com.fr.van.chart.box; + +import com.fr.chart.chartattr.Chart; +import com.fr.chart.chartattr.Plot; +import com.fr.log.FineLoggerFactory; +import com.fr.plugin.chart.box.BoxIndependentVanChart; +import com.fr.plugin.chart.box.VanChartBoxPlot; +import com.fr.van.chart.designer.type.AbstractVanChartTypePane; + +public class VanChartBoxPlotPane extends AbstractVanChartTypePane { + + protected String[] getTypeIconPath() { + return new String[]{"/com/fr/van/chart/box.images/box.png" + }; + } + + protected Plot getSelectedClonedPlot() { + VanChartBoxPlot newPlot = null; + + Chart[] boxChartGroup = BoxIndependentVanChart.BoxVanChartTypes; + + for (int i = 0, len = boxChartGroup.length; i < len; i++) { + if (typeDemo.get(i).isPressing) { + newPlot = boxChartGroup[i].getPlot(); + } + } + + Plot cloned = null; + + try { + if (newPlot != null) { + cloned = (Plot) newPlot.clone(); + } + } catch (CloneNotSupportedException e) { + FineLoggerFactory.getLogger().error("Error In ColumnChart"); + } + + return cloned; + } + + public Chart getDefaultChart() { + return BoxIndependentVanChart.BoxVanChartTypes[0]; + } + +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java new file mode 100644 index 0000000000..867f7ec9e3 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxSeriesPane.java @@ -0,0 +1,12 @@ +package com.fr.van.chart.box; + +import com.fr.chart.chartattr.Plot; +import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.van.chart.column.VanChartColumnSeriesPane; + +public class VanChartBoxSeriesPane extends VanChartColumnSeriesPane { + + public VanChartBoxSeriesPane(ChartStylePane parent, Plot plot) { + super(parent, plot); + } +} diff --git a/designer-chart/src/main/resources/com/fr/design/images/form/toolbar/box.png b/designer-chart/src/main/resources/com/fr/design/images/form/toolbar/box.png new file mode 100755 index 0000000000000000000000000000000000000000..ba9101b2d801aab5146e48b9eb9934e2ef639e4f GIT binary patch literal 1960 zcmV;Z2UqxsP)Epm6rN}A=BK2Ms*)c-6J z5(f_4fNoWUxD=3}Qm&Pd;1Ehk+Nf|q2tivVg+^&OMCuiZo;dJR3Hr0W@*|F@i7L?+ zwSg+7Rns=vwLLsNyby#<8_~<)sEl1_vX#_+1~NIv6nI02mwNX5Fi8y0YX3r z0njnZvQ6>C%_4W*3o3mCuzE@Zou^fFNhd`J?D^tmp?G{siDc7ZTc!h`_M=6B2#pp` z^dwbSWS&HH40IA1h&eOKzk3 zFMn7lyUzGnVR*M7b`l8?pi8a*ltva2p^eO*Aa){D07@f^h|or6PY^p1DgdRCMMP*L zvnPn12o-?R$RZ-Nk=YZ(9(rOST)q(gDGhXO6tqjCm=Fj}Xz7EF62`J*M#s+=y4)Qv z9o$GWIufD=uMTc{FbjJn)l0>YKYOzKv&&0`YI~sxRdcJZ_1?sx37K};ahkBMQ>Mc? ztKPAK>I z6JXn;qTuJdEvlK90r0(GvB%^Z>8bg0$5H>leK#0UV6OU|p!{LV#tFrP)#aRD(dh&p z(f5{J{dL@A%7#X{nWB?1B9sWt7y=pVj``ovlmNQx_*8X-DGJBoZdJUJ4uHM4G|=(A z$UaFK5n4kV0Pbwq$_917pT5TTGmlN_*hXzbzoAhhYSXCV66&1@#OhLuEhzKk=z%XN51G$E6hl@L%qLop*;Ue^idR&pk* z!WO{VTif24JvVrh|37wV8i4w0Y>d%*S%MGNH>2X9!?f%oCwRXvPr8 zSa;|QB|Kutgqnm z6?_f5`j#3(b9r~B;#zMCjfK3Nzp$YQMji2&+E_EVJ_ zLThjOsGf;307$+%0;wT%^-yEiXq*0veWKF}UKZQH=8leS)HXzD4N5gIeVNxLUPlSVw|_K47!0Z!UI-L@ozc;DpVqT{(2g3aL{-d1;e zFCD7RQ7_cltY>WJ@acv95CtMM1XvHFI?{ctg!YTm(huWo1>4YszC3=b-MQ;L8}#Xc zyBRYi?ZxB&z7UjKmQ_CA|M)LK8I|KjAT*(D#@UYVw>=sR3+FQZL+{>lIsVbQ{|Nu< zL0u}xi$G{X&kl6@DXtge4U4?%B0!^DUF1?~M}(%77~QalP+jCwY8U%3I;H)VhE*J$ zeu|YVZw3``%}*DO;`d<+Z7e9a!9H_tpkpE^GhGfnC^8*z?Cm>l3$v_k!FFnQ{XgKJ u9W0Rp=b=~S1^rT)5Fi8y0Yadm5%?cvyPu5)S0SAM0000sRV z6$OT2r1iltXGEujd2k?1KZ?%}V@EgNPaGq_POT}XK`)l9IB?!2X9IyY@AanEY%E(l zRM~8FeX^&x<*m!Qt);bR_R!SF3T87}U75{Bjp{U=LsnOIJ%4MELw6}Gu-Rw<0ME=F znSN7!GPDNm@C60{`R6C%T-XOWcj$iM1bJSP@me9?6&)w@VzgtWTAvi01|6L8B3E)$ zWB?3@*v%Y+ebu&%`6lFDDtb@YxtIY|FN)q3Uhc1EDGjKr83A*VsbLd41Q8Aath%6Z z3N@W8A0ze?Q8%CHCqT;c(-7m2YYba5FaZ}?RsKNBkY?*6JWVtIvhal5>{!=4kMf7a zosBdPBkWuzJ09B>5^T4q>9Wk-ttXd#j4aboiQ5>xghVMkB+E|SEevY%BqJmU;|#DS z#1pd{w`Hc#dG>s)!^{>2tf&AhZ2PEBHwhj{mdnfHovW$1L}aEg$FevU7a0x3Ydmzy z{Ew;D8Pg==%I}OR!AInC){p<~b<+j)oqO%Yl9hO zrW9!WVI4ulbauQuv_P|Mr76pw>^fu>)H~TqTLtx8-^?Pn(r=}e4tn5-R$9X2QjpFs z-U22bes0GfI6%@XX+6nB{xDxz29!!6-ygM6E_=1>YlIOiD746@@026bMz6$9aTVt! z<-+kB=6UG1+SNiyaS%zb6iSG&8Vc?JU}V`2*f&i2iu_5=xnUN_fCDL>ms;uFb!Zu+ s`82}A@E9O(mG(X(jW5fsbd>z+Pl(bHYsk2^^#A|>07*qoM6N<$f=2|7_y7O^ literal 0 HcmV?d00001 From 027ae5872a184de7df1c0d3da5954e02cbf6946e Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Sat, 18 Jul 2020 16:54:11 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=95=B4=E7=90=86=E7=AE=B1=E5=9E=8B?= =?UTF-8?q?=E5=9B=BE=E6=95=B0=E6=8D=AE=E7=82=B9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../box/BoxIndependentVanChartInterface.java | 3 +- .../chart/box/VanChartBoxPlotTooltipPane.java | 20 +++++++++++++ .../van/chart/box/VanChartBoxStylePane.java | 21 ++++++++++++++ .../box/VanChartBoxTooltipContentPane.java | 28 +++++++++++++++++++ .../van/chart/box/VanChartBoxTooltipPane.java | 17 +++++++++++ 5 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxStylePane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipPane.java diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java index 655ce7cae7..40c969876e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java @@ -10,7 +10,6 @@ import com.fr.design.layout.TableLayout; import com.fr.design.mainframe.chart.AbstractChartAttrPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; -import com.fr.van.chart.bar.VanChartBarStylePane; import com.fr.van.chart.designer.other.VanChartInteractivePane; import com.fr.van.chart.designer.other.VanChartOtherPane; import com.fr.van.chart.designer.other.zoom.ZoomPane; @@ -54,7 +53,7 @@ public class BoxIndependentVanChartInterface extends AbstractMultiCategoryVanCha } public AbstractChartAttrPane[] getAttrPaneArray(AttributeChangeListener listener) { - VanChartStylePane stylePane = new VanChartBarStylePane(listener); + VanChartStylePane stylePane = new VanChartBoxStylePane(listener); VanChartOtherPane otherPane = new VanChartOtherPane() { protected BasicBeanPane createInteractivePane() { diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java new file mode 100644 index 0000000000..e976d05e6c --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxPlotTooltipPane.java @@ -0,0 +1,20 @@ +package com.fr.van.chart.box; + +import com.fr.chart.chartattr.Plot; +import com.fr.van.chart.designer.style.VanChartStylePane; +import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane; + +public class VanChartBoxPlotTooltipPane extends VanChartPlotTooltipPane { + + public VanChartBoxPlotTooltipPane(Plot plot, VanChartStylePane parent) { + super(plot, parent); + } + + protected void initTooltipContentPane(Plot plot) { + tooltipContentPane = new VanChartBoxTooltipContentPane(parent, VanChartBoxPlotTooltipPane.this); + } + + protected boolean hasTooltipSeriesType() { + return false; + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxStylePane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxStylePane.java new file mode 100644 index 0000000000..b9e60c68e7 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxStylePane.java @@ -0,0 +1,21 @@ +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 java.util.List; + +public class VanChartBoxStylePane extends VanChartBarStylePane { + + public VanChartBoxStylePane(AttributeChangeListener listener) { + super(listener); + } + + protected void createVanChartLabelPane(List paneList) { + } + + protected void addVanChartTooltipPane(List paneList) { + paneList.add(new VanChartBoxTooltipPane(VanChartBoxStylePane.this)); + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java new file mode 100644 index 0000000000..9fc9988f0a --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipContentPane.java @@ -0,0 +1,28 @@ +package com.fr.van.chart.box; + +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.style.VanChartStylePane; + +import javax.swing.JPanel; +import java.awt.Component; + +public class VanChartBoxTooltipContentPane extends VanChartTooltipContentPane { + + public VanChartBoxTooltipContentPane(VanChartStylePane parent, JPanel showOnPane) { + super(parent, showOnPane); + } + + protected void initFormatPane(VanChartStylePane parent, JPanel showOnPane) { + categoryNameFormatPane = new CategoryNameFormatPaneWithCheckBox(parent, showOnPane); + seriesNameFormatPane = new SeriesNameFormatPaneWithCheckBox(parent, showOnPane); + } + + protected Component[][] getPaneComponents() { + return new Component[][]{ + new Component[]{categoryNameFormatPane, null}, + new Component[]{seriesNameFormatPane, null} + }; + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipPane.java new file mode 100644 index 0000000000..5d485c31d2 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/VanChartBoxTooltipPane.java @@ -0,0 +1,17 @@ +package com.fr.van.chart.box; + +import com.fr.chart.chartattr.Plot; +import com.fr.van.chart.designer.style.VanChartStylePane; +import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane; +import com.fr.van.chart.designer.style.tooltip.VanChartTooltipPane; + +public class VanChartBoxTooltipPane extends VanChartTooltipPane { + + public VanChartBoxTooltipPane(VanChartStylePane parent) { + super(parent); + } + + protected VanChartPlotTooltipPane getTooltipPane(Plot plot) { + return new VanChartBoxPlotTooltipPane(plot, parent); + } +} From d1dc8bae18f0bfde696a2cbaff87991d83810988 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Sun, 19 Jul 2020 15:58:44 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=A1=AB=E5=85=85=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E6=95=B0=E6=8D=AE=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../box/BoxIndependentVanChartInterface.java | 17 +- .../data/BoxPlotReportDataContentPane.java | 11 ++ .../BoxPlotReportResultDataSeriesPane.java | 4 + .../box/data/BoxPlotTableDataContentPane.java | 141 +++++++++++++++ .../BoxPlotTableDetailedDataSeriesPane.java | 20 +++ .../BoxPlotTableResultDataSeriesPane.java | 163 ++++++++++++++++++ 6 files changed, 354 insertions(+), 2 deletions(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotReportDataContentPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotReportResultDataSeriesPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableDataContentPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableDetailedDataSeriesPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableResultDataSeriesPane.java diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java index 40c969876e..0313838921 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java @@ -8,17 +8,22 @@ import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.mainframe.chart.AbstractChartAttrPane; +import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.ChartStylePane; +import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.van.chart.box.data.BoxPlotReportDataContentPane; +import com.fr.van.chart.box.data.BoxPlotTableDataContentPane; import com.fr.van.chart.designer.other.VanChartInteractivePane; import com.fr.van.chart.designer.other.VanChartOtherPane; import com.fr.van.chart.designer.other.zoom.ZoomPane; import com.fr.van.chart.designer.style.VanChartStylePane; -import com.fr.van.chart.vanchart.AbstractMultiCategoryVanChartUI; +import com.fr.van.chart.vanchart.AbstractIndependentVanChartUI; import java.awt.Component; -public class BoxIndependentVanChartInterface extends AbstractMultiCategoryVanChartUI { +public class BoxIndependentVanChartInterface extends AbstractIndependentVanChartUI { public String getName() { return Toolkit.i18nText("Fine-Design_Chart_New_Box"); @@ -40,6 +45,14 @@ public class BoxIndependentVanChartInterface extends AbstractMultiCategoryVanCha return "com/fr/design/images/form/toolbar/box.png"; } + public AbstractTableDataContentPane getTableDataSourcePane(Plot plot, ChartDataPane parent) { + return new BoxPlotTableDataContentPane(parent); + } + + public AbstractReportDataContentPane getReportDataSourcePane(Plot plot, ChartDataPane parent) { + return new BoxPlotReportDataContentPane(parent); + } + public AbstractChartTypePane getPlotTypePane() { return new VanChartBoxPlotPane(); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotReportDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotReportDataContentPane.java new file mode 100644 index 0000000000..cce6bf9649 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotReportDataContentPane.java @@ -0,0 +1,11 @@ +package com.fr.van.chart.box.data; + +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.report.CategoryPlotReportDataContentPane; + +public class BoxPlotReportDataContentPane extends CategoryPlotReportDataContentPane { + + public BoxPlotReportDataContentPane(ChartDataPane parent) { + super(parent); + } +} \ No newline at end of file diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotReportResultDataSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotReportResultDataSeriesPane.java new file mode 100644 index 0000000000..629c67a5f5 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotReportResultDataSeriesPane.java @@ -0,0 +1,4 @@ +package com.fr.van.chart.box.data; + +public class BoxPlotReportResultDataSeriesPane { +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableDataContentPane.java new file mode 100644 index 0000000000..58cdc89394 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableDataContentPane.java @@ -0,0 +1,141 @@ +package com.fr.van.chart.box.data; + +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.List; + +public class BoxPlotTableDataContentPane extends AbstractTableDataContentPane { + + private UIButtonGroup dataType; + private JPanel detailedDataPane; + private JPanel resultDataPane; + + public BoxPlotTableDataContentPane(ChartDataPane parent) { + + this.setLayout(new BorderLayout()); + + this.add(createDataTypePane(), BorderLayout.NORTH); + this.add(createDetailDataPane(parent), BorderLayout.CENTER); + this.add(createResultDataPane(parent), BorderLayout.SOUTH); + + initDataTypeListener(); + } + + private JPanel createDataTypePane() { + UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Data_Type")); + + String[] names = new String[]{ + Toolkit.i18nText("Fine-Design_Chart_Detailed_Data"), + Toolkit.i18nText("Fine-Design_Chart_Result_Data") + }; + + dataType = new UIButtonGroup(names); + + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + + double[] column = {p, f}; + double[] row = {p, p}; + + Component[][] components = new Component[][]{ + new Component[]{null, null}, + new Component[]{label, dataType}, + new Component[]{null, null} + }; + + return TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, column); + } + + private JPanel createDetailDataPane(ChartDataPane parent) { + detailedDataPane = new BoxPlotTableDetailedDataSeriesPane(parent); + + return detailedDataPane; + } + + private JPanel createResultDataPane(ChartDataPane parent) { + resultDataPane = new BoxPlotTableResultDataSeriesPane(parent); + + return resultDataPane; + } + + + private void initDataTypeListener() { + dataType.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + checkDataPaneVisible(); + } + }); + } + + private void checkDataPaneVisible() { + if (detailedDataPane != null) { + detailedDataPane.setVisible(dataType.getSelectedIndex() == 0); + } + if (resultDataPane != null) { + resultDataPane.setVisible(dataType.getSelectedIndex() == 1); + } + } + + public void checkBoxUse(boolean hasUse) { + if (dataType.getSelectedIndex() == 0 && detailedDataPane != null) { + ((BoxPlotTableDetailedDataSeriesPane) detailedDataPane).checkBoxUse(hasUse); + } + if (dataType.getSelectedIndex() == 1 && resultDataPane != null) { + ((BoxPlotTableResultDataSeriesPane) resultDataPane).checkBoxUse(hasUse); + } + } + + protected void refreshBoxListWithSelectTableData(List list) { + if (dataType.getSelectedIndex() == 0 && detailedDataPane != null) { + ((BoxPlotTableDetailedDataSeriesPane) detailedDataPane).refreshBoxListWithSelectTableData(list); + } + if (dataType.getSelectedIndex() == 1 && resultDataPane != null) { + ((BoxPlotTableResultDataSeriesPane) resultDataPane).refreshBoxListWithSelectTableData(list); + } + } + + public void clearAllBoxList() { + if (dataType.getSelectedIndex() == 0 && detailedDataPane != null) { + ((BoxPlotTableDetailedDataSeriesPane) detailedDataPane).clearAllBoxList(); + } + if (dataType.getSelectedIndex() == 1 && resultDataPane != null) { + ((BoxPlotTableResultDataSeriesPane) resultDataPane).clearAllBoxList(); + } + } + + public void updateBean(ChartCollection collection) { + if (dataType.getSelectedIndex() == 0 && detailedDataPane != null) { + ((BoxPlotTableDetailedDataSeriesPane) detailedDataPane).updateBean(collection); + } + if (dataType.getSelectedIndex() == 1 && resultDataPane != null) { + ((BoxPlotTableResultDataSeriesPane) resultDataPane).updateBean(collection); + } + } + + public void populateBean(ChartCollection collection) { + if (detailedDataPane != null) { + ((BoxPlotTableDetailedDataSeriesPane) detailedDataPane).populateBean(collection); + } + if (resultDataPane != null) { + ((BoxPlotTableResultDataSeriesPane) resultDataPane).populateBean(collection); + } + + dataType.setSelectedIndex(isDetailedDataType(collection) ? 0 : 1); + } + + private boolean isDetailedDataType(ChartCollection collection) { + return true; + } +} \ No newline at end of file diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableDetailedDataSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableDetailedDataSeriesPane.java new file mode 100644 index 0000000000..ed858f0bf0 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableDetailedDataSeriesPane.java @@ -0,0 +1,20 @@ +package com.fr.van.chart.box.data; + +import com.fr.design.mainframe.chart.gui.ChartDataPane; +import com.fr.design.mainframe.chart.gui.data.table.CategoryPlotTableDataContentPane; + +import java.util.List; + +public class BoxPlotTableDetailedDataSeriesPane extends CategoryPlotTableDataContentPane { + + public BoxPlotTableDetailedDataSeriesPane(ChartDataPane parent) { + super(parent); + } + + public void refreshBoxListWithSelectTableData(List list) { + refreshBoxItems(categoryCombox, list); + categoryCombox.addItem(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_None")); + + seriesTypeComboxPane.refreshBoxListWithSelectTableData(list); + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableResultDataSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableResultDataSeriesPane.java new file mode 100644 index 0000000000..25c80d1a80 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableResultDataSeriesPane.java @@ -0,0 +1,163 @@ +package com.fr.van.chart.box.data; + +import com.fr.base.chart.chartdata.TopDefinitionProvider; +import com.fr.chart.base.ChartConstants; +import com.fr.chart.chartattr.BubblePlot; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.TableLayout; +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.plugin.chart.box.VanChartBoxPlot; +import com.fr.plugin.chart.box.data.VanBoxTableDefinition; +import com.fr.stable.ArrayUtils; +import com.fr.stable.StringUtils; +import com.fr.van.chart.designer.TableLayout4VanChartHelper; + +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.util.List; + +public class BoxPlotTableResultDataSeriesPane extends AbstractTableDataContentPane { + + private UIComboBox seriesName; + private UIComboBox max; + private UIComboBox median; + private UIComboBox min; + + private ChartDataFilterPane dataScreeningPane; + + public BoxPlotTableResultDataSeriesPane(ChartDataPane parent) { + + initComboxSize(); + + this.setLayout(new BorderLayout()); + + this.add(createCenterPane(), BorderLayout.CENTER); + this.add(createSouthPane(parent), BorderLayout.SOUTH); + + seriesName.addItemListener(tooltipListener); + max.addItemListener(tooltipListener); + median.addItemListener(tooltipListener); + min.addItemListener(tooltipListener); + } + + private void initComboxSize() { + Dimension preferredSize = new Dimension(100, 20); + + seriesName = new UIComboBox(); + max = new UIComboBox(); + median = new UIComboBox(); + min = new UIComboBox(); + + seriesName.setPreferredSize(preferredSize); + max.setPreferredSize(preferredSize); + median.setPreferredSize(preferredSize); + min.setPreferredSize(preferredSize); + } + + private JPanel createCenterPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + + double[] column = {f, COMPONENT_WIDTH}; + double[] row = {p, p, p, p}; + + Component[][] components_north = new Component[][]{ + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Series_Name")), seriesName}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Data_Max")), max}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Data_Median")), median}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Data_Max")), min}, + }; + + JPanel center = TableLayout4VanChartHelper.createGapTableLayoutPane(components_north, row, column); + center.setBorder(BorderFactory.createEmptyBorder(10, 24, 10, 15)); + + return center; + } + + private JPanel createSouthPane(ChartDataPane parent) { + dataScreeningPane = new ChartDataFilterPane(new VanChartBoxPlot(), parent); + + JPanel south = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), dataScreeningPane); + south.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); + + return south; + } + + public void checkBoxUse(boolean hasUse) { + } + + protected void refreshBoxListWithSelectTableData(List list) { + refreshBoxItems(seriesName, list); + refreshBoxItems(max, list); + refreshBoxItems(median, list); + refreshBoxItems(min, list); + } + + public void clearAllBoxList() { + clearBoxItems(seriesName); + clearBoxItems(max); + clearBoxItems(median); + clearBoxItems(min); + } + + public void populateBean(ChartCollection collection) { + super.populateBean(collection); + + TopDefinitionProvider top = collection.getSelectedChart().getFilterDefinition(); + + if (!(top instanceof VanBoxTableDefinition)) { + return; + } + + VanBoxTableDefinition definition = (VanBoxTableDefinition) top; + + combineCustomEditValue(seriesName, definition.getSeriesName()); + combineCustomEditValue(max, definition.getMax()); + combineCustomEditValue(median, definition.getMedian()); + combineCustomEditValue(median, definition.getMin()); + + dataScreeningPane.populateBean(collection); + } + + @Override + public void updateBean(ChartCollection collection) { + VanBoxTableDefinition definition = new VanBoxTableDefinition(); + + collection.getSelectedChart().setFilterDefinition(definition); + + Object resultName = seriesName.getSelectedItem(); + Object resultMax = max.getSelectedItem(); + Object resultMedian = median.getSelectedItem(); + Object resultMin = min.getSelectedItem(); + + if (resultName == null || ArrayUtils.contains(ChartConstants.getNoneKeys(), resultName)) { + definition.setSeriesName(StringUtils.EMPTY); + } else { + definition.setSeriesName(resultName.toString()); + } + + if (resultMax != null) { + definition.setMax(resultMax.toString()); + } + if (resultMedian != null) { + definition.setMedian(resultMedian.toString()); + } + if (resultMin != null) { + definition.setMin(resultMin.toString()); + } + + dataScreeningPane.updateBean(collection); + } + + public void redoLayoutPane() { + dataScreeningPane.relayoutPane(this.isNeedSummaryCaculateMethod()); + } +} \ No newline at end of file From 2525b1f62d6087805a91861fabdab0670047d30a Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Tue, 21 Jul 2020 20:06:43 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=95=B4=E7=90=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/data/ChartDataFilterPane.java | 53 +++-- .../table/SeriesNameUseFieldNamePane.java | 32 ++- .../table/SeriesNameUseFieldValuePane.java | 34 ++- .../box/BoxIndependentVanChartInterface.java | 2 +- .../box/data/BoxPlotDataContentPaneHelp.java | 123 +++++++++++ .../box/data/BoxPlotTableDataContentPane.java | 196 +++++++++++++----- .../BoxPlotTableDetailedDataSeriesPane.java | 20 -- .../BoxPlotTableResultDataSeriesPane.java | 72 +++---- .../data/BoxPlotTableSeriesTypeUsePane.java | 143 +++++++++++++ 9 files changed, 534 insertions(+), 141 deletions(-) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotDataContentPaneHelp.java delete mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableDetailedDataSeriesPane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableSeriesTypeUsePane.java diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java index 9db2fe7b21..fcd101fb15 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java @@ -7,13 +7,13 @@ import com.fr.chart.chartattr.Plot; import com.fr.chart.chartdata.TopDefinition; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.i18n.Toolkit; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.TableLayout; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.style.AbstractChartTabPane; import com.fr.design.mainframe.chart.gui.style.ThirdTabPane; - import com.fr.stable.StringUtils; import com.fr.van.chart.designer.TableLayout4VanChartHelper; @@ -50,6 +50,11 @@ public class ChartDataFilterPane extends ThirdTabPane { this.isNeedPresent = true; } + public ChartDataFilterPane(Plot plot, ChartDataPane parent, boolean isNeedPresent) { + super(plot, parent); + this.isNeedPresent = isNeedPresent; + } + protected void initTabPane() { super.initTabPane(); tabPane.setPreferredSize(new Dimension(221, 25)); @@ -109,7 +114,7 @@ public class ChartDataFilterPane extends ThirdTabPane { * @return 返回标题. */ public String title4PopupWindow() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"); + return Toolkit.i18nText("Fine-Design_Chart_Data_Filter"); } /** @@ -144,12 +149,17 @@ public class ChartDataFilterPane extends ThirdTabPane { } public void populateBean(ChartCollection collection, boolean isNeedPresent) { - relayoutPane(isNeedPresent); + TopDefinitionProvider topDefinition = collection.getSelectedChart().getFilterDefinition(); + populateDefinition(topDefinition, isNeedPresent); + } + + public void populateDefinition(TopDefinitionProvider topDefinition, boolean isNeedSummary) { + relayoutPane(isNeedSummary); if (categoryPane != null) { - categoryPane.populateBean(collection.getSelectedChart().getFilterDefinition()); + categoryPane.populateBean(topDefinition); } if (seriesPane != null) { - seriesPane.populateBean(collection.getSelectedChart().getFilterDefinition()); + seriesPane.populateBean(topDefinition); } checkBoxUse(); } @@ -165,11 +175,16 @@ public class ChartDataFilterPane extends ThirdTabPane { * 保存界面数据筛选. */ public void updateBean(ChartCollection collection) { + TopDefinitionProvider topDefinition = collection.getSelectedChart().getFilterDefinition(); + updateDefinition(topDefinition); + } + + public void updateDefinition(TopDefinitionProvider topDefinition) { if (categoryPane != null) { - categoryPane.updateBean(collection.getSelectedChart().getFilterDefinition()); + categoryPane.updateBean(topDefinition); } if (seriesPane != null) { - seriesPane.updateBean(collection.getSelectedChart().getFilterDefinition()); + seriesPane.updateBean(topDefinition); } } @@ -222,13 +237,13 @@ public class ChartDataFilterPane extends ThirdTabPane { } protected JPanel initOtherPane() { - onlyPreData = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Only_Use_Before_Records")); + onlyPreData = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Only_Use_Before_Records")); JPanel panel1 = new JPanel(new BorderLayout()); JPanel panel2 = new JPanel(new BorderLayout()); panel1.add(onlyPreData, BorderLayout.NORTH); preDataNum = new UITextField(); - UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Records_Num")); - combineOther = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_CombineOther")); + UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Records_Num")); + combineOther = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Data_CombineOther")); combineOther.setSelected(true); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; @@ -244,7 +259,7 @@ public class ChartDataFilterPane extends ThirdTabPane { //默认不显示 preDataNumPane.setVisible(false); panel1.add(preDataNumPane, BorderLayout.CENTER); - notShowNull = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Not_Show_Cate")); + notShowNull = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Data_Not_Show_Cate")); panel2.add(notShowNull, BorderLayout.NORTH); onlyPreData.addChangeListener(new ChangeListener() { @@ -258,7 +273,7 @@ public class ChartDataFilterPane extends ThirdTabPane { fire(); } }; - presentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Present") ,present); + presentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Style_Present") ,present); panel2.add(presentPane, BorderLayout.SOUTH); double[] column = {f}; @@ -281,7 +296,7 @@ public class ChartDataFilterPane extends ThirdTabPane { * 界面标题 "分类" */ public String title4PopupWindow() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Category"); + return Toolkit.i18nText("Fine-Design_Chart_Style_Category"); } /** @@ -397,13 +412,13 @@ public class ChartDataFilterPane extends ThirdTabPane { protected JPanel initOtherPane() { - onlyPreData = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Only_Use_Before_Records")); + onlyPreData = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Only_Use_Before_Records")); JPanel panel1 = new JPanel(new BorderLayout()); JPanel panel2 = new JPanel(new BorderLayout()); panel1.add(onlyPreData, BorderLayout.NORTH); preDataNum = new UITextField(); - UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Records_Num")); - combineOther = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_CombineOther")); + UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Records_Num")); + combineOther = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Data_CombineOther")); combineOther.setSelected(true); double p = TableLayout.PREFERRED; double f = TableLayout.FILL; @@ -419,7 +434,7 @@ public class ChartDataFilterPane extends ThirdTabPane { //默认不显示 preDataNumPane.setVisible(false); panel1.add(preDataNumPane, BorderLayout.CENTER); - notShowNull = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Not_Show_Series")); + notShowNull = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Data_Not_Show_Series")); panel2.add(notShowNull, BorderLayout.NORTH); onlyPreData.addChangeListener(new ChangeListener() { @@ -433,7 +448,7 @@ public class ChartDataFilterPane extends ThirdTabPane { fire(); } }; - presentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Present") ,present); + presentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Style_Present") ,present); panel2.add(presentPane, BorderLayout.SOUTH); double[] column = {f}; @@ -457,7 +472,7 @@ public class ChartDataFilterPane extends ThirdTabPane { * 界面标题 */ public String title4PopupWindow() { - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series"); + return Toolkit.i18nText("Fine-Design_Chart_Series"); } /** diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java index 0c643cf8c1..c6f4ac2041 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldNamePane.java @@ -14,6 +14,7 @@ import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.itable.UITable; import com.fr.design.gui.itable.UITableEditor; import com.fr.design.gui.itextfield.UITextField; +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.data.CalculateComboBox; @@ -40,8 +41,15 @@ import java.util.List; * @version 创建时间:2012-12-26 下午04:39:46 */ public class SeriesNameUseFieldNamePane extends FurtherBasicBeanPane { - private static final String[] HEADS = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Field_Name"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Summary_Method")}; - private static final String[] HEADS_NO_SUMMARY = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Field_Name"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name")}; + private static final String[] HEADS = { + Toolkit.i18nText("Fine-Design_Chart_Field_Name"), + Toolkit.i18nText("Fine-Design_Chart_Series_Name"), + Toolkit.i18nText("Fine-Design_Chart_Summary_Method")}; + + private static final String[] HEADS_NO_SUMMARY = { + Toolkit.i18nText("Fine-Design_Chart_Field_Name"), + Toolkit.i18nText("Fine-Design_Chart_Series_Name")}; + private UICorrelationPane seriesDataPane; private List field = new ArrayList(); private JPanel centerPane; @@ -62,7 +70,7 @@ public class SeriesNameUseFieldNamePane extends FurtherBasicBeanPane { + + private static boolean NEED_SUMMERY = false; + + private SeriesNameUseFieldValuePane nameFieldValuePane; + private SeriesNameUseFieldNamePane nameFieldNamePane; + + public BoxPlotTableSeriesTypeUsePane() { + cards = initPaneList(); + initComponents(); + } + + protected void initLayout() { + this.setLayout(new BorderLayout(4, LayoutConstants.VGAP_MEDIUM)); + + cardPane.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15)); + + this.add(createNorthPane(), BorderLayout.NORTH); + this.add(cardPane, BorderLayout.CENTER); + } + + protected UIComboBox createComboBox() { + UIComboBox uiComboBox = new UIComboBox(); + UIComponentUtils.setPreferedWidth(uiComboBox, 100); + return uiComboBox; + } + + private JPanel createNorthPane() { + JPanel north = new JPanel(new BorderLayout(4, 0)); + + UILabel label = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Series_Name_From")); + label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT)); + north.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label, null})); + north.setBorder(BorderFactory.createEmptyBorder(10, 24, 0, 15)); + + return north; + } + + public void checkBoxUse(boolean hasUse) { + jcb.setEnabled(hasUse); + nameFieldValuePane.checkUse(hasUse); + } + + public void refreshBoxListWithSelectTableData(List list) { + nameFieldValuePane.refreshBoxListWithSelectTableData(list); + nameFieldNamePane.refreshBoxListWithSelectTableData(list); + } + + public void clearAllBoxList() { + nameFieldValuePane.clearAllBoxList(); + nameFieldNamePane.clearAllBoxList(); + } + + protected String title4PopupWindow() { + return Toolkit.i18nText("Fine-Design_Chart_Series_Name_From"); + } + + protected List> initPaneList() { + nameFieldValuePane = new SeriesNameUseFieldValuePane(); + nameFieldNamePane = new SeriesNameUseFieldNamePane(); + + nameFieldValuePane.relayoutPane(NEED_SUMMERY); + nameFieldNamePane.relayoutPane(NEED_SUMMERY); + + List> paneList = new ArrayList>(); + + paneList.add(nameFieldValuePane); + paneList.add(nameFieldNamePane); + + return paneList; + } + + public void relayoutPane() { + if (jcb.getSelectedIndex() == 0) { + nameFieldValuePane.relayoutPane(NEED_SUMMERY); + } else { + nameFieldNamePane.relayoutPane(NEED_SUMMERY); + } + } + + protected void comboBoxItemStateChanged() { + if (jcb.getSelectedIndex() == 0) { + nameFieldValuePane.relayoutPane(NEED_SUMMERY); + } else { + nameFieldNamePane.relayoutPane(NEED_SUMMERY); + } + } + + public void populateBean(ChartCollection collection) { + NormalTableDataDefinition definition = VanBoxTableDefinitionHelper.getBoxTableDetailedDefinition(collection); + + if (definition instanceof OneValueCDDefinition) { + this.setSelectedIndex(0); + nameFieldValuePane.populateDefinition(definition, NEED_SUMMERY); + } else if (definition instanceof MoreNameCDDefinition) { + this.setSelectedIndex(1); + nameFieldNamePane.populateDefinition(definition, NEED_SUMMERY); + } + } + + public void updateBean(ChartCollection ob) { + VanBoxTableDefinition table = VanBoxTableDefinitionHelper.getBoxTableDefinition(ob); + + NormalTableDataDefinition definition; + + if (this.getSelectedIndex() == 0) { + definition = nameFieldValuePane.updateDefinition(); + } else { + definition = nameFieldNamePane.updateDefinition(table.getDetailedDefinition()); + } + + table.setDetailedDefinition(definition); + } + +} From 37553746869ab93deddf4ce91a5a4bb713e4bc6b Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 22 Jul 2020 14:08:45 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CategoryPlotTableDataContentPane.java | 53 +++----- .../chart/gui/data/table/DataPaneHelper.java | 25 ++++ .../table/SeriesNameUseFieldValuePane.java | 20 +-- .../box/data/BoxPlotDataContentPaneHelp.java | 123 ------------------ .../box/data/BoxPlotTableDataContentPane.java | 118 +++++++---------- .../BoxPlotTableResultDataSeriesPane.java | 42 ++++-- .../data/BoxPlotTableSeriesTypeUsePane.java | 96 +++++++++++++- .../MultiPiePlotTableDataContentPane.java | 38 ++---- 8 files changed, 222 insertions(+), 293 deletions(-) delete mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotDataContentPaneHelp.java diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java index 8c988ce294..7d12e3e52d 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java @@ -11,6 +11,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; +import com.fr.design.i18n.Toolkit; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; @@ -28,24 +29,24 @@ import java.util.List; */ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPane{ private static final long serialVersionUID = 7284078589672079657L; - + protected UIComboBox categoryCombox; protected SeriesTypeUseComboxPane seriesTypeComboxPane; - + public CategoryPlotTableDataContentPane() { - + } - + public CategoryPlotTableDataContentPane(ChartDataPane parent) { - + categoryCombox = new UIComboBox(); JPanel categoryPane = new JPanel(new BorderLayout(4,0)); categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); - UILabel label1 = new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Style_Category")) ; + UILabel label1 = new BoldFontTextLabel(Toolkit.i18nText("Fine-Design_Chart_Style_Category")) ; label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); categoryCombox.setPreferredSize(new Dimension(100,20)); - categoryCombox.addItem(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_None")); + categoryCombox.addItem(Toolkit.i18nText("Fine-Design_Chart_Use_None")); categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox,null,null,label1,null})); categoryPane.setPreferredSize(new Dimension(246,30)); categoryPane.setBorder(BorderFactory.createEmptyBorder(0,24,10,15)); @@ -56,7 +57,7 @@ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPa this.add(getJSeparator()); seriesTypeComboxPane = new SeriesTypeUseComboxPane(parent, new Bar2DPlot()); this.add(seriesTypeComboxPane, BorderLayout.SOUTH); - + categoryCombox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { checkSeriseUse(categoryCombox.getSelectedItem() != null); @@ -64,7 +65,7 @@ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPa } }); } - + protected void makeToolTipUse(UIComboBox comBox) { if(comBox.getSelectedItem() != null) { comBox.setToolTipText(comBox.getSelectedItem().toString()); @@ -72,7 +73,7 @@ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPa comBox.setToolTipText(null); } } - + /** * 检查 某些Box是否可用 * @param hasUse 是否使用. @@ -81,16 +82,16 @@ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPa categoryCombox.setEnabled(hasUse); checkSeriseUse(hasUse); } - + protected void checkSeriseUse(boolean hasUse) { if(seriesTypeComboxPane != null) { seriesTypeComboxPane.checkUseBox(hasUse && categoryCombox.getSelectedItem() != null); } } - + protected void refreshBoxListWithSelectTableData(List list) { refreshBoxItems(categoryCombox, list); - categoryCombox.addItem(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_None")); + categoryCombox.addItem(Toolkit.i18nText("Fine-Design_Chart_Use_None")); seriesTypeComboxPane.refreshBoxListWithSelectTableData(list); } @@ -100,10 +101,10 @@ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPa */ public void clearAllBoxList(){ clearBoxItems(categoryCombox); - categoryCombox.addItem(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_None")); + categoryCombox.addItem(Toolkit.i18nText("Fine-Design_Chart_Use_None")); seriesTypeComboxPane.clearAllBoxList(); } - + /** * 保存界面内容到ChartCollection */ @@ -129,15 +130,15 @@ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPa public void populateBean(ChartCollection collection) { super.populateBean(collection); TopDefinition top = (TopDefinition)collection.getSelectedChart().getFilterDefinition(); - + if(!(top instanceof NormalTableDataDefinition)) { return; } NormalTableDataDefinition data = (NormalTableDataDefinition)top; - if(data == null || ComparatorUtils.equals(data.getCategoryName(), StringUtils.EMPTY)) { - categoryCombox.setSelectedItem(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_None")); - } else if(data!= null && !this.boxItemsContainsObject(categoryCombox,data.getCategoryName())){ + if(ComparatorUtils.equals(data.getCategoryName(), StringUtils.EMPTY)) { + categoryCombox.setSelectedItem(Toolkit.i18nText("Fine-Design_Chart_Use_None")); + } else if(!DataPaneHelper.boxItemsContainsObject(categoryCombox,data.getCategoryName())){ categoryCombox.setSelectedItem(null); }else { combineCustomEditValue(categoryCombox, data.getCategoryName()); @@ -146,20 +147,6 @@ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPa seriesTypeComboxPane.populateBean(collection,this.isNeedSummaryCaculateMethod()); } - private boolean boxItemsContainsObject(UIComboBox box,Object item){ - if(box == null){ - return false; - } - - ComboBoxModel dataModel = box.getModel(); - for (int i = 0; i < dataModel.getSize(); i++) { - if(ComparatorUtils.equals(dataModel.getElementAt(i),item)){ - return true; - } - } - return false; - } - /** * 重新布局整个面板 */ diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/DataPaneHelper.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/DataPaneHelper.java index 69cf88286f..7f5373c665 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/DataPaneHelper.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/DataPaneHelper.java @@ -7,6 +7,7 @@ import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; +import javax.swing.ComboBoxModel; import java.util.List; /** @@ -24,6 +25,30 @@ public class DataPaneHelper { box.refreshBoxItems(list); } + public static boolean boxItemsContainsObject(UIComboBox box, Object item) { + if (box == null) { + return false; + } + + ComboBoxModel dataModel = box.getModel(); + + for (int i = 0; i < dataModel.getSize(); i++) { + if (ComparatorUtils.equals(dataModel.getElementAt(i), item)) { + return true; + } + } + + return false; + } + + public static void combineCustomEditValue(UIComboBox comBox, String value) { + if(comBox != null) { + comBox.setEditable(true); + comBox.setSelectedItem(value); + comBox.setEditable(false); + } + } + /** * 清空box里所有东西 * diff --git a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java index bef72ca3dc..aab267c545 100644 --- a/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java +++ b/designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/SeriesNameUseFieldValuePane.java @@ -14,10 +14,8 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.CalculateComboBox; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.general.ComparatorUtils; import javax.swing.BorderFactory; -import javax.swing.ComboBoxModel; import javax.swing.JPanel; import java.awt.BorderLayout; import java.awt.Component; @@ -171,20 +169,6 @@ public class SeriesNameUseFieldValuePane extends FurtherBasicBeanPane Date: Wed, 22 Jul 2020 23:33:04 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/box/BoxIndependentVanChartInterface.java | 2 +- .../{ => table}/BoxPlotTableDataContentPane.java | 2 +- .../BoxPlotTableResultDataSeriesPane.java | 2 +- .../BoxPlotTableSeriesNameUseFieldNamePane.java | 12 ++++++++++++ .../BoxPlotTableSeriesNameUseFieldValuePane.java | 12 ++++++++++++ .../{ => table}/BoxPlotTableSeriesTypeUsePane.java | 12 +++++------- 6 files changed, 32 insertions(+), 10 deletions(-) rename designer-chart/src/main/java/com/fr/van/chart/box/data/{ => table}/BoxPlotTableDataContentPane.java (99%) rename designer-chart/src/main/java/com/fr/van/chart/box/data/{ => table}/BoxPlotTableResultDataSeriesPane.java (99%) create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesNameUseFieldNamePane.java create mode 100644 designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesNameUseFieldValuePane.java rename designer-chart/src/main/java/com/fr/van/chart/box/data/{ => table}/BoxPlotTableSeriesTypeUsePane.java (94%) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java b/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java index 099a8484df..cb08abcbd1 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/BoxIndependentVanChartInterface.java @@ -14,7 +14,7 @@ import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPa import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; import com.fr.van.chart.box.data.BoxPlotReportDataContentPane; -import com.fr.van.chart.box.data.BoxPlotTableDataContentPane; +import com.fr.van.chart.box.data.table.BoxPlotTableDataContentPane; import com.fr.van.chart.designer.other.VanChartInteractivePane; import com.fr.van.chart.designer.other.VanChartOtherPane; import com.fr.van.chart.designer.other.zoom.ZoomPane; diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableDataContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java similarity index 99% rename from designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableDataContentPane.java rename to designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java index 679ad29222..6ea7e126e4 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableDataContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableDataContentPane.java @@ -1,4 +1,4 @@ -package com.fr.van.chart.box.data; +package com.fr.van.chart.box.data.table; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.Plot; diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableResultDataSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java similarity index 99% rename from designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableResultDataSeriesPane.java rename to designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java index 77ce69689a..04dd3cda96 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableResultDataSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableResultDataSeriesPane.java @@ -1,4 +1,4 @@ -package com.fr.van.chart.box.data; +package com.fr.van.chart.box.data.table; import com.fr.chart.base.ChartConstants; import com.fr.chart.chartattr.ChartCollection; diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesNameUseFieldNamePane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesNameUseFieldNamePane.java new file mode 100644 index 0000000000..8fc7d7e684 --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesNameUseFieldNamePane.java @@ -0,0 +1,12 @@ +package com.fr.van.chart.box.data.table; + +import com.fr.chart.chartdata.MoreNameCDDefinition; +import com.fr.design.mainframe.chart.gui.data.table.SeriesNameUseFieldNamePane; +import com.fr.plugin.chart.box.data.VanBoxMoreNameCDDefinition; + +public class BoxPlotTableSeriesNameUseFieldNamePane extends SeriesNameUseFieldNamePane { + + protected MoreNameCDDefinition createMoreNameCDDefinition() { + return new VanBoxMoreNameCDDefinition(); + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesNameUseFieldValuePane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesNameUseFieldValuePane.java new file mode 100644 index 0000000000..93319f5c3e --- /dev/null +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesNameUseFieldValuePane.java @@ -0,0 +1,12 @@ +package com.fr.van.chart.box.data.table; + +import com.fr.chart.chartdata.OneValueCDDefinition; +import com.fr.design.mainframe.chart.gui.data.table.SeriesNameUseFieldValuePane; +import com.fr.plugin.chart.box.data.VanBoxOneValueCDDefinition; + +public class BoxPlotTableSeriesNameUseFieldValuePane extends SeriesNameUseFieldValuePane { + + protected OneValueCDDefinition createOneValueCDDefinition() { + return new VanBoxOneValueCDDefinition(); + } +} diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableSeriesTypeUsePane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java similarity index 94% rename from designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableSeriesTypeUsePane.java rename to designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java index 211e4d93c8..1fd9186b18 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/data/BoxPlotTableSeriesTypeUsePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java @@ -1,4 +1,4 @@ -package com.fr.van.chart.box.data; +package com.fr.van.chart.box.data.table; import com.fr.chart.base.ChartConstants; import com.fr.chart.chartattr.ChartCollection; @@ -14,8 +14,6 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper; -import com.fr.design.mainframe.chart.gui.data.table.SeriesNameUseFieldNamePane; -import com.fr.design.mainframe.chart.gui.data.table.SeriesNameUseFieldValuePane; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.UIComponentUtils; import com.fr.general.ComparatorUtils; @@ -40,8 +38,8 @@ public class BoxPlotTableSeriesTypeUsePane extends UIComboBoxPane> initPaneList() { - nameFieldValuePane = new SeriesNameUseFieldValuePane(); - nameFieldNamePane = new SeriesNameUseFieldNamePane(); + nameFieldValuePane = new BoxPlotTableSeriesNameUseFieldValuePane(); + nameFieldNamePane = new BoxPlotTableSeriesNameUseFieldNamePane(); nameFieldValuePane.relayoutPane(NEED_SUMMERY); nameFieldNamePane.relayoutPane(NEED_SUMMERY);