From a012c7f67697155ee506f924cd31d53feae13872 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 30 Sep 2020 11:39:48 +0800 Subject: [PATCH 01/12] =?UTF-8?q?CHART-15942=20=E6=A0=87=E7=AD=BE=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E7=BA=BF=E5=BD=A2=E9=80=89=E6=8B=A9=E4=B8=BA=E6=97=A0?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=85=B6=E4=BD=99=E9=9D=A2=E6=9D=BF=E9=9A=90?= =?UTF-8?q?=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../border/VanChartBorderWithShapePane.java | 125 ++++++++++++++---- 1 file changed, 100 insertions(+), 25 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java index 536149587..8ee10d0e7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java @@ -1,58 +1,133 @@ package com.fr.van.chart.designer.component.border; -import com.fr.chart.base.AttrBorder; import com.fr.chart.chartglyph.Marker; import com.fr.chart.chartglyph.MarkerFactory; +import com.fr.design.dialog.BasicPane; +import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.xcombox.MarkerComboBox; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; +import com.fr.design.style.color.ColorSelectBox; import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.widget.FRWidgetFactory; import com.fr.plugin.chart.base.AttrBorderWithShape; import com.fr.plugin.chart.marker.type.MarkerType; +import com.fr.stable.Constants; +import com.fr.stable.CoreConstants; +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; -public class VanChartBorderWithShapePane extends VanChartBorderWithRadiusPane { +public class VanChartBorderWithShapePane extends BasicPane { - private MarkerComboBox shapePane; + private LineComboBox lineTypeBox; + private ColorSelectBox lineColorBox; + private MarkerComboBox borderShape; + private UISpinner borderRadius; - protected void initComponents() { - shapePane = new MarkerComboBox(MarkerFactory.getLabelShapeMarkers()); - super.initComponents(); + private JPanel detailPane; + + public VanChartBorderWithShapePane() { + initComponents(); + createBorderPane(); + } + + private void initComponents() { + lineTypeBox = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART); + lineColorBox = new ColorSelectBox(100); + borderShape = new MarkerComboBox(MarkerFactory.getLabelShapeMarkers()); + borderRadius = new UISpinner(0, 1000, 1, 0); + } + + private void createBorderPane() { + this.setLayout(new BorderLayout()); + + detailPane = createDetailPane(); + + this.add(createLineTypePane(), BorderLayout.CENTER); + this.add(detailPane, BorderLayout.SOUTH); + + initLineTypeListener(); } - protected Component[][] getUseComponent() { - return new Component[][]{ + private void initLineTypeListener() { + lineTypeBox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + checkDetailPane(); + } + }); + } + + private void checkDetailPane() { + detailPane.setVisible(lineTypeBox.getSelectedLineStyle() != Constants.LINE_NONE); + } + + private JPanel createLineTypePane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + + double[] columnSize = {f, e}; + double[] rowSize = {p, p}; + + Component[][] components = new Component[][]{ new Component[]{null, null}, new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")), - UIComponentUtils.wrapWithBorderLayoutPane(currentLineCombo)}, - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), currentLineColorPane}, - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Shape")), - UIComponentUtils.wrapWithBorderLayoutPane(shapePane)}, - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Report_Radius")), getRadius()} - }; + UIComponentUtils.wrapWithBorderLayoutPane(lineTypeBox)}}; + + return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); } - protected double[] getRowSize() { + private JPanel createDetailPane() { double p = TableLayout.PREFERRED; - return new double[]{p, p, p, p, p}; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + + double[] columnSize = {f, e}; + double[] rowSize = {p, p, p, p}; + + Component[][] components = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), lineColorBox}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Shape")), + UIComponentUtils.wrapWithBorderLayoutPane(borderShape)}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Report_Radius")), borderRadius} + }; + + return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); } - public void populate(AttrBorder border) { - super.populate(border); + protected String title4PopupWindow() { + return null; + } - if (border instanceof AttrBorderWithShape) { - shapePane.setSelectedMarker((Marker.createMarker(((AttrBorderWithShape) border).getShape()))); + public void populate(AttrBorderWithShape border) { + if (border == null) { + return; } - } - public void update(AttrBorder border) { - super.update(border); + lineTypeBox.setSelectedLineStyle(border.getBorderStyle()); + lineColorBox.setSelectObject(border.getBorderColor()); + borderShape.setSelectedMarker((Marker.createMarker(border.getShape()))); + borderRadius.setValue(border.getRoundRadius()); - if (border instanceof AttrBorderWithShape) { - ((AttrBorderWithShape) border).setShape(MarkerType.parse(shapePane.getSelectedMarkder().getMarkerType())); + checkDetailPane(); + } + + public void update(AttrBorderWithShape border) { + if (border == null) { + return; } + + border.setBorderStyle(lineTypeBox.getSelectedLineStyle()); + border.setBorderColor(lineColorBox.getSelectObject()); + border.setShape(MarkerType.parse(borderShape.getSelectedMarkder().getMarkerType())); + border.setRoundRadius((int) borderRadius.getValue()); } } From 582eda383b21e1d714b2e532b2cd2167d90f166e Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 30 Sep 2020 12:12:42 +0800 Subject: [PATCH 02/12] =?UTF-8?q?CHART-15944=20=E6=A0=87=E7=AD=BE=E5=BD=A2?= =?UTF-8?q?=E7=8A=B6=E9=80=89=E6=8B=A9=E5=90=8E=E4=B8=89=E7=A7=8D=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=9C=86=E8=A7=92=E7=81=B0=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../border/VanChartBorderWithShapePane.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java index 8ee10d0e7..ee3e0b02d 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java @@ -25,6 +25,8 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class VanChartBorderWithShapePane extends BasicPane { + private static final int RECTANGULAR_INDEX = 0; + private static final int DIALOG_INDEX = 1; private LineComboBox lineTypeBox; private ColorSelectBox lineColorBox; @@ -54,6 +56,7 @@ public class VanChartBorderWithShapePane extends BasicPane { this.add(detailPane, BorderLayout.SOUTH); initLineTypeListener(); + initShapeListener(); } private void initLineTypeListener() { @@ -68,6 +71,18 @@ public class VanChartBorderWithShapePane extends BasicPane { detailPane.setVisible(lineTypeBox.getSelectedLineStyle() != Constants.LINE_NONE); } + private void initShapeListener() { + borderShape.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + checkRadiusPane(); + } + }); + } + + private void checkRadiusPane() { + borderRadius.setEnabled(borderShape.getSelectedIndex() == RECTANGULAR_INDEX || borderShape.getSelectedIndex() == DIALOG_INDEX); + } + private JPanel createLineTypePane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; @@ -118,6 +133,7 @@ public class VanChartBorderWithShapePane extends BasicPane { borderRadius.setValue(border.getRoundRadius()); checkDetailPane(); + checkRadiusPane(); } public void update(AttrBorderWithShape border) { From d2cc5368aef0ceb0dad2ffa44748189807f3ace7 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 7 Oct 2020 11:35:57 +0800 Subject: [PATCH 03/12] =?UTF-8?q?CHART-16058=20=E5=AE=8C=E5=96=84=E6=BC=8F?= =?UTF-8?q?=E6=96=97=E5=9B=BE=E6=8F=90=E7=A4=BA=E7=9A=84=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VanChartFunnelTooltipContentPane.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelTooltipContentPane.java index 37e7624af..ef6fc8210 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelTooltipContentPane.java @@ -1,6 +1,8 @@ package com.fr.van.chart.funnel.designer.style; import com.fr.plugin.chart.base.AttrTooltipContent; +import com.fr.plugin.chart.base.AttrTooltipRichText; +import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.base.format.AttrTooltipNameFormat; import com.fr.van.chart.designer.component.VanChartTooltipContentPane; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; @@ -9,6 +11,7 @@ import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckB import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.ValueFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.ValueFormatPaneWithoutCheckBox; +import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; @@ -58,6 +61,24 @@ public class VanChartFunnelTooltipContentPane extends VanChartTooltipContentPane setRichTextPercentFormatPane(new FunnelPercentFormatPaneWithoutCheckBox(parent, showOnPane)); } + protected void populateRichEditor(AttrTooltipContent attrTooltipContent) { + VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{ + getRichTextSeriesNameFormatPane(), + getRichTextValueFormatPane(), + getRichTextPercentFormatPane() + }; + + AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{ + attrTooltipContent.getRichTextSeriesFormat(), + attrTooltipContent.getRichTextValueFormat(), + attrTooltipContent.getRichTextPercentFormat() + }; + + setRichTextAttr(new AttrTooltipRichText()); + populateRichTextFormat(formatPaneGroup, formatGroup); + populateRichText(attrTooltipContent.getRichTextAttr()); + } + protected AttrTooltipContent createAttrTooltip() { AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); attrTooltipContent.getCategoryFormat().setEnable(false); From 2f13cf091067bd2ee9108c363f8caa3a555ae244 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 7 Oct 2020 16:49:08 +0800 Subject: [PATCH 04/12] =?UTF-8?q?CHART-16038=20=E5=AE=8C=E5=96=84=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E5=9B=BE=E6=8F=90=E7=A4=BA=E7=9A=84=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../VanChartStructureTooltipContentPane.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureTooltipContentPane.java index 2a72f6a09..493da6934 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureTooltipContentPane.java @@ -3,6 +3,8 @@ package com.fr.van.chart.structure.desinger.style; import com.fr.design.i18n.Toolkit; import com.fr.plugin.chart.base.AttrTooltipContent; +import com.fr.plugin.chart.base.AttrTooltipRichText; +import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.plugin.chart.multilayer.style.AttrTooltipMultiLevelNameFormat; import com.fr.van.chart.designer.component.VanChartTooltipContentPane; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; @@ -13,6 +15,7 @@ import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckB import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.component.format.ValueFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.ValueFormatPaneWithoutCheckBox; +import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; @@ -87,10 +90,29 @@ public class VanChartStructureTooltipContentPane extends VanChartTooltipContentP setRichTextPercentFormatPane(richTextPercentFormatPane); } + protected void populateRichEditor(AttrTooltipContent attrTooltipContent) { + VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{ + getRichTextCategoryNameFormatPane(), + getRichTextSeriesNameFormatPane(), + getRichTextValueFormatPane() + }; + + AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{ + attrTooltipContent.getRichTextCategoryFormat(), + attrTooltipContent.getRichTextSeriesFormat(), + attrTooltipContent.getRichTextValueFormat() + }; + + setRichTextAttr(new AttrTooltipRichText()); + populateRichTextFormat(formatPaneGroup, formatGroup); + populateRichText(attrTooltipContent.getRichTextAttr()); + } + @Override protected AttrTooltipContent createAttrTooltip() { AttrTooltipContent attrTooltipContent = new AttrTooltipContent(); attrTooltipContent.setCategoryFormat(new AttrTooltipMultiLevelNameFormat()); + attrTooltipContent.setRichTextCategoryFormat(new AttrTooltipMultiLevelNameFormat()); return attrTooltipContent; } } From 6e6e05c42c776a0eff41700798d792bf6a9fcb4e Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 7 Oct 2020 22:47:19 +0800 Subject: [PATCH 05/12] =?UTF-8?q?CHART-15999=20=E5=AE=8C=E5=96=84=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E5=AF=8C=E6=96=87=E6=9C=AC=E5=8F=82=E6=95=B0=E8=A7=A3?= =?UTF-8?q?=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/designer/style/label/VanChartMapLabelContentPane.java | 2 ++ .../designer/style/tooltip/VanChartMapTooltipContentPane.java | 2 ++ .../van/chart/map/line/VanChartLineMapTooltipContentPane.java | 2 ++ 3 files changed, 6 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java index de2b9171c..f73c32a48 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java @@ -45,6 +45,8 @@ public class VanChartMapLabelContentPane extends VanChartLabelContentPane { AttrTooltipContent content = new AttrTooltipContent(); content.setCategoryFormat(new AttrTooltipAreaNameFormat()); content.setValueFormat(new AttrTooltipMapValueFormat()); + content.setRichTextCategoryFormat(new AttrTooltipAreaNameFormat()); + content.setRichTextValueFormat(new AttrTooltipMapValueFormat()); return content; } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipContentPane.java index cc4ca7982..12948b14d 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/tooltip/VanChartMapTooltipContentPane.java @@ -45,6 +45,8 @@ public class VanChartMapTooltipContentPane extends VanChartTooltipContentPane { AttrTooltipContent content = new AttrTooltipContent(); content.setCategoryFormat(new AttrTooltipAreaNameFormat()); content.setValueFormat(new AttrTooltipMapValueFormat()); + content.setRichTextCategoryFormat(new AttrTooltipAreaNameFormat()); + content.setRichTextValueFormat(new AttrTooltipMapValueFormat()); return content; } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapTooltipContentPane.java index 1b3d31bee..9dbc696a6 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapTooltipContentPane.java @@ -43,6 +43,8 @@ public class VanChartLineMapTooltipContentPane extends VanChartTooltipContentPan AttrTooltipContent content = new AttrTooltipContent(); content.setCategoryFormat(new AttrTooltipStartAndEndNameFormat()); content.setValueFormat(new AttrTooltipValueFormat()); + content.setRichTextCategoryFormat(new AttrTooltipStartAndEndNameFormat()); + content.setRichTextValueFormat(new AttrTooltipValueFormat()); return content; } From c602e19a6845bc84191e2a2911b1f72d12e47f9b Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 8 Oct 2020 12:56:44 +0800 Subject: [PATCH 06/12] =?UTF-8?q?CHART-15946=20=E6=A0=87=E7=AD=BE=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E9=A2=9C=E8=89=B2=E6=94=AF=E6=8C=81=E8=87=AA=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../border/VanChartBorderWithShapePane.java | 67 ++++++++++++++++++- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java index ee3e0b02d..f764c9baa 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/border/VanChartBorderWithShapePane.java @@ -3,6 +3,7 @@ package com.fr.van.chart.designer.component.border; import com.fr.chart.chartglyph.Marker; import com.fr.chart.chartglyph.MarkerFactory; import com.fr.design.dialog.BasicPane; +import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; @@ -28,12 +29,17 @@ public class VanChartBorderWithShapePane extends BasicPane { private static final int RECTANGULAR_INDEX = 0; private static final int DIALOG_INDEX = 1; + private static final int AUTO_COLOR = 0; + private static final int CUSTOM_COLOR = 1; + private LineComboBox lineTypeBox; + private UIButtonGroup lineColorButton; private ColorSelectBox lineColorBox; private MarkerComboBox borderShape; private UISpinner borderRadius; private JPanel detailPane; + private JPanel colorBoxPane; public VanChartBorderWithShapePane() { initComponents(); @@ -42,6 +48,10 @@ public class VanChartBorderWithShapePane extends BasicPane { private void initComponents() { lineTypeBox = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART); + lineColorButton = new UIButtonGroup<>(new String[]{ + Toolkit.i18nText("Fine-Design_Chart_Automatic"), + Toolkit.i18nText("Fine-Design_Chart_Custom") + }); lineColorBox = new ColorSelectBox(100); borderShape = new MarkerComboBox(MarkerFactory.getLabelShapeMarkers()); borderRadius = new UISpinner(0, 1000, 1, 0); @@ -56,6 +66,7 @@ public class VanChartBorderWithShapePane extends BasicPane { this.add(detailPane, BorderLayout.SOUTH); initLineTypeListener(); + initLineColorListener(); initShapeListener(); } @@ -71,6 +82,18 @@ public class VanChartBorderWithShapePane extends BasicPane { detailPane.setVisible(lineTypeBox.getSelectedLineStyle() != Constants.LINE_NONE); } + private void initLineColorListener() { + lineColorButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + checkColorPane(); + } + }); + } + + private void checkColorPane() { + colorBoxPane.setVisible(lineColorButton.getSelectedIndex() == CUSTOM_COLOR); + } + private void initShapeListener() { borderShape.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { @@ -105,17 +128,52 @@ public class VanChartBorderWithShapePane extends BasicPane { double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; double[] columnSize = {f, e}; - double[] rowSize = {p, p, p, p}; + double[] rowSize = {p, p, p}; Component[][] components = new Component[][]{ new Component[]{null, null}, - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), lineColorBox}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Shape")), UIComponentUtils.wrapWithBorderLayoutPane(borderShape)}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Report_Radius")), borderRadius} }; - return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + JPanel center = createLineColorPane(); + JPanel south = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + + JPanel panel = new JPanel(new BorderLayout()); + + panel.add(center, BorderLayout.CENTER); + panel.add(south, BorderLayout.SOUTH); + + return panel; + } + + private JPanel createLineColorPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; + + double[] columnSize = {f, e}; + double[] rowSize = {p, p}; + + Component[][] center = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), lineColorButton} + }; + + Component[][] south = new Component[][]{ + new Component[]{null, null}, + new Component[]{null, lineColorBox} + }; + + colorBoxPane = TableLayout4VanChartHelper.createGapTableLayoutPane(south, rowSize, columnSize); + + JPanel panel = new JPanel(new BorderLayout()); + + panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(center, rowSize, columnSize), BorderLayout.CENTER); + panel.add(colorBoxPane, BorderLayout.SOUTH); + + return panel; } protected String title4PopupWindow() { @@ -128,11 +186,13 @@ public class VanChartBorderWithShapePane extends BasicPane { } lineTypeBox.setSelectedLineStyle(border.getBorderStyle()); + lineColorButton.setSelectedIndex(border.isAutoColor() ? AUTO_COLOR : CUSTOM_COLOR); lineColorBox.setSelectObject(border.getBorderColor()); borderShape.setSelectedMarker((Marker.createMarker(border.getShape()))); borderRadius.setValue(border.getRoundRadius()); checkDetailPane(); + checkColorPane(); checkRadiusPane(); } @@ -142,6 +202,7 @@ public class VanChartBorderWithShapePane extends BasicPane { } border.setBorderStyle(lineTypeBox.getSelectedLineStyle()); + border.setAutoColor(lineColorButton.getSelectedIndex() == AUTO_COLOR); border.setBorderColor(lineColorBox.getSelectObject()); border.setShape(MarkerType.parse(borderShape.getSelectedMarkder().getMarkerType())); border.setRoundRadius((int) borderRadius.getValue()); From ddc58bf58b12e2b402dacb0cfbd8946b57e58bc3 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 8 Oct 2020 16:52:58 +0800 Subject: [PATCH 07/12] =?UTF-8?q?CHART-16036=20=E5=AE=8C=E5=96=84=E5=A4=9A?= =?UTF-8?q?=E5=B1=82=E9=A5=BC=E5=9B=BE=E5=AF=8C=E6=96=87=E6=9C=AC=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/multilayer/style/VanChartMultiPieLabelContentPane.java | 1 + .../multilayer/style/VanChartMultiPieTooltipContentPane.java | 1 + 2 files changed, 2 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieLabelContentPane.java index 7fc9256bd..a3d8f3c57 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieLabelContentPane.java @@ -38,6 +38,7 @@ public class VanChartMultiPieLabelContentPane extends VanChartLabelContentPane { protected AttrTooltipContent createAttrTooltip() { AttrTooltipContent content = new AttrTooltipContent(); content.setCategoryFormat(new AttrTooltipMultiLevelNameFormat()); + content.setRichTextCategoryFormat(new AttrTooltipMultiLevelNameFormat()); return content; } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieTooltipContentPane.java index dab7a5043..1fbe0870a 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieTooltipContentPane.java @@ -39,6 +39,7 @@ public class VanChartMultiPieTooltipContentPane extends VanChartTooltipContentPa protected AttrTooltipContent createAttrTooltip() { AttrTooltipContent content = new AttrTooltipContent(); content.setCategoryFormat(new AttrTooltipMultiLevelNameFormat()); + content.setRichTextCategoryFormat(new AttrTooltipMultiLevelNameFormat()); return content; } From 3468ff5f917bb735610fe809bf33048bc76ac759 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 8 Oct 2020 17:00:27 +0800 Subject: [PATCH 08/12] =?UTF-8?q?CHART-16031=20=E5=AE=8C=E5=96=84=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E7=9B=98=E5=AF=8C=E6=96=87=E6=9C=AC=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TooltipContentPaneWithOutSeries.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/tooltip/TooltipContentPaneWithOutSeries.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/tooltip/TooltipContentPaneWithOutSeries.java index 25e080810..5bab55e61 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/tooltip/TooltipContentPaneWithOutSeries.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/tooltip/TooltipContentPaneWithOutSeries.java @@ -1,6 +1,10 @@ package com.fr.van.chart.designer.component.tooltip; +import com.fr.plugin.chart.base.AttrTooltipContent; +import com.fr.plugin.chart.base.AttrTooltipRichText; +import com.fr.plugin.chart.base.format.AttrTooltipFormat; import com.fr.van.chart.designer.component.VanChartTooltipContentPane; +import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithoutCheckBox; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; @@ -36,4 +40,22 @@ public class TooltipContentPaneWithOutSeries extends VanChartTooltipContentPane new Component[]{getRichTextPercentFormatPane(), null} }; } + + protected void populateRichEditor(AttrTooltipContent attrTooltipContent) { + VanChartFormatPaneWithoutCheckBox[] formatPaneGroup = new VanChartFormatPaneWithoutCheckBox[]{ + getRichTextCategoryNameFormatPane(), + getRichTextValueFormatPane(), + getRichTextPercentFormatPane() + }; + + AttrTooltipFormat[] formatGroup = new AttrTooltipFormat[]{ + attrTooltipContent.getRichTextCategoryFormat(), + attrTooltipContent.getRichTextValueFormat(), + attrTooltipContent.getRichTextPercentFormat() + }; + + setRichTextAttr(new AttrTooltipRichText()); + populateRichTextFormat(formatPaneGroup, formatGroup); + populateRichText(attrTooltipContent.getRichTextAttr()); + } } \ No newline at end of file From b3f3324d10ae5d5d7817c4c938ef626c02302ca4 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 8 Oct 2020 19:59:07 +0800 Subject: [PATCH 09/12] =?UTF-8?q?CHART-15990=20=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=87=AA=E5=AE=9A=E4=B9=89=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E6=94=B9=E5=8F=98content?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/com/fr/design/editor/script/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js index f87d8b6c0..494be9525 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.js @@ -232,7 +232,7 @@ content = this.editor.getValue(BI.NicEditor.FormatType.ESCAPE), origin = content; if (isAuto) { - content = this._switchToAutoStyle(); + // content = this._switchToAutoStyle(); this.setFocus(); } else if (editorService.isRichTextEqual(content, this.options.placeholder)) { content = ""; From eb2c2dc7b39382c67c97b9e1b13a5e291ebdc31f Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 8 Oct 2020 20:30:29 +0800 Subject: [PATCH 10/12] =?UTF-8?q?CHART-15965=20=E6=97=A0=E8=BE=B9=E6=A1=86?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=95=8C=E9=9D=A2=E6=97=B6=EF=BC=8Cborder?= =?UTF-8?q?=E5=AE=BD=E5=BA=A6=E8=AE=BE=E7=BD=AE=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/style/label/VanChartPlotLabelDetailPane.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java index 22f8ace78..b6143dc17 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java @@ -14,6 +14,7 @@ import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.style.color.ColorSelectBox; import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.attr.plot.VanChartLabelPositionPlot; +import com.fr.plugin.chart.base.AttrBorderWithShape; import com.fr.plugin.chart.base.AttrLabelDetail; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.stable.Constants; @@ -370,6 +371,10 @@ public class VanChartPlotLabelDetailPane extends BasicPane { } if(borderPane != null){ borderPane.update(detail.getBorder()); + } else { + AttrBorderWithShape border = new AttrBorderWithShape(); + border.setBorderStyle(Constants.LINE_NONE); + detail.setBorder(border); } if(backgroundPane != null){ backgroundPane.update(detail.getBackground()); From 985fa9f34030d380a28bb6c3d4528e14f6136cc3 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 8 Oct 2020 21:07:12 +0800 Subject: [PATCH 11/12] =?UTF-8?q?CHART-16009=20=E6=A0=87=E7=AD=BE=E7=BA=B5?= =?UTF-8?q?=E5=90=91=E6=97=B6=E6=97=A0=E8=BE=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../label/VanChartPlotLabelDetailPane.java | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java index b6143dc17..d1c27847a 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java @@ -37,6 +37,8 @@ import java.awt.Component; public class VanChartPlotLabelDetailPane extends BasicPane { private static final long serialVersionUID = -22438250307946275L; + private static final int HORIZONTAL_INDEX = 0; + private BasicBeanPane dataLabelContentPane; private UIButtonGroup position; @@ -52,6 +54,9 @@ public class VanChartPlotLabelDetailPane extends BasicPane { private JPanel positionPane; private Integer[] oldPositionValues; + private JPanel borderPaneWithTitle; + private JPanel backgroundPaneWithTitle; + private VanChartStylePane parent; private Plot plot; @@ -126,8 +131,9 @@ public class VanChartPlotLabelDetailPane extends BasicPane { private JPanel createLabelBorderPane() { borderPane = new VanChartBorderWithShapePane(); + borderPaneWithTitle = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Border"), borderPane); - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Border"), borderPane); + return borderPaneWithTitle; } private JPanel createLabelBackgroundPane() { @@ -143,7 +149,9 @@ public class VanChartPlotLabelDetailPane extends BasicPane { } }; - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Background"), backgroundPane); + backgroundPaneWithTitle = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Background"), backgroundPane); + + return backgroundPaneWithTitle; } protected double[] getLabelStyleRowSize(double p) { @@ -228,6 +236,12 @@ public class VanChartPlotLabelDetailPane extends BasicPane { Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"), }); + orientation.addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + checkOrientation(); + } + }); + return TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Text_Orientation"), orientation); } @@ -310,6 +324,16 @@ public class VanChartPlotLabelDetailPane extends BasicPane { tractionLine.setSelected(position.getSelectedItem() == Constants.OUTSIDE); checkPositionEnabled(); } + + private void checkOrientation() { + if (orientation != null && borderPaneWithTitle != null && backgroundPaneWithTitle != null) { + boolean horizontal = orientation.getSelectedIndex() == HORIZONTAL_INDEX; + + borderPaneWithTitle.setVisible(horizontal); + backgroundPaneWithTitle.setVisible(horizontal); + } + } + private void checkPositionEnabled() { tractionLinePane.setVisible(position.getSelectedItem() == Constants.OUTSIDE); } @@ -345,6 +369,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane { } checkAllUse(); + checkOrientation(); } From ebfdb749b33ba8c57676d3a2862b0f040406b825 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 8 Oct 2020 22:05:43 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9A=84=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/style/label/VanChartPlotLabelDetailPane.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java index d1c27847a..fd387654e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java @@ -14,7 +14,6 @@ import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.style.color.ColorSelectBox; import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.attr.plot.VanChartLabelPositionPlot; -import com.fr.plugin.chart.base.AttrBorderWithShape; import com.fr.plugin.chart.base.AttrLabelDetail; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.stable.Constants; @@ -396,10 +395,6 @@ public class VanChartPlotLabelDetailPane extends BasicPane { } if(borderPane != null){ borderPane.update(detail.getBorder()); - } else { - AttrBorderWithShape border = new AttrBorderWithShape(); - border.setBorderStyle(Constants.LINE_NONE); - detail.setBorder(border); } if(backgroundPane != null){ backgroundPane.update(detail.getBackground());