From 978a2177746a8fc255128df991fa534ab49c4aa7 Mon Sep 17 00:00:00 2001 From: Yyming Date: Tue, 29 Sep 2020 09:53:42 +0800 Subject: [PATCH 01/36] =?UTF-8?q?REPORT-40216=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86-=E6=95=B0=E6=8D=AE=E5=BA=93=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86-=E5=A4=8D=E5=88=B6=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E5=B9=B6=E4=BF=AE=E6=94=B9=E5=90=8D=E7=A7=B0=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E4=B8=AD=E7=9A=84=E5=8E=9F=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E4=BC=9A=E8=A2=AB=E8=87=AA=E5=8A=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/DesignTableDataManager.java | 5 +- .../data/datapane/TableDataPaneListPane.java | 46 +++++++++++-------- .../controlpane/ListControlPaneHelper.java | 2 +- .../java/com/fr/design/object/NameObject.java | 5 +- .../datapane/TableDataPaneListPaneTest.java | 24 ++++++++++ 5 files changed, 59 insertions(+), 23 deletions(-) create mode 100644 designer-base/src/test/java/com/fr/design/data/datapane/TableDataPaneListPaneTest.java diff --git a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java index bce63d642..f1758f068 100644 --- a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java +++ b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java @@ -97,7 +97,7 @@ public abstract class DesignTableDataManager { */ private static void fireDsChanged() { fireDsChanged(globalDsListeners); - for (Iterator>> entryIterator = dsListenersMap.entrySet().iterator(); entryIterator.hasNext();) { + for (Iterator>> entryIterator = dsListenersMap.entrySet().iterator(); entryIterator.hasNext(); ) { List dsListeners = entryIterator.next().getValue(); fireDsChanged(dsListeners); } @@ -190,6 +190,7 @@ public abstract class DesignTableDataManager { } dsListeners.add(l); } + /** * 获取数据源source中dsName的所有字段 * @@ -280,7 +281,7 @@ public abstract class DesignTableDataManager { Entry entry = entryIt.next(); list.add(entry.getKey()); } - return list.toArray(new String[list.size()]); + return list.toArray(new String[0]); } /** diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java index 8c09eb303..df4a3911b 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java @@ -7,6 +7,7 @@ import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.design.data.BasicTableDataUtils; import com.fr.design.data.DesignTableDataManager; import com.fr.design.dialog.FineJOptionPane; +import com.fr.design.gui.NameInspector; import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.ilist.ListModelElement; @@ -34,7 +35,7 @@ import java.util.Map; */ public class TableDataPaneListPane extends JListControlPane implements TableDataPaneController { private boolean isNamePermitted = true; - private Map dsNameChangedMap = new HashMap(); + private Map dsNameChangedMap = new HashMap<>(); public TableDataPaneListPane() { super(); @@ -43,17 +44,23 @@ public class TableDataPaneListPane extends JListControlPane implements TableData @Override public void propertyChange() { isNamePermitted = true; + String tempName = getEditingName(); + if (ComparatorUtils.equals(tempName, selectedName)) { + //说明双击之后又取消了,啥也不用做 + return; + } TableDataSource source = DesignTableDataManager.getEditingTableDataSource(); String[] allDSNames = DesignTableDataManager.getAllDSNames(source); String[] allListNames = nameableList.getAllNames(); allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY; - String tempName = getEditingName(); + Object editingType = getEditingType(); if (!BasicTableDataUtils.checkName(tempName)) { isNamePermitted = false; nameableList.stopEditing(); setIllegalIndex(editingIndex); + rename(selectedName, NameInspector.ILLEGAL_NAME_HOLDER); return; } @@ -61,15 +68,15 @@ public class TableDataPaneListPane extends JListControlPane implements TableData isNamePermitted = false; nameableList.stopEditing(); FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), - Toolkit.i18nText("Fine-Design_Basic_Table_Data_Empty_Name_Tips"), - Toolkit.i18nText("Fine-Design_Report_Alert"), - JOptionPane.WARNING_MESSAGE); + Toolkit.i18nText("Fine-Design_Basic_Table_Data_Empty_Name_Tips"), + Toolkit.i18nText("Fine-Design_Report_Alert"), + JOptionPane.WARNING_MESSAGE); setIllegalIndex(editingIndex); + rename(selectedName, NameInspector.ILLEGAL_NAME_HOLDER); return; } - - if (!ComparatorUtils.equals(tempName, selectedName) - && isNameRepeated(new List[]{Arrays.asList(allDSNames), Arrays.asList(allListNames)}, tempName)) { + boolean isRepeated = isNameRepeated(new List[]{Arrays.asList(allDSNames), Arrays.asList(allListNames)}, tempName); + if (isRepeated) { isNamePermitted = false; nameableList.stopEditing(); FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(TableDataPaneListPane.this), Toolkit.i18nText("Fine-Design_Basic_Table_Data_Duplicate_Name_Tips", tempName)); @@ -81,11 +88,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData setIllegalIndex(editingIndex); } if (nameableList.getSelectedValue() instanceof ListModelElement) { - Nameable selected = ((ListModelElement) nameableList.getSelectedValue()).wrapper; - if (!ComparatorUtils.equals(tempName, selected.getName()) && !isNameRepeated(new List[]{Arrays.asList(allDSNames), Arrays.asList(allListNames)}, tempName)) { - rename(selected.getName(), tempName); - - } + rename(selectedName, isRepeated ? NameInspector.ILLEGAL_NAME_HOLDER : tempName); } } }); @@ -93,6 +96,13 @@ public class TableDataPaneListPane extends JListControlPane implements TableData @Override public void rename(String oldName, String newName) { + //如果a改成了b,b又被改成了c,就认为是a改成了c + for (Map.Entry entry : dsNameChangedMap.entrySet()) { + if (StringUtils.equals(oldName, entry.getValue())) { + oldName = entry.getKey(); + } + } + dsNameChangedMap.put(oldName, newName); } @@ -148,7 +158,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData String[] allDsNames = DesignTableDataManager.getAllDSNames(source); // richer:生成的名字从1开始. kunsnat: 添加属性从0开始. - int count = 1; + int count = 1; while (isDsNameRepeated(prefix + count, allDsNames)) { count++; } @@ -192,7 +202,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData } } - populate(nameObjectList.toArray(new NameObject[nameObjectList.size()])); + populate(nameObjectList.toArray(new NameObject[0])); } /** @@ -209,10 +219,10 @@ public class TableDataPaneListPane extends JListControlPane implements TableData } while (procedurenameIt.hasNext()) { String name = procedurenameIt.next(); - nameObjectList.add(new NameObject(name, ProcedureConfig.getInstance().getProcedure(name))); + nameObjectList.add(new NameObject(name, ProcedureConfig.getInstance().getProcedure(name))); } - populate(nameObjectList.toArray(new NameObject[nameObjectList.size()])); + populate(nameObjectList.toArray(new NameObject[0])); } @Override @@ -220,7 +230,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData tableDataConfig.removeAllTableData(); ProcedureConfig.getInstance().removeAllProcedure(); Nameable[] tableDataArray = this.update(); - Map tableDataMap = new LinkedHashMap(); + Map tableDataMap = new LinkedHashMap(); for (int i = 0; i < tableDataArray.length; i++) { NameObject nameObject = (NameObject) tableDataArray[i]; tableDataMap.put(nameObject.getName(), (TableData) nameObject.getObject()); diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneHelper.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneHelper.java index 0d12772d3..76255d96b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneHelper.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/ListControlPaneHelper.java @@ -65,7 +65,7 @@ class ListControlPaneHelper { res.add(((ListModelElement) listModel.getElementAt(i)).wrapper); } - return res.toArray(new Nameable[res.size()]); + return res.toArray(new Nameable[0]); } /** diff --git a/designer-base/src/main/java/com/fr/design/object/NameObject.java b/designer-base/src/main/java/com/fr/design/object/NameObject.java index 818de9d57..c7dc3811c 100644 --- a/designer-base/src/main/java/com/fr/design/object/NameObject.java +++ b/designer-base/src/main/java/com/fr/design/object/NameObject.java @@ -2,6 +2,7 @@ package com.fr.design.object; import com.fr.base.BaseUtils; import com.fr.general.ComparatorUtils; +import com.fr.stable.StableUtils; /** * @@ -60,10 +61,10 @@ public class NameObject { return "Name:" + this.getName() + "\tObject:" + this.getObject(); } - @SuppressWarnings({ "rawtypes", "unchecked" }) + @SuppressWarnings({ "rawtypes"}) public Object clone() throws CloneNotSupportedException { NameObject newNameObject = (NameObject)super.clone(); - newNameObject.object = BaseUtils.cloneObject(this.object); + newNameObject.object = StableUtils.cloneObject(this.object); return newNameObject; } diff --git a/designer-base/src/test/java/com/fr/design/data/datapane/TableDataPaneListPaneTest.java b/designer-base/src/test/java/com/fr/design/data/datapane/TableDataPaneListPaneTest.java new file mode 100644 index 000000000..b47ea8e95 --- /dev/null +++ b/designer-base/src/test/java/com/fr/design/data/datapane/TableDataPaneListPaneTest.java @@ -0,0 +1,24 @@ +package com.fr.design.data.datapane; + +import org.junit.Test; + +import java.util.Map; + +import static org.junit.Assert.*; + +/** + * @author Yyming + * @version 10.0 + * Created by Yyming on 2020/9/29 + */ +public class TableDataPaneListPaneTest { + + @Test + public void rename() { + TableDataPaneListPane listPane = new TableDataPaneListPane(); + listPane.rename("111", "222"); + listPane.rename("222", "333"); + Map dsNameChangedMap = listPane.getDsNameChangedMap(); + assertEquals(1, dsNameChangedMap.size()); + } +} \ No newline at end of file From d3d2482a94b6062f60be2d36ee7ff3c871442944 Mon Sep 17 00:00:00 2001 From: Yyming Date: Tue, 29 Sep 2020 10:05:59 +0800 Subject: [PATCH 02/36] =?UTF-8?q?REPORT-40216=20=E7=94=A8=E5=8F=8C?= =?UTF-8?q?=E5=87=BB=E9=80=89=E4=B8=AD=E7=9A=84=E4=B8=8B=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/data/datapane/TableDataPaneListPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java index df4a3911b..d7efbcce3 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java @@ -52,7 +52,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData TableDataSource source = DesignTableDataManager.getEditingTableDataSource(); String[] allDSNames = DesignTableDataManager.getAllDSNames(source); String[] allListNames = nameableList.getAllNames(); - allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY; + allListNames[editingIndex] = StringUtils.EMPTY; Object editingType = getEditingType(); From d7120f36cb57d86c24318d674aa8585e05ea097f Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Tue, 29 Sep 2020 10:52:48 +0800 Subject: [PATCH 03/36] =?UTF-8?q?CHART-16003=20=E8=B0=83=E6=95=B4=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89JS=E7=95=8C=E9=9D=A2=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/designer/component/VanChartHtmlLabelPane.java | 3 ++- .../chart/designer/component/VanChartTooltipContentPane.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java index e6bee7c55..40f85dcb4 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartHtmlLabelPane.java @@ -148,11 +148,12 @@ public class VanChartHtmlLabelPane extends JPanel{ double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = { p, f }; - double[] rowSize = { p, p}; + double[] rowSize = {p, p, p}; Component[][] components = new Component[][]{ new Component[]{isCustomWidth, customWidth}, new Component[]{isCustomHeight, customHeight}, + new Component[] {null, null} }; return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index 98616c4e5..159db1a48 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -246,7 +246,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Tue, 29 Sep 2020 11:30:35 +0800 Subject: [PATCH 04/36] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/designer/component/label/GaugeLabelContentPane.java | 4 ++-- .../designer/style/label/VanChartGanttLabelContentPane.java | 4 ++-- .../desinger/style/VanChartStructureLabelContentPane.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/label/GaugeLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/label/GaugeLabelContentPane.java index 7369bc5af..690a6ab24 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/label/GaugeLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/label/GaugeLabelContentPane.java @@ -2,7 +2,7 @@ package com.fr.van.chart.designer.component.label; import com.fr.design.i18n.Toolkit; -import com.fr.van.chart.designer.component.VanChartTooltipContentPane; +import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JPanel; @@ -10,7 +10,7 @@ import javax.swing.JPanel; /** * Created by mengao on 2017/8/13. */ -public class GaugeLabelContentPane extends VanChartTooltipContentPane { +public class GaugeLabelContentPane extends VanChartLabelContentPane { public GaugeLabelContentPane(VanChartStylePane parent, JPanel showOnPane) { super(parent, showOnPane); diff --git a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttLabelContentPane.java index 25d7aa030..cfb1e63a8 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/label/VanChartGanttLabelContentPane.java @@ -3,7 +3,7 @@ package com.fr.van.chart.gantt.designer.style.label; import com.fr.design.i18n.Toolkit; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.gantt.attr.AttrGanttTooltipContent; -import com.fr.van.chart.designer.component.VanChartTooltipContentPane; +import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithCheckBox; import com.fr.van.chart.designer.style.VanChartStylePane; @@ -16,7 +16,7 @@ import java.awt.Component; /** * Created by hufan on 2017/1/13. */ -public class VanChartGanttLabelContentPane extends VanChartTooltipContentPane { +public class VanChartGanttLabelContentPane extends VanChartLabelContentPane { private VanChartFormatPaneWithCheckBox processesFormatPane; private VanChartDateFormatPaneWithCheckBox startTimeFormatPane; diff --git a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelContentPane.java index 979c7ba09..bfe147ba6 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/structure/desinger/style/VanChartStructureLabelContentPane.java @@ -4,7 +4,7 @@ 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.multilayer.style.AttrTooltipMultiLevelNameFormat; -import com.fr.van.chart.designer.component.VanChartTooltipContentPane; +import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.component.format.CategoryNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.SeriesNameFormatPaneWithCheckBox; @@ -17,7 +17,7 @@ import java.awt.Component; /** * Created by shine on 2017/2/15. */ -public class VanChartStructureLabelContentPane extends VanChartTooltipContentPane { +public class VanChartStructureLabelContentPane extends VanChartLabelContentPane { public VanChartStructureLabelContentPane(VanChartStylePane parent, JPanel showOnPane) { super(parent, showOnPane); } From f7f91b2f0f20c358a74e79062a63d87f6b66dd8b Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Tue, 29 Sep 2020 15:30:01 +0800 Subject: [PATCH 05/36] =?UTF-8?q?CHART-16060=20=E6=BC=8F=E6=96=97=E5=9B=BE?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E5=8F=82=E6=95=B0=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/designer/component/VanChartTooltipContentPane.java | 2 +- .../funnel/designer/style/VanChartFunnelTooltipContentPane.java | 1 + .../designer/style/VanChartWordCloudTooltipContentPane.java | 1 + .../src/main/resources/com/fr/design/editor/script/editor.js | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index 159db1a48..895da24a5 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -608,8 +608,8 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Tue, 29 Sep 2020 16:02:38 +0800 Subject: [PATCH 06/36] =?UTF-8?q?REPORT-40216=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/data/datapane/TableDataPaneListPane.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java index d7efbcce3..29e704f48 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java @@ -60,7 +60,6 @@ public class TableDataPaneListPane extends JListControlPane implements TableData isNamePermitted = false; nameableList.stopEditing(); setIllegalIndex(editingIndex); - rename(selectedName, NameInspector.ILLEGAL_NAME_HOLDER); return; } @@ -72,7 +71,6 @@ public class TableDataPaneListPane extends JListControlPane implements TableData Toolkit.i18nText("Fine-Design_Report_Alert"), JOptionPane.WARNING_MESSAGE); setIllegalIndex(editingIndex); - rename(selectedName, NameInspector.ILLEGAL_NAME_HOLDER); return; } boolean isRepeated = isNameRepeated(new List[]{Arrays.asList(allDSNames), Arrays.asList(allListNames)}, tempName); From 1037790bb3d47a35be55efb0bac1a844fad78f53 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Tue, 29 Sep 2020 16:10:05 +0800 Subject: [PATCH 07/36] =?UTF-8?q?CHART-15955=20=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=AE=BE=E7=BD=AE=E4=B8=BA=E5=8F=AF=E6=8B=96?= =?UTF-8?q?=E6=8B=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../van/chart/designer/component/VanChartRichEditorDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java index 2cc0463f9..32f840a0a 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java @@ -18,7 +18,7 @@ public class VanChartRichEditorDialog extends BasicDialog { this.setTitle(Toolkit.i18nText("Fine-Design_Report_RichTextEditor")); this.setBasicDialogSize(DEFAULT); GUICoreUtils.centerWindow(this); - this.setResizable(false); + this.setResizable(true); } protected void applyEnterAction() { From 6e1f4ab16b372abaeba6d738dccc9989eb1a60d7 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Tue, 29 Sep 2020 20:01:21 +0800 Subject: [PATCH 08/36] =?UTF-8?q?CHART-16000=20=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E5=BC=B9=E7=AA=97=E6=A8=A1=E6=80=81?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/designer/component/VanChartRichEditorDialog.java | 1 + .../chart/designer/component/VanChartTooltipContentPane.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java index 32f840a0a..e584ea544 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorDialog.java @@ -19,6 +19,7 @@ public class VanChartRichEditorDialog extends BasicDialog { this.setBasicDialogSize(DEFAULT); GUICoreUtils.centerWindow(this); this.setResizable(true); + this.setModal(true); } protected void applyEnterAction() { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java index 895da24a5..e3594ff22 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java @@ -9,6 +9,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; import com.fr.design.ui.ModernUIPane; import com.fr.plugin.chart.base.AttrTooltipContent; @@ -32,7 +33,6 @@ import com.fr.van.chart.designer.component.format.VanChartFormatPaneWithoutCheck import com.fr.van.chart.designer.style.VanChartStylePane; import javax.swing.JComponent; -import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.SwingUtilities; import java.awt.BorderLayout; @@ -407,7 +407,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane pane = VanChartRichEditorPane.createRichEditorPane(richText); - BasicDialog dialog = new VanChartRichEditorDialog(new JFrame(), pane); + BasicDialog dialog = new VanChartRichEditorDialog(DesignerContext.getDesignerFrame(), pane); pane.populate(VanChartRichEditorPane.getRichEditorModel(richText)); From a012c7f67697155ee506f924cd31d53feae13872 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Wed, 30 Sep 2020 11:39:48 +0800 Subject: [PATCH 09/36] =?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 10/36] =?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 11/36] =?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 12/36] =?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 13/36] =?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 14/36] =?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 15/36] =?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 16/36] =?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 17/36] =?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 18/36] =?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 19/36] =?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 20/36] =?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()); From 816bb760e239d85a99c7dd3719edd85c16f37480 Mon Sep 17 00:00:00 2001 From: Yvan Date: Fri, 9 Oct 2020 15:36:53 +0800 Subject: [PATCH 21/36] =?UTF-8?q?REPORT-38514=20=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E7=9A=84=E5=B1=9E=E6=80=A7=E7=95=8C=E9=9D=A2?= =?UTF-8?q?-=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0=E3=80=91=E6=A0=87=E7=AD=BE=E5=B1=9E=E6=80=A7=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E8=B7=9F=E5=AD=97=E4=BD=93=E6=9C=89=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E5=9D=97=E7=94=B1FRFontPane=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=EF=BC=8C=E8=BF=99=E4=B8=AA=E7=95=8C=E9=9D=A2=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E7=9A=84fontSizeC?= =?UTF-8?q?omboBox=E4=BC=9A=E5=B0=86=E6=8E=A5=E6=94=B6=E5=88=B0=E7=9A=84?= =?UTF-8?q?=E5=80=BC=E8=BD=AC=E5=8C=96=E4=B8=BA=E6=B5=AE=E7=82=B9=E6=95=B0?= =?UTF-8?q?=E8=80=8C=E4=B8=8D=E6=98=AF=E6=95=B4=E6=95=B0=EF=BC=8C=E5=8F=98?= =?UTF-8?q?=E6=88=90=E6=B5=AE=E7=82=B9=E6=95=B0=E4=B9=8B=E5=90=8E=E4=BC=9A?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D?= =?UTF-8?q?=E8=B7=AF=E3=80=9117=E5=B9=B4Momeak=E7=9A=84=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=94=B9=E5=8A=A8=EF=BC=88=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=EF=BC=89=E5=B0=86=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E4=BB=8E?= =?UTF-8?q?=E6=95=B4=E6=95=B0=E4=BF=AE=E6=94=B9=E4=B8=BA=E6=B5=AE=E7=82=B9?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E8=80=83=E8=99=91=E5=88=B0=E8=BF=99=E4=B8=80?= =?UTF-8?q?=E7=82=B9=EF=BC=8C=E4=B8=8D=E9=87=87=E5=8F=96=E6=94=B9=E5=9B=9E?= =?UTF-8?q?=E6=95=B4=E6=95=B0=E7=9A=84=E4=BF=AE=E6=94=B9=E6=96=B9=E6=A1=88?= =?UTF-8?q?=EF=BC=8C=E8=80=8C=E6=98=AF=E5=B0=86fontSizeComboBox=E4=B8=8E?= =?UTF-8?q?=E5=89=8D=E4=B8=80=E4=B8=AA=E7=BB=84=E4=BB=B6=E4=B9=8B=E9=97=B4?= =?UTF-8?q?=E7=9A=84=E9=97=B4=E9=9A=99=E5=87=8F=E5=B0=8F=EF=BC=8CTableLayo?= =?UTF-8?q?ut=E4=B8=8BfontSizeComboBox=E5=B0=B1=E4=BC=9A=E8=A2=AB=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=8B=89=E9=95=BF=EF=BC=8C=E6=8B=89=E9=95=BF=E5=90=8E?= =?UTF-8?q?=E8=83=BD=E5=A4=9F=E5=AE=8C=E6=95=B4=E6=98=BE=E7=A4=BA=E5=AD=97?= =?UTF-8?q?=E4=BD=93=E5=A4=A7=E5=B0=8F=EF=BC=8C=E6=94=B9=E5=8A=A8=E6=95=88?= =?UTF-8?q?=E6=9E=9C=E5=B7=B2=E7=BB=8F=E9=80=9A=E8=BF=87=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/style/FRFontPane.java | 25 ++++++++++++++++--- .../widget/ui/designer/LabelDefinePane.java | 4 ++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java b/designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java index 9ce63abe3..f806ded06 100644 --- a/designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java @@ -25,10 +25,20 @@ import com.fr.general.FRFont; import com.fr.stable.Constants; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JFrame; +import javax.swing.JPanel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.CardLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.GridLayout; +import java.awt.RenderingHints; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.Vector; @@ -67,11 +77,20 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse private UIToggleButton subPane; private JPanel linePane; private int italic_bold; + /** + * LeftPane和RightPane之间的间隙,也是fontSizeStyleComboBox与fontSizeComboBox之间的间隙,之前的默认值为VGAP_LARGE + */ + private int hGapBetweenLeftPaneAndRightPane = LayoutConstants.VGAP_LARGE; public FRFontPane() { this.initComponents(); } + public FRFontPane(int hGapBetweenLeftPaneAndRightPane) { + this.hGapBetweenLeftPaneAndRightPane = hGapBetweenLeftPaneAndRightPane; + this.initComponents(); + } + public static void main(String[] args) { JFrame jf = new JFrame("test"); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); @@ -345,7 +364,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse private JPanel createPane() { JPanel createPane = new JPanel(new BorderLayout()); createPane.add(fontNameComboBox, BorderLayout.NORTH); - JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{createLeftPane(), createRightPane()}}, TableLayoutHelper.FILL_LASTCOLUMN, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_LARGE); + JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{createLeftPane(), createRightPane()}}, TableLayoutHelper.FILL_LASTCOLUMN, hGapBetweenLeftPaneAndRightPane, LayoutConstants.VGAP_LARGE); jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); createPane.add(jPanel, BorderLayout.CENTER); return createPane; diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java index d4ebf74ee..1c30b1a55 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java @@ -1,6 +1,7 @@ package com.fr.design.widget.ui.designer; import com.fr.base.BaseUtils; +import com.fr.design.constants.LayoutConstants; import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; import com.fr.design.foldablepane.UIExpandablePane; @@ -58,7 +59,8 @@ public class LabelDefinePane extends AbstractDataModify