From 002b56f0ccea2923e917ffbebf35945867530dd0 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Sat, 18 Jul 2020 13:35:18 +0800 Subject: [PATCH] =?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;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