From dbf47dc902b9cec2c60a00e3dcb7c3555003dfdd Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 11 Nov 2020 17:34:55 +0800 Subject: [PATCH 01/27] =?UTF-8?q?REPORT-43280=20=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=8E=A7=E4=BB=B6=E9=80=89=E4=B8=8D=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/designer/beans/models/StateModel.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java index c5150baa56..5045e13875 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java @@ -301,12 +301,14 @@ public class StateModel { Rectangle bounds = createCurrentBounds(x, y); // 有参数面板时 要考虑下参数面板的高度影响 - int yOffset = 0; - XLayoutContainer paramComponent = designer.getParaComponent(); - if (paramComponent != null) { - yOffset = paramComponent.getHeight(); + if (!designer.isFormParaDesigner()) { + int yOffset = 0; + XLayoutContainer paramComponent = designer.getParaComponent(); + if (paramComponent != null) { + yOffset = paramComponent.getHeight(); + } + bounds.y = Math.max(bounds.y - yOffset, 0); } - bounds.y = Math.max(bounds.y - yOffset, 0); if ((x != currentX) || (y != currentY)) { ArrayList creators = getHotspotCreators(bounds, designer.getRootComponent()); From 56f45d13b066d528cde6d0c3fedb52bd230b58e1 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 13 Nov 2020 10:20:37 +0800 Subject: [PATCH 02/27] =?UTF-8?q?REPORT-32205=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=A4=9A=E5=B1=8F=E4=BD=BF=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/utils/gui/GUICoreUtils.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java b/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java index 9f5c7fbaa9..e6b276437a 100644 --- a/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java @@ -298,7 +298,11 @@ public final class GUICoreUtils { * @param win the current window august:现在要考虑左边日志模板的影响 */ public static void centerWindow(Window win) { - Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + // Toolkit.getDefaultToolkit().getScreenSize()在有多个显示器也只能获取到主屏的大小 + // getGraphicsConfiguration().getBounds()能获取多个屏时 设计器主体界面所在屏的大小和对应的坐标 + Rectangle rectangle = win.getGraphicsConfiguration().getBounds(); + + Dimension screenSize = rectangle.getSize(); Dimension winSize = win.getSize(); @@ -308,7 +312,7 @@ public final class GUICoreUtils { if (winSize.width > screenSize.width) { winSize.width = screenSize.width; } - win.setLocation((screenSize.width - winSize.width) / 2, (screenSize.height - winSize.height) / 2 - WINDOW_GAP); + win.setLocation(rectangle.x + (screenSize.width - winSize.width) / 2, rectangle.y + (screenSize.height - winSize.height) / 2 - WINDOW_GAP); } /** From 4943a82057fd8a67a06bd14e377a012217f97142 Mon Sep 17 00:00:00 2001 From: vito Date: Fri, 13 Nov 2020 11:52:56 +0800 Subject: [PATCH 03/27] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20bugfix?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95=E6=89=93=E5=8C=85=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3580cbae0d..617b9d0fa8 100644 --- a/build.gradle +++ b/build.gradle @@ -72,7 +72,9 @@ allprojects { implementation 'com.fr.datasource:fine-datasource:' + frVersion implementation 'com.fr.decision:fine-decision:' + frVersion implementation 'com.fr.schedule:fine-schedule:' + frVersion - implementation 'com.fr.report:fine-report-engine:' + frDevVersion + implementation 'com.fr.report:engine-report:' + frDevVersion + implementation 'com.fr.report:engine-chart:' + frDevVersion + implementation 'com.fr.report:engine-i18n:' + frDevVersion implementation 'com.fr.design:design-i18n:' + frDevVersion testImplementation 'org.easymock:easymock:3.5.1' testImplementation 'org.powermock:powermock-module-junit4:1.7.1' From bddf7c69e8a8507695ec4c71dfb390fdfdfe4cd3 Mon Sep 17 00:00:00 2001 From: pengda Date: Thu, 19 Nov 2020 16:10:55 +0800 Subject: [PATCH 04/27] =?UTF-8?q?REPORT-42734=20&&=20REPORT-42730=20?= =?UTF-8?q?=E8=81=9A=E5=90=88=E6=8A=A5=E8=A1=A8block=E5=9D=97=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/poly/PolyBlockProperPane.java | 4 +++ .../com/fr/poly/PolyBlockProperTable.java | 29 ++++++++++++++++++- .../main/java/com/fr/poly/PolyDesigner.java | 3 ++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/poly/PolyBlockProperPane.java b/designer-realize/src/main/java/com/fr/poly/PolyBlockProperPane.java index f6803a90f9..316e86c28a 100644 --- a/designer-realize/src/main/java/com/fr/poly/PolyBlockProperPane.java +++ b/designer-realize/src/main/java/com/fr/poly/PolyBlockProperPane.java @@ -40,6 +40,10 @@ public class PolyBlockProperPane extends DockingView { polyBlockProperTable.populate(designer); } + public void update(){ + polyBlockProperTable.update(); + } + @Override public String getViewTitle() { return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Property_Table"); diff --git a/designer-realize/src/main/java/com/fr/poly/PolyBlockProperTable.java b/designer-realize/src/main/java/com/fr/poly/PolyBlockProperTable.java index 452b4d7f6e..6ffcb004fe 100644 --- a/designer-realize/src/main/java/com/fr/poly/PolyBlockProperTable.java +++ b/designer-realize/src/main/java/com/fr/poly/PolyBlockProperTable.java @@ -4,9 +4,12 @@ import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ispinner.UISpinner; +import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.widget.BasicPropertyPane; import com.fr.design.widget.WidgetBoundsPaneFactory; +import com.fr.general.ComparatorUtils; +import com.fr.general.IOUtils; import com.fr.poly.group.PolyBoundsGroup; import com.fr.report.poly.TemplateBlock; @@ -104,7 +107,12 @@ public class PolyBlockProperTable extends JPanel { if (isPopulating || block == null) { return; } - block.setBlockName(blockPropertyPane.getWidgetNameField().getText()); + if (blockPropertyPane.getWidgetNameField() != null) { + String toSetWidgetName = blockPropertyPane.getWidgetNameField().getText(); + if (isBlockNameValid(toSetWidgetName, block.getBlockName())) { + block.setBlockName(toSetWidgetName); + } + } PolyBoundsGroup boundsgroup = new PolyBoundsGroup(block, designer.getTarget()); boundsgroup.setValue(x.getValue(), 0, 1); boundsgroup.setValue(y.getValue(), 1, 1); @@ -112,4 +120,23 @@ public class PolyBlockProperTable extends JPanel { boundsgroup.setValue(height.getValue(), 3, 1); firePropertyEdit(); } + + /** + *校验一下要设置的名称,不能为空,不能重名 + * + */ + private boolean isBlockNameValid(String toSetWidgetName, String currentWidgetName) { + if (toSetWidgetName == null || toSetWidgetName.isEmpty()) { + blockPropertyPane.getWidgetNameField().setText(currentWidgetName); + return false; + } + for (int i = 0; i < this.designer.getTarget().getBlockCount(); i++) { + if (!ComparatorUtils.equals(currentWidgetName, toSetWidgetName) && ComparatorUtils.equals(toSetWidgetName, this.designer.getTarget().getBlock(i).getBlockName())) { + blockPropertyPane.getWidgetNameField().setText(currentWidgetName); + JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Rename_Failure"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Joption_News"), JOptionPane.ERROR_MESSAGE, IOUtils.readIcon("com/fr/design/form/images/joption_failure.png")); + return false; + } + } + return true; + } } diff --git a/designer-realize/src/main/java/com/fr/poly/PolyDesigner.java b/designer-realize/src/main/java/com/fr/poly/PolyDesigner.java index 99d9b77b47..437cb8ea12 100644 --- a/designer-realize/src/main/java/com/fr/poly/PolyDesigner.java +++ b/designer-realize/src/main/java/com/fr/poly/PolyDesigner.java @@ -623,6 +623,9 @@ public class PolyDesigner extends ReportComponent Date: Fri, 20 Nov 2020 09:18:13 +0800 Subject: [PATCH 05/27] =?UTF-8?q?REPORT-42734=20&&=20REPORT-42730=20?= =?UTF-8?q?=E8=81=9A=E5=90=88=E6=8A=A5=E8=A1=A8block=E5=9D=97=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/poly/PolyBlockProperTable.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/poly/PolyBlockProperTable.java b/designer-realize/src/main/java/com/fr/poly/PolyBlockProperTable.java index 6ffcb004fe..cd98e66225 100644 --- a/designer-realize/src/main/java/com/fr/poly/PolyBlockProperTable.java +++ b/designer-realize/src/main/java/com/fr/poly/PolyBlockProperTable.java @@ -1,5 +1,6 @@ package com.fr.poly; +import com.fr.design.dialog.FineJOptionPane; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; import com.fr.design.foldablepane.UIExpandablePane; @@ -12,9 +13,12 @@ import com.fr.general.ComparatorUtils; import com.fr.general.IOUtils; import com.fr.poly.group.PolyBoundsGroup; import com.fr.report.poly.TemplateBlock; +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Container; +import javax.swing.BorderFactory; +import javax.swing.JPanel; -import javax.swing.*; -import java.awt.*; public class PolyBlockProperTable extends JPanel { private PolyDesigner designer; @@ -133,7 +137,7 @@ public class PolyBlockProperTable extends JPanel { for (int i = 0; i < this.designer.getTarget().getBlockCount(); i++) { if (!ComparatorUtils.equals(currentWidgetName, toSetWidgetName) && ComparatorUtils.equals(toSetWidgetName, this.designer.getTarget().getBlock(i).getBlockName())) { blockPropertyPane.getWidgetNameField().setText(currentWidgetName); - JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Rename_Failure"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Joption_News"), JOptionPane.ERROR_MESSAGE, IOUtils.readIcon("com/fr/design/form/images/joption_failure.png")); + FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Rename_Failure"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Joption_News"), FineJOptionPane.ERROR_MESSAGE, IOUtils.readIcon("com/fr/design/form/images/joption_failure.png")); return false; } } From 82e54b8700a5b5973ea5f1e9366a7c39b11ce050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Fri, 20 Nov 2020 15:29:07 +0800 Subject: [PATCH 06/27] =?UTF-8?q?=09CHART-16939=20=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E6=A0=87=E7=AD=BE=E5=AE=BD=E9=AB=98=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/designer/component/VanChartTooltipContentPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 cc04d9c51c..b5f03a728a 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 @@ -270,7 +270,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Fri, 20 Nov 2020 17:02:10 +0800 Subject: [PATCH 07/27] =?UTF-8?q?MOBILE-27967=20=E3=80=90=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E3=80=91tab=E6=A0=B7=E5=BC=8F=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E8=AE=BE=E7=BD=AE=E4=BB=A5=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=9B=9E=E6=A0=87=E5=87=86=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=87=AA=E5=AE=9A=E4=B9=89=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=9C=AA=E4=BF=9D=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/MobileTemplateStyleDefinePane.java | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java index 6dc2da5e92..ae8cbeb3ad 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java @@ -44,6 +44,7 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane 标准 + if (custom.getSelectedIndex() == 0) { + customTempStyle = getCustomMobileTemplateStyle(); + } + // 标准 -> 自定义 + if (custom.getSelectedIndex() == 1 && customTempStyle != null) { + populateBean(customTempStyle); + } boolean isCustom = custom.getSelectedIndex() == 1; centerPane.setVisible(isCustom); updatePreviewPane(); @@ -182,8 +191,24 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane Date: Fri, 20 Nov 2020 17:13:38 +0800 Subject: [PATCH 08/27] =?UTF-8?q?REPORT-41512=20=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E8=BF=87=E7=A8=8B=E8=BF=94=E5=9B=9E=E5=A4=9A=E4=B8=AA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E5=9C=A8fr=E4=B8=AD=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E5=8F=AA=E8=83=BD=E8=BF=94=E5=9B=9E=E4=B8=80=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledatapane/ProcedureDataPane.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java index b138f4e58c..d0bc499a29 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java @@ -5,6 +5,7 @@ import com.fr.base.StoreProcedureParameter; import com.fr.data.core.db.TableProcedure; import com.fr.data.impl.Connection; import com.fr.data.impl.NameDatabaseConnection; +import com.fr.data.impl.storeproc.ProcedureDataModel; import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.data.operator.DataOperator; import com.fr.design.actions.UpdateAction; @@ -29,13 +30,19 @@ import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.ToolBarDef; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.file.ConnectionConfig; - -import com.fr.script.Calculator; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.Box; +import javax.swing.BoxLayout; +import javax.swing.JPanel; +import javax.swing.JSplitPane; +import javax.swing.JToolBar; +import javax.swing.SwingWorker; +import java.awt.BorderLayout; +import java.awt.CardLayout; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; @@ -273,7 +280,8 @@ public class ProcedureDataPane extends AbstractTableDataPane imp protected Void doInBackground() throws Exception { DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER); sp.setCalculating(true); - sp.creatDataModel(Calculator.createCalculator()); + ProcedureDataModel[] dataModels = DesignTableDataManager.createLazyDataModel(sp, false); + sp.refreshDataModelListAndResultNames(dataModels); return null; } From 8c462edfddfe614315ad84f4a450d42d8c34a0b9 Mon Sep 17 00:00:00 2001 From: Yvan Date: Mon, 23 Nov 2020 09:55:30 +0800 Subject: [PATCH 09/27] =?UTF-8?q?REPORT-43516=20=E3=80=90=E8=A7=86?= =?UTF-8?q?=E8=A7=89=E4=BC=98=E5=8C=96=E3=80=91=E9=A1=B5=E9=9D=A2=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=8E=E9=87=8D=E5=A4=8D=E4=B8=8E=E5=86=BB=E7=BB=93?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=9B=BE=E6=A0=87=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=AE=BE=E7=BD=AE=E5=92=8C=E9=87=8D=E5=A4=8D=E4=B8=8E?= =?UTF-8?q?=E5=86=BB=E7=BB=93=E8=AE=BE=E7=BD=AE=E7=9A=84=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E4=BA=86=20=E3=80=90=E6=94=B9=E5=8A=A8?= =?UTF-8?q?=E6=96=B9=E6=A1=88=E3=80=91=E6=9B=B4=E6=8D=A2=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E4=B8=8E=E5=86=BB=E7=BB=93=E8=AE=BE=E7=BD=AE=E7=9A=84=E5=9B=BE?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/images/m_file/repeatAndFrozen.png | Bin 0 -> 233 bytes .../actions/report/ReportPageAttrAction.java | 4 ++-- .../java/com/fr/start/preload/ImagePreLoader.java | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 designer-base/src/main/resources/com/fr/design/images/m_file/repeatAndFrozen.png diff --git a/designer-base/src/main/resources/com/fr/design/images/m_file/repeatAndFrozen.png b/designer-base/src/main/resources/com/fr/design/images/m_file/repeatAndFrozen.png new file mode 100644 index 0000000000000000000000000000000000000000..adc5428a7dc046443c015e18c5df47ceb2b0dc33 GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6-FJY5_^ zECkmEIr23q@Gw7SuIcKm`2O-<>yhO@n3qfv+O(tj0bgEn_U^`GC9_!TB4ctMavrq* zp~lq3r+dnD+3W-rY4@amC%reExqsruCU3NAjA3+`clC%?V~A56bEH1Y hrW12kvHW?L-}llnWZHV6$w0R Date: Mon, 23 Nov 2020 14:44:11 +0800 Subject: [PATCH 10/27] =?UTF-8?q?=20REPORT-43754=20=E3=80=90=E4=BA=8C?= =?UTF-8?q?=E8=BD=AE=E5=86=92=E7=83=9F=E3=80=91=E8=BF=9C=E7=A8=8B=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E7=9B=AE=E5=BD=95=E9=87=8D=E5=A4=8D=E7=9A=84=E5=90=8D?= =?UTF-8?q?=E5=AD=97=E4=B8=8D=E4=BC=9A=E6=8F=90=E9=86=92=20=E3=80=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E5=9C=A8Listener?= =?UTF-8?q?=E4=B8=AD=E5=88=A4=E6=96=AD=E9=87=8D=E5=A4=8D=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E6=9C=89=E7=82=B9=E9=97=AE=E9=A2=98=EF=BC=8C=E5=AE=83?= =?UTF-8?q?=E4=BC=9A=E6=8A=8A=E7=94=A8=E6=88=B7=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E6=9F=90=E4=B8=80=E9=A1=B9=E5=90=8D=E5=AD=97=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=9A=84=E5=8F=A6=E4=B8=80=E9=A1=B9=E7=9A=84?= =?UTF-8?q?=E5=90=8D=E5=AD=97=E7=BD=AE=E4=B8=BA=E7=A9=BA=EF=BC=8C=E7=84=B6?= =?UTF-8?q?=E5=90=8E=E5=86=8D=E9=81=8D=E5=8E=86allListNames=EF=BC=8C?= =?UTF-8?q?=E7=9C=8B=E6=98=AF=E5=90=A6=E6=9C=89=E9=87=8D=E5=A4=8D=E7=9A=84?= =?UTF-8?q?=E5=90=8D=E5=AD=97=EF=BC=8C=E4=BE=8B=E5=A6=82=EF=BC=8Caa?= =?UTF-8?q?=E3=80=81bb=E3=80=81cc=E7=9A=84=E5=88=97=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E7=94=A8=E6=88=B7=E5=B0=86aa=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BAbb=EF=BC=8C=E7=84=B6=E5=90=8E=E7=82=B9=E5=87=BBbb?= =?UTF-8?q?=EF=BC=8C=E8=BF=99=E6=97=B6=E5=80=99bb=E8=A2=AB=E7=BD=AE?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=EF=BC=8C=E5=86=8D=E5=B0=86aa=E3=80=81""?= =?UTF-8?q?=E3=80=81cc=E4=B8=8Ebb=E6=AF=94=E8=BE=83=EF=BC=8C=E5=8F=91?= =?UTF-8?q?=E7=8E=B0=E6=B2=A1=E6=9C=89=E9=87=8D=E5=A4=8D=EF=BC=8C=E5=8D=B3?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E6=98=BE=E7=A4=BA=E5=91=BD=E5=90=8D=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=BC=B9=E7=AA=97=20=E3=80=90=E6=94=B9=E5=8A=A8?= =?UTF-8?q?=E6=96=B9=E6=A1=88=E3=80=91=E6=8A=8A=E9=87=8D=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E5=90=8E=EF=BC=8CallListNames=E4=B8=AD=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E9=A1=B9=E7=9A=84=E5=90=8D=E5=AD=97=E7=BD=AE=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=EF=BC=8C=E9=87=8D=E5=91=BD=E5=90=8D=E5=90=8E=EF=BC=8CallListNa?= =?UTF-8?q?mes=E4=B8=AD=E9=87=8D=E5=91=BD=E5=90=8D=E9=A1=B9=E7=9A=84?= =?UTF-8?q?=E5=90=8D=E5=AD=97=E7=BD=AE=E4=B8=BA=E7=A9=BA=E3=80=82=E5=8D=B3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9aa=E4=B8=BAbb=E5=90=8E=EF=BC=8C=E5=B0=86bb?= =?UTF-8?q?=E4=B8=8E""=E3=80=81bb=E3=80=81cc=E6=AF=94=E8=BE=83=EF=BC=8C?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=9C=89=E9=87=8D=E5=A4=8D=EF=BC=8C=E7=84=B6?= =?UTF-8?q?=E5=90=8E=E7=BB=99=E5=87=BA=E5=91=BD=E5=90=8D=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/main/java/com/fr/env/EnvListPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/env/EnvListPane.java b/designer-base/src/main/java/com/fr/env/EnvListPane.java index 2d875cb458..454388e124 100644 --- a/designer-base/src/main/java/com/fr/env/EnvListPane.java +++ b/designer-base/src/main/java/com/fr/env/EnvListPane.java @@ -34,7 +34,7 @@ public class EnvListPane extends JListControlPane { public void propertyChange() { String tempName = getEditingName(); String[] allListNames = nameableList.getAllNames(); - allListNames[nameableList.getSelectedIndex()] = StringUtils.EMPTY; + allListNames[editingIndex] = StringUtils.EMPTY; if (StringUtils.isEmpty(tempName)) { nameableList.stopEditing(); FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(EnvListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Workspace_Empty_Name_Warn_Text")); From 23f9133c0b0baf4400749d13095879684d5a1562 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 23 Nov 2020 15:50:51 +0800 Subject: [PATCH 11/27] =?UTF-8?q?REPORT-43905=20=E9=87=8D=E8=AF=95?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E8=BE=93=E5=87=BA=E6=94=B9=E6=88=90warn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/socketio/DesignerSocketIO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java index 2316a19a38..33b3b80f7d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java @@ -131,7 +131,7 @@ public class DesignerSocketIO { private static final Emitter.Listener failRetry = new Emitter.Listener() { @Override public void call(Object... args) { - FineLoggerFactory.getLogger().error("failed args: {}", Arrays.toString(args)); + FineLoggerFactory.getLogger().warn("failed args: {}", Arrays.toString(args)); status = Status.Disconnecting; socket.close(); count++; From 56ea11266305a9927c386b34d3e273d4096989b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Fri, 20 Nov 2020 15:29:07 +0800 Subject: [PATCH 12/27] =?UTF-8?q?=09CHART-16939=20=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E6=A0=87=E7=AD=BE=E5=AE=BD=E9=AB=98=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/designer/component/VanChartTooltipContentPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 cc04d9c51c..b5f03a728a 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 @@ -270,7 +270,7 @@ public class VanChartTooltipContentPane extends BasicBeanPane Date: Mon, 23 Nov 2020 19:03:48 +0800 Subject: [PATCH 13/27] =?UTF-8?q?CHART-16853=20=E5=A4=84=E7=90=86=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartRichEditorPane.java | 13 ++ .../com/fr/design/editor/rich_editor.html | 19 +-- .../com/fr/design/editor/script/editor.js | 2 +- .../fr/design/editor/script/editor.model.js | 6 +- .../com/fr/design/editor/script/enums.js | 15 +++ .../com/fr/design/editor/script/i18n.js | 123 ++++++++++++++++++ 6 files changed, 157 insertions(+), 21 deletions(-) create mode 100644 designer-chart/src/main/resources/com/fr/design/editor/script/enums.js create mode 100644 designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java index 1ccc146c1f..4d5509c88c 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java @@ -1,7 +1,9 @@ package com.fr.van.chart.designer.component; import com.fr.concurrent.NamedThreadFactory; +import com.fr.design.DesignerEnvManager; import com.fr.design.ui.ModernUIPane; +import com.fr.general.IOUtils; import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.base.AttrTooltipRichText; import com.fr.plugin.chart.type.TextAlign; @@ -63,6 +65,11 @@ public class VanChartRichEditorPane { browser = event.getBrowser(); browser.getCacheStorage().clearCache(); + browser.executeJavaScript(IOUtils.readResourceAsString("/com/fr/web/ui/fineui.min.js")); + browser.executeJavaScript(IOUtils.readResourceAsString("/com/fr/design/editor/script/i18n.js")); + browser.executeJavaScript(generateTransformI18nJS()); + browser.executeJavaScript(IOUtils.readResourceAsString("/com/fr/web/ui/materials.min.js")); + JSValue ns = browser.executeJavaScriptAndReturnValue("window." + namespace); ns.asObject().setProperty(variable, model); } @@ -110,6 +117,12 @@ public class VanChartRichEditorPane { return new RichEditorModel(content, richText.isAuto(), paramsStr.toString(), initParams, align); } + public static String generateTransformI18nJS() { + String language = DesignerEnvManager.getEnvManager().getLanguage().toString(); + + return "!(function () { window.transformI18n && window.transformI18n('" + language + "' || 'zh_CN'); }());"; + } + public static class RichEditorModel { private String content = StringUtils.EMPTY; private boolean auto = true; diff --git a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html index 07fbb3ec72..e6c769f0a3 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html +++ b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html @@ -5,26 +5,9 @@ - - - + 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 bb5370e4fc..f3e0536797 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 @@ -52,7 +52,7 @@ type: "bi.htape", items: [{ type: "bi.label", - text: "字体样式: ", + text: BI.i18nText("BI-Design_Font_Style") + ": ", textAlign: "left", width: 70 }, { diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.model.js b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.model.js index f430fea6c5..c901fd31ea 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.model.js +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.model.js @@ -17,8 +17,9 @@ fontStyleItems: function () { return [{ type: "bi.single_select_radio_item", - text: "自动", + text: BI.i18nText("BI-Basic_Auto"), hgap: 5, + width: 50, logic: { dynamic: true }, @@ -26,8 +27,9 @@ selected: this.options.isAuto }, { type: "bi.single_select_radio_item", - text: "自定义", + text: BI.i18nText("BI-Basic_Custom"), hgap: 5, + width: 60, logic: { dynamic: true }, diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/enums.js b/designer-chart/src/main/resources/com/fr/design/editor/script/enums.js new file mode 100644 index 0000000000..461625ebc5 --- /dev/null +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/enums.js @@ -0,0 +1,15 @@ +window.BICst = window.BICst || {}; +BICst.RICH_TEXT_INFO = { + DATA_ID: "data-id", + DATA_NAME: "data-name", + DATA_FULL_NAME: "data-full-name", + DATA_ORIGIN_ID: "data-origin-id", + DATA_ORIGIN_NAME: "data-origin-name", + DATA_ORIGIN_FULL_NAME: "data-origin-full-name", + DATA_IS_INSERT_PARAM: "data-is-insert-param", + DATA_IS_MISSING_FIELD: "data-is-missing-field", + DATA_UN_VALID: "data-unvalid", + NAME: "name", + ALT: "alt", + SRC: "src" +}; \ No newline at end of file diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js b/designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js new file mode 100644 index 0000000000..95b4585c94 --- /dev/null +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js @@ -0,0 +1,123 @@ +!(function () { + + var chinese = { + "BI-Design_Font_Style": "字体样式", + "BI-Font_Size": "字号", + "BI-Basic_Auto": "自动", + "BI-Basic_Custom": "自定义", + "BI-Basic_Default": "默认", + "BI-Basic_Sim_Hei": "黑体", + "BI-Basic_Sim_Sun": "宋体", + "BI-Basic_Fang_Song": "仿宋", + "BI-Basic_Kai_Ti": "楷体", + "BI-Basic_Bold": "加粗", + "BI-Basic_Italic": "斜体", + "BI-Basic_Underline": "下划线", + "BI-Basic_Font_Color": "文字颜色", + "BI-Word_Align_Left": "文字居左", + "BI-Word_Align_Center": "文字居中", + "BI-Word_Align_Right": "文字居右" + }; + + var taiwan = { + "BI-Design_Font_Style": "字體樣式", + "BI-Font_Size": "字號", + "BI-Basic_Auto": "自動", + "BI-Basic_Custom": "自定義", + "BI-Basic_Default": "默認", + "BI-Basic_Sim_Hei": "黑體", + "BI-Basic_Sim_Sun": "宋體", + "BI-Basic_Fang_Song": "仿宋", + "BI-Basic_Kai_Ti": "楷體", + "BI-Basic_Bold": "加粗", + "BI-Basic_Italic": "斜體", + "BI-Basic_Underline": "下劃線", + "BI-Basic_Font_Color": "文字顏色", + "BI-Word_Align_Left": "文字居左", + "BI-Word_Align_Center": "文字居中", + "BI-Word_Align_Right": "文字居右" + }; + + var english = { + "BI-Design_Font_Style": "Font style", + "BI-Font_Size": "Font size", + "BI-Basic_Auto": "auto", + "BI-Basic_Custom": "custom", + "BI-Basic_Default": "default", + "BI-Basic_Sim_Hei": "Sim_Hei", + "BI-Basic_Sim_Sun": "Sim_Sun", + "BI-Basic_Fang_Song": "Fang_Song", + "BI-Basic_Kai_Ti": "Kai_Ti", + "BI-Basic_Bold": "Bold", + "BI-Basic_Italic": "Italic", + "BI-Basic_Underline": "UnderLine", + "BI-Basic_Font_Color": "Font Color", + "BI-Word_Align_Left": "Align Left", + "BI-Word_Align_Center": "Align Center", + "BI-Word_Align_Right": "Align Right" + }; + + var japanese = { + "BI-Design_Font_Style": "フォントスタイル", + "BI-Font_Size": "フォントサイズ", + "BI-Basic_Auto": "自動", + "BI-Basic_Custom": "カスタマイズ", + "BI-Basic_Default": "デフォルト", + "BI-Basic_Sim_Hei": "黒い体", + "BI-Basic_Sim_Sun": "ソンティ", + "BI-Basic_Fang_Song": "イミテーションソング", + "BI-Basic_Kai_Ti": "イタリック", + "BI-Basic_Bold": "大胆な", + "BI-Basic_Italic": "イタリック", + "BI-Basic_Underline": "アンダースコア", + "BI-Basic_Font_Color": "テキストの色", + "BI-Word_Align_Left": "左のテキスト", + "BI-Word_Align_Center": "テキスト中心", + "BI-Word_Align_Right": "右のテキスト" + }; + + var korean = { + "BI-Design_Font_Style": "글꼴 스타일", + "BI-Font_Size": "글꼴 크기", + "BI-Basic_Auto": "자동적 인", + "BI-Basic_Custom": "맞춤 설정", + "BI-Basic_Default": "기본", + "BI-Basic_Sim_Hei": "블랙 바디", + "BI-Basic_Sim_Sun": "송티", + "BI-Basic_Fang_Song": "모조 노래", + "BI-Basic_Kai_Ti": "기울임 꼴", + "BI-Basic_Bold": "굵게", + "BI-Basic_Italic": "이탤릭체", + "BI-Basic_Underline": "밑줄", + "BI-Basic_Font_Color": "텍스트 색상", + "BI-Word_Align_Left": "왼쪽 텍스트", + "BI-Word_Align_Center": "텍스트 중심", + "BI-Word_Align_Right": "오른쪽 텍스트" + }; + + function transformI18n(language) { + var BI = window.BI; + + if (BI == null) { + return; + } + + if (language == null) { + BI.addI18n(chinese); + } + + if (language.indexOf('zh_TW') > -1) { + BI.addI18n(taiwan); + } else if (language.indexOf('en_US') > -1) { + BI.addI18n(english); + } else if (language.indexOf('ja_JP') > -1) { + BI.addI18n(japanese); + } else if (language.indexOf('ko_KR') > -1) { + BI.addI18n(korean); + } else { + BI.addI18n(chinese); + } + } + + window.transformI18n = transformI18n; +}()); \ No newline at end of file From 38e53e5163b4fd5303058a60324974d03650ca4c Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Mon, 23 Nov 2020 19:15:39 +0800 Subject: [PATCH 14/27] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A9=BA=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/designer/component/VanChartRichEditorPane.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java index 4d5509c88c..6f308ad431 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java @@ -13,6 +13,7 @@ import com.teamdev.jxbrowser.chromium.JSValue; import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent; +import java.util.Locale; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -118,7 +119,13 @@ public class VanChartRichEditorPane { } public static String generateTransformI18nJS() { - String language = DesignerEnvManager.getEnvManager().getLanguage().toString(); + String language = "zh_CN"; + + Locale locale = DesignerEnvManager.getEnvManager().getLanguage(); + + if (locale != null) { + language = locale.toString(); + } return "!(function () { window.transformI18n && window.transformI18n('" + language + "' || 'zh_CN'); }());"; } From 67bc9edf4f696df78271488611b86684aec2ffd2 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Mon, 23 Nov 2020 19:03:48 +0800 Subject: [PATCH 15/27] =?UTF-8?q?CHART-16853=20=E5=A4=84=E7=90=86=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartRichEditorPane.java | 56 +++++++- .../com/fr/design/editor/rich_editor.html | 19 +-- .../com/fr/design/editor/script/editor.js | 2 +- .../fr/design/editor/script/editor.model.js | 6 +- .../com/fr/design/editor/script/enums.js | 15 +++ .../com/fr/design/editor/script/i18n.js | 123 ++++++++++++++++++ 6 files changed, 195 insertions(+), 26 deletions(-) create mode 100644 designer-chart/src/main/resources/com/fr/design/editor/script/enums.js create mode 100644 designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java index 622d2a0ee0..6f308ad431 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java @@ -1,6 +1,10 @@ package com.fr.van.chart.designer.component; +import com.fr.concurrent.NamedThreadFactory; +import com.fr.design.DesignerEnvManager; import com.fr.design.ui.ModernUIPane; +import com.fr.general.IOUtils; +import com.fr.log.FineLoggerFactory; import com.fr.plugin.chart.base.AttrTooltipRichText; import com.fr.plugin.chart.type.TextAlign; import com.fr.stable.StringUtils; @@ -9,7 +13,10 @@ import com.teamdev.jxbrowser.chromium.JSValue; import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent; +import java.util.Locale; import java.util.Map; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; public class VanChartRichEditorPane { @@ -21,6 +28,25 @@ public class VanChartRichEditorPane { private static ModernUIPane richEditorPane; private static Browser browser; + public static void initRichEditorPane() { + ExecutorService singleThreadExecutor = Executors.newSingleThreadExecutor(new NamedThreadFactory("VanChartRichEditor")); + + try { + singleThreadExecutor.submit(new Runnable() { + @Override + public void run() { + try { + richEditorPane = initPane(new RichEditorModel()); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + } + }); + } finally { + singleThreadExecutor.shutdown(); + } + } + public static ModernUIPane createRichEditorPane(AttrTooltipRichText richEditor) { RichEditorModel model = getRichEditorModel(richEditor); @@ -40,6 +66,11 @@ public class VanChartRichEditorPane { browser = event.getBrowser(); browser.getCacheStorage().clearCache(); + browser.executeJavaScript(IOUtils.readResourceAsString("/com/fr/web/ui/fineui.min.js")); + browser.executeJavaScript(IOUtils.readResourceAsString("/com/fr/design/editor/script/i18n.js")); + browser.executeJavaScript(generateTransformI18nJS()); + browser.executeJavaScript(IOUtils.readResourceAsString("/com/fr/web/ui/materials.min.js")); + JSValue ns = browser.executeJavaScriptAndReturnValue("window." + namespace); ns.asObject().setProperty(variable, model); } @@ -87,12 +118,27 @@ public class VanChartRichEditorPane { return new RichEditorModel(content, richText.isAuto(), paramsStr.toString(), initParams, align); } + public static String generateTransformI18nJS() { + String language = "zh_CN"; + + Locale locale = DesignerEnvManager.getEnvManager().getLanguage(); + + if (locale != null) { + language = locale.toString(); + } + + return "!(function () { window.transformI18n && window.transformI18n('" + language + "' || 'zh_CN'); }());"; + } + public static class RichEditorModel { - private String content; - private boolean auto; - private String params; - private String initParams; - private String align; + private String content = StringUtils.EMPTY; + private boolean auto = true; + private String params = StringUtils.EMPTY; + private String initParams = StringUtils.EMPTY; + private String align = TextAlign.LEFT.getAlign(); + + public RichEditorModel() { + } public RichEditorModel(String content, boolean auto, String params, String initParams, String align) { this.content = content; diff --git a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html index 07fbb3ec72..e6c769f0a3 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html +++ b/designer-chart/src/main/resources/com/fr/design/editor/rich_editor.html @@ -5,26 +5,9 @@ - - - + 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 bb5370e4fc..f3e0536797 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 @@ -52,7 +52,7 @@ type: "bi.htape", items: [{ type: "bi.label", - text: "字体样式: ", + text: BI.i18nText("BI-Design_Font_Style") + ": ", textAlign: "left", width: 70 }, { diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.model.js b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.model.js index f430fea6c5..c901fd31ea 100644 --- a/designer-chart/src/main/resources/com/fr/design/editor/script/editor.model.js +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/editor.model.js @@ -17,8 +17,9 @@ fontStyleItems: function () { return [{ type: "bi.single_select_radio_item", - text: "自动", + text: BI.i18nText("BI-Basic_Auto"), hgap: 5, + width: 50, logic: { dynamic: true }, @@ -26,8 +27,9 @@ selected: this.options.isAuto }, { type: "bi.single_select_radio_item", - text: "自定义", + text: BI.i18nText("BI-Basic_Custom"), hgap: 5, + width: 60, logic: { dynamic: true }, diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/enums.js b/designer-chart/src/main/resources/com/fr/design/editor/script/enums.js new file mode 100644 index 0000000000..461625ebc5 --- /dev/null +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/enums.js @@ -0,0 +1,15 @@ +window.BICst = window.BICst || {}; +BICst.RICH_TEXT_INFO = { + DATA_ID: "data-id", + DATA_NAME: "data-name", + DATA_FULL_NAME: "data-full-name", + DATA_ORIGIN_ID: "data-origin-id", + DATA_ORIGIN_NAME: "data-origin-name", + DATA_ORIGIN_FULL_NAME: "data-origin-full-name", + DATA_IS_INSERT_PARAM: "data-is-insert-param", + DATA_IS_MISSING_FIELD: "data-is-missing-field", + DATA_UN_VALID: "data-unvalid", + NAME: "name", + ALT: "alt", + SRC: "src" +}; \ No newline at end of file diff --git a/designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js b/designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js new file mode 100644 index 0000000000..95b4585c94 --- /dev/null +++ b/designer-chart/src/main/resources/com/fr/design/editor/script/i18n.js @@ -0,0 +1,123 @@ +!(function () { + + var chinese = { + "BI-Design_Font_Style": "字体样式", + "BI-Font_Size": "字号", + "BI-Basic_Auto": "自动", + "BI-Basic_Custom": "自定义", + "BI-Basic_Default": "默认", + "BI-Basic_Sim_Hei": "黑体", + "BI-Basic_Sim_Sun": "宋体", + "BI-Basic_Fang_Song": "仿宋", + "BI-Basic_Kai_Ti": "楷体", + "BI-Basic_Bold": "加粗", + "BI-Basic_Italic": "斜体", + "BI-Basic_Underline": "下划线", + "BI-Basic_Font_Color": "文字颜色", + "BI-Word_Align_Left": "文字居左", + "BI-Word_Align_Center": "文字居中", + "BI-Word_Align_Right": "文字居右" + }; + + var taiwan = { + "BI-Design_Font_Style": "字體樣式", + "BI-Font_Size": "字號", + "BI-Basic_Auto": "自動", + "BI-Basic_Custom": "自定義", + "BI-Basic_Default": "默認", + "BI-Basic_Sim_Hei": "黑體", + "BI-Basic_Sim_Sun": "宋體", + "BI-Basic_Fang_Song": "仿宋", + "BI-Basic_Kai_Ti": "楷體", + "BI-Basic_Bold": "加粗", + "BI-Basic_Italic": "斜體", + "BI-Basic_Underline": "下劃線", + "BI-Basic_Font_Color": "文字顏色", + "BI-Word_Align_Left": "文字居左", + "BI-Word_Align_Center": "文字居中", + "BI-Word_Align_Right": "文字居右" + }; + + var english = { + "BI-Design_Font_Style": "Font style", + "BI-Font_Size": "Font size", + "BI-Basic_Auto": "auto", + "BI-Basic_Custom": "custom", + "BI-Basic_Default": "default", + "BI-Basic_Sim_Hei": "Sim_Hei", + "BI-Basic_Sim_Sun": "Sim_Sun", + "BI-Basic_Fang_Song": "Fang_Song", + "BI-Basic_Kai_Ti": "Kai_Ti", + "BI-Basic_Bold": "Bold", + "BI-Basic_Italic": "Italic", + "BI-Basic_Underline": "UnderLine", + "BI-Basic_Font_Color": "Font Color", + "BI-Word_Align_Left": "Align Left", + "BI-Word_Align_Center": "Align Center", + "BI-Word_Align_Right": "Align Right" + }; + + var japanese = { + "BI-Design_Font_Style": "フォントスタイル", + "BI-Font_Size": "フォントサイズ", + "BI-Basic_Auto": "自動", + "BI-Basic_Custom": "カスタマイズ", + "BI-Basic_Default": "デフォルト", + "BI-Basic_Sim_Hei": "黒い体", + "BI-Basic_Sim_Sun": "ソンティ", + "BI-Basic_Fang_Song": "イミテーションソング", + "BI-Basic_Kai_Ti": "イタリック", + "BI-Basic_Bold": "大胆な", + "BI-Basic_Italic": "イタリック", + "BI-Basic_Underline": "アンダースコア", + "BI-Basic_Font_Color": "テキストの色", + "BI-Word_Align_Left": "左のテキスト", + "BI-Word_Align_Center": "テキスト中心", + "BI-Word_Align_Right": "右のテキスト" + }; + + var korean = { + "BI-Design_Font_Style": "글꼴 스타일", + "BI-Font_Size": "글꼴 크기", + "BI-Basic_Auto": "자동적 인", + "BI-Basic_Custom": "맞춤 설정", + "BI-Basic_Default": "기본", + "BI-Basic_Sim_Hei": "블랙 바디", + "BI-Basic_Sim_Sun": "송티", + "BI-Basic_Fang_Song": "모조 노래", + "BI-Basic_Kai_Ti": "기울임 꼴", + "BI-Basic_Bold": "굵게", + "BI-Basic_Italic": "이탤릭체", + "BI-Basic_Underline": "밑줄", + "BI-Basic_Font_Color": "텍스트 색상", + "BI-Word_Align_Left": "왼쪽 텍스트", + "BI-Word_Align_Center": "텍스트 중심", + "BI-Word_Align_Right": "오른쪽 텍스트" + }; + + function transformI18n(language) { + var BI = window.BI; + + if (BI == null) { + return; + } + + if (language == null) { + BI.addI18n(chinese); + } + + if (language.indexOf('zh_TW') > -1) { + BI.addI18n(taiwan); + } else if (language.indexOf('en_US') > -1) { + BI.addI18n(english); + } else if (language.indexOf('ja_JP') > -1) { + BI.addI18n(japanese); + } else if (language.indexOf('ko_KR') > -1) { + BI.addI18n(korean); + } else { + BI.addI18n(chinese); + } + } + + window.transformI18n = transformI18n; +}()); \ No newline at end of file From 40663f225c826dd4504ba4ab765f8eb37fc428b0 Mon Sep 17 00:00:00 2001 From: Yvan Date: Tue, 24 Nov 2020 09:50:05 +0800 Subject: [PATCH 16/27] =?UTF-8?q?KERNEL-6188=20DatabaseConnectionPane?= =?UTF-8?q?=E4=B8=AD=E7=9A=84SwingWorker=E9=97=AE=E9=A2=98=20=E3=80=90?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E5=9C=A8Swingwork?= =?UTF-8?q?er=E7=9A=84doInBackground=E4=B8=AD=E6=9B=B4=E6=96=B0UI=E4=BC=9A?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=87=BA=E7=8E=B0=E5=8D=A1=E6=AD=BB=E7=AD=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=96=B9?= =?UTF-8?q?=E6=A1=88=E3=80=91=E5=B0=86doInBackground=E4=B8=AD=E4=B8=8EUI?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E7=9A=84=E9=83=A8=E5=88=86=E7=A7=BB=E5=88=B0?= =?UTF-8?q?done=E6=96=B9=E6=B3=95=E4=B8=AD=EF=BC=8C=E5=9C=A8EDT=E7=BA=BF?= =?UTF-8?q?=E7=A8=8B=E5=A4=84=E7=90=86UI=EF=BC=8C=E6=AF=94=E8=BE=83?= =?UTF-8?q?=E5=AE=89=E5=85=A8=EF=BC=9B=E5=8F=A6=E5=A4=96=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BA=86dialog.show()=E8=BF=87=E6=97=B6=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=92=8C=E4=B8=80=E4=BA=9B=E5=AF=BC=E5=8C=85=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../connect/DatabaseConnectionPane.java | 68 +++++++++++++------ 1 file changed, 49 insertions(+), 19 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java index fc666f15fd..3ef5aa8f85 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java @@ -3,6 +3,7 @@ */ package com.fr.design.data.datapane.connect; +import com.fr.data.impl.Connection; import com.fr.data.impl.JDBCDatabaseConnection; import com.fr.data.impl.JNDIDatabaseConnection; import com.fr.data.operator.DataOperator; @@ -10,6 +11,7 @@ import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.scrollruler.ModLineBorder; import com.fr.design.utils.gui.GUICoreUtils; @@ -19,12 +21,24 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.StringUtils; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.BoxLayout; +import javax.swing.JDialog; +import javax.swing.JPanel; +import javax.swing.SwingUtilities; +import javax.swing.SwingWorker; +import javax.swing.UIManager; +import java.awt.BorderLayout; +import java.awt.Dialog; +import java.awt.Dimension; +import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ExecutionException; /** * Database Connection pane. @@ -48,9 +62,9 @@ public abstract class DatabaseConnectionPane map = new HashMap<>(); + map.put("database", database); + map.put("connect", connect); + return map; + } catch (Exception exp) { + FineLoggerFactory.getLogger().error(exp.getMessage(), exp); + } + return null; + } + + @Override + protected void done() { + try { + Map map = (Map) get(); + Connection database = (Connection) map.get("database"); + boolean connect = (boolean) map.get("connect"); okButton.setEnabled(true); message.setText(database.connectMessage(connect)); if (connect) { uiLabel.setIcon(UIManager.getIcon("OptionPane.informationIcon")); - message.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully")); + message.setText(Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully")); }else{ uiLabel.setIcon(UIManager.getIcon("OptionPane.errorIcon")); - message.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Connection_Failed")); + message.setText(Toolkit.i18nText("Fine-Design_Basic_Connection_Failed")); } - } catch (Exception exp) { - FineLoggerFactory.getLogger().error(exp.getMessage(), exp); + } catch (InterruptedException | ExecutionException e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); } - return null; } }; @@ -158,18 +188,18 @@ public abstract class DatabaseConnectionPane Date: Tue, 24 Nov 2020 10:18:04 +0800 Subject: [PATCH 17/27] =?UTF-8?q?KERNEL-6188=20=E4=BF=AE=E6=94=B9=E4=B8=80?= =?UTF-8?q?=E4=B8=8BdoInBackground()=E6=96=B9=E6=B3=95=E4=B8=8Edone()?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=B9=8B=E9=97=B4=E4=BC=A0=E9=80=92=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=9A=84=E7=B1=BB=E5=9E=8B=EF=BC=8C=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E5=86=97=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datapane/connect/DatabaseConnectionPane.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java index 3ef5aa8f85..b90fc7f372 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java @@ -131,16 +131,13 @@ public abstract class DatabaseConnectionPane connectionThread = new SwingWorker<>() { @Override - protected Object doInBackground() throws Exception { + protected Boolean doInBackground() throws Exception { try { Connection database = DatabaseConnectionPane.this.updateBean(); - boolean connect = DataOperator.getInstance().testConnection(database); - Map map = new HashMap<>(); - map.put("database", database); - map.put("connect", connect); - return map; + // 返回连接结果 + return DataOperator.getInstance().testConnection(database); } catch (Exception exp) { FineLoggerFactory.getLogger().error(exp.getMessage(), exp); } @@ -150,11 +147,8 @@ public abstract class DatabaseConnectionPane map = (Map) get(); - Connection database = (Connection) map.get("database"); - boolean connect = (boolean) map.get("connect"); + boolean connect = get(); okButton.setEnabled(true); - message.setText(database.connectMessage(connect)); if (connect) { uiLabel.setIcon(UIManager.getIcon("OptionPane.informationIcon")); message.setText(Toolkit.i18nText("Fine-Design_Basic_Datasource_Connection_Successfully")); From f549b55ca174954c8e4965fce74e531ed51ddb98 Mon Sep 17 00:00:00 2001 From: Yvan Date: Tue, 24 Nov 2020 10:22:36 +0800 Subject: [PATCH 18/27] =?UTF-8?q?KERNEL-6188=20=E5=8E=BB=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E7=9A=84try-catch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/connect/DatabaseConnectionPane.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java index b90fc7f372..e3ee4cdb9c 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java @@ -134,14 +134,9 @@ public abstract class DatabaseConnectionPane connectionThread = new SwingWorker<>() { @Override protected Boolean doInBackground() throws Exception { - try { - Connection database = DatabaseConnectionPane.this.updateBean(); - // 返回连接结果 - return DataOperator.getInstance().testConnection(database); - } catch (Exception exp) { - FineLoggerFactory.getLogger().error(exp.getMessage(), exp); - } - return null; + Connection database = DatabaseConnectionPane.this.updateBean(); + // 返回连接结果 + return DataOperator.getInstance().testConnection(database); } @Override From fbee3b92776c2d04579bc719229d1ad827d33818 Mon Sep 17 00:00:00 2001 From: Yvan Date: Tue, 24 Nov 2020 10:35:44 +0800 Subject: [PATCH 19/27] =?UTF-8?q?KERNEL-6188=20=E8=A1=A5=E5=85=85=E6=B3=9B?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/connect/DatabaseConnectionPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java index e3ee4cdb9c..f6bfdd29a7 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java @@ -131,7 +131,7 @@ public abstract class DatabaseConnectionPane connectionThread = new SwingWorker<>() { + final SwingWorker connectionThread = new SwingWorker() { @Override protected Boolean doInBackground() throws Exception { Connection database = DatabaseConnectionPane.this.updateBean(); From 6772cde0dce428e3e95b1477e72aaad3312137a1 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 27 Nov 2020 15:09:43 +0800 Subject: [PATCH 20/27] =?UTF-8?q?REPORT-44225=20=E5=87=BA=E7=8E=B0npe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/TableDataNameObjectCreator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java index 3f0f08f35c..7dedc9f479 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataNameObjectCreator.java @@ -157,7 +157,9 @@ public class TableDataNameObjectCreator extends NameObjectCreator { * @param names 名字 */ public void addNames(String names) { - this.names.add(names); + if (names != null) { + this.names.add(names); + } } /** From def28a8873e313ea3ca8f2de1192f41ba2618d90 Mon Sep 17 00:00:00 2001 From: Yvan Date: Fri, 27 Nov 2020 16:38:18 +0800 Subject: [PATCH 21/27] =?UTF-8?q?REPORT-44298=20alpha-fine=E6=90=9C?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=B8=AE=E5=8A=A9=E6=96=87=E6=A1=A3=20?= =?UTF-8?q?=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E7=9A=84=E6=90=9C=E7=B4=A2=E5=B8=AE=E5=8A=A9=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E7=9A=84url=E5=8F=91=E7=94=9F=E5=8F=98=E5=8C=96?= =?UTF-8?q?=E4=BA=86=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D=E8=B7=AF?= =?UTF-8?q?=E3=80=91=E5=9C=A8crm=E9=87=8C=E6=8F=90=E4=BA=A4=E4=BA=91?= =?UTF-8?q?=E7=AB=AF=E9=85=8D=E7=BD=AE=E4=B8=AD=E5=AF=B9=E5=BA=94value?= =?UTF-8?q?=E5=80=BC=E4=BF=AE=E6=94=B9=E7=9A=84=E7=94=B3=E8=AF=B7=EF=BC=8C?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=AD=E4=B9=9F=E9=9C=80=E8=A6=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=B8=80=E4=B8=8Burl=EF=BC=8C=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E4=B8=8B=E8=BF=94=E5=9B=9E=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=AD=E8=8E=B7=E5=8F=96=E6=90=9C=E7=B4=A2=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E7=9A=84key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/search/manager/impl/DocumentSearchManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java index 216c7e9db7..be3ac4f1be 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java @@ -65,12 +65,12 @@ public class DocumentSearchManager implements AlphaFineSearchProvider { } SearchResult searchResult = new SearchResult(); for (int j = 0; j < searchText.length; j++) { - String url = AlphaFineConstants.DOCUMENT_SEARCH_URL + searchText[j] + AlphaFineConstants.FIRST_PAGE; + String url = AlphaFineConstants.DOCUMENT_SEARCH_URL + searchText[j]; try { String result = HttpToolbox.get(url); AlphaFineHelper.checkCancel(); JSONObject jsonObject = new JSONObject(result); - JSONArray jsonArray = jsonObject.optJSONArray("docdata"); + JSONArray jsonArray = jsonObject.optJSONArray("list"); if (jsonArray != null) { for (int i = 0; i < jsonArray.length(); i++) { From a68e220df22bcbd31e0843e563ae53405d7d427e Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 30 Nov 2020 11:53:55 +0800 Subject: [PATCH 22/27] =?UTF-8?q?REPORT-44051=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E6=89=93=E5=BC=80=E5=90=AB=E6=95=B0=E6=8D=AE=E9=9B=86=E5=A4=9A?= =?UTF-8?q?=E7=9A=84=E6=A8=A1=E6=9D=BF=E6=85=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 2 +- .../src/main/java/com/fr/design/mainframe/FormDesigner.java | 5 +++-- .../main/java/com/fr/design/mainframe/FormModelAdapter.java | 4 ++-- .../java/com/fr/design/mainframe/WorkBookModelAdapter.java | 3 ++- .../java/com/fr/design/parameter/ParameterDefinitePane.java | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 73d5d0bb1f..6c6de287e6 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -136,9 +136,9 @@ public abstract class JTemplate> this.editingFILE = file; this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder()); + designModel = createDesignModel(); addCenterPane(); this.undoState = createUndoState(); - designModel = createDesignModel(); consumeTimer.setEnabled(shouldInitForCollectInfo(isNewFile)); initAndStartPlugin(); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java index 62c89b9cae..1d4fad8e34 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java @@ -3,6 +3,7 @@ package com.fr.design.mainframe; import com.fr.base.Parameter; import com.fr.base.ScreenResolution; import com.fr.base.vcs.DesignerMode; +import com.fr.design.DesignModelAdapter; import com.fr.design.DesignState; import com.fr.design.ExtraDesignClassManager; import com.fr.design.actions.UpdateAction; @@ -204,7 +205,7 @@ public class FormDesigner extends TargetComponent
implements TreeSelection */ public void populateParameterPropertyPane() { //参数 - setParameterArray(getNoRepeatParas(getTarget().getParameters())); + setParameterArray(DesignModelAdapter.getCurrentModelAdapter().getParameters()); refreshParameter(); //容器 ParameterPropertyPane.getInstance().populateBean(this); @@ -728,7 +729,7 @@ public class FormDesigner extends TargetComponent implements TreeSelection if (evt.getCreatorEventID() != DesignerEvent.CREATOR_SELECTED) { FormDesigner.this.fireTargetModified(); if (evt.getCreatorEventID() == DesignerEvent.CREATOR_DELETED) { - setParameterArray(getNoRepeatParas(getTarget().getParameters())); + setParameterArray(getNoRepeatParas(DesignModelAdapter.getCurrentModelAdapter().getParameters())); refreshParameter(); } } else { diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormModelAdapter.java b/designer-form/src/main/java/com/fr/design/mainframe/FormModelAdapter.java index abe0c97e86..efc7ff2b04 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormModelAdapter.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormModelAdapter.java @@ -36,10 +36,10 @@ public class FormModelAdapter extends DesignModelAdapter> * 参数改变. */ public void parameterChanged() { - //实时更新参数 - jTemplate.populateParameter(); // 更新缓存的参数 updateCachedParameter(); + //实时更新参数 + jTemplate.populateParameter(); } /** diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/WorkBookModelAdapter.java b/designer-realize/src/main/java/com/fr/design/mainframe/WorkBookModelAdapter.java index fff25486dc..1a4f20c3dd 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/WorkBookModelAdapter.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/WorkBookModelAdapter.java @@ -66,9 +66,10 @@ public class WorkBookModelAdapter extends DesignModelAdapter Date: Mon, 30 Nov 2020 15:08:04 +0800 Subject: [PATCH 23/27] =?UTF-8?q?REPORT-42913=20=E6=94=B9=E5=8F=98?= =?UTF-8?q?=E7=94=B5=E8=84=91=E5=88=86=E8=BE=A8=E7=8E=87=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E7=9A=84=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E4=B8=A2=E5=A4=B1=20=E3=80=90=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E7=9A=84=E4=BD=8D=E7=BD=AE=E4=B8=8E=E9=AB=98?= =?UTF-8?q?=E5=BA=A6=E9=83=BD=E8=B7=9Fparent.getHeight()=20-=20toolPaneY?= =?UTF-8?q?=E6=9C=89=E5=85=B3=EF=BC=8C=E8=80=8C=E5=9C=A8Windows=E4=B8=8B?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=85=88=E6=8A=8A=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E9=9D=A2=E6=9D=BF=E7=9A=84=E9=AB=98=E5=BA=A6=E8=B0=83?= =?UTF-8?q?=E7=9A=84=E6=AF=94=E8=BE=83=E5=B0=8F=EF=BC=8C=E7=84=B6=E5=90=8E?= =?UTF-8?q?=E5=87=8F=E5=B0=8F=E5=88=86=E8=BE=A8=E7=8E=87=E6=88=96=E8=80=85?= =?UTF-8?q?=E8=B0=83=E5=A4=A7dpi=E4=BD=BF=E6=95=B4=E4=B8=AA=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E6=94=BE=E5=A4=A7=E6=97=B6=EF=BC=8Cparent.getHeight()?= =?UTF-8?q?=E4=BC=9A=E5=87=8F=E5=B0=8F=EF=BC=8C=E8=80=8CtoolPaneY=E5=9C=A8?= =?UTF-8?q?=E8=BF=99=E7=A7=8D=E6=93=8D=E4=BD=9C=E4=B8=8B=E6=98=AF=E4=B8=8D?= =?UTF-8?q?=E4=BC=9A=E5=8F=98=E7=9A=84=EF=BC=8C=E6=AD=A4=E6=97=B6toolPaneY?= =?UTF-8?q?=E4=BC=9A=E6=8E=A5=E8=BF=91=E7=94=9A=E8=87=B3=E5=A4=A7=E4=BA=8E?= =?UTF-8?q?parent.getHeight()=EF=BC=8C=E5=AF=BC=E8=87=B4=E4=BA=86=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E9=9D=A2=E6=9D=BF=E7=9A=84=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E4=BD=8D=E4=BA=8E=E6=95=B4=E4=B8=AA=E5=B1=8F=E5=B9=95=E4=B9=8B?= =?UTF-8?q?=E5=A4=96=EF=BC=8C=E5=B9=B6=E4=B8=94=E9=AB=98=E5=BA=A6=E4=B8=BA?= =?UTF-8?q?=E8=B4=9F=EF=BC=8C=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=87=BA=E6=9D=A5?= =?UTF-8?q?=EF=BC=8C=E8=A1=A8=E7=8E=B0=E4=B8=BA=E4=B8=A2=E5=A4=B1=20?= =?UTF-8?q?=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D=E8=B7=AF=E3=80=91=E7=94=A8?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=88=90=E5=91=98=E5=8F=98=E9=87=8FparentHei?= =?UTF-8?q?ght=E5=AD=98=E5=82=A8=E7=88=B6=E5=AE=B9=E5=99=A8=E7=9A=84?= =?UTF-8?q?=E9=AB=98=E5=BA=A6parent.getHeight()=EF=BC=8C=E5=9C=A8layoutCon?= =?UTF-8?q?tainer()=E6=96=B9=E6=B3=95=E4=B8=AD=E5=A2=9E=E5=8A=A0=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E5=88=A4=E6=96=AD=EF=BC=8C=E5=BD=93=E5=8F=91=E7=8E=B0?= =?UTF-8?q?=E7=88=B6=E5=AE=B9=E5=99=A8=E9=AB=98=E5=BA=A6=E6=9C=89=E5=8F=98?= =?UTF-8?q?=E5=8C=96=E6=97=B6=EF=BC=8C=E5=8F=8A=E6=97=B6=E8=B0=83=E6=95=B4?= =?UTF-8?q?toolPaneY=E7=9A=84=E5=A4=A7=E5=B0=8F=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E9=9D=A2=E6=9D=BF=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/icontainer/UIResizableContainer.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java index 0a8529abf3..4f4ac9e3b5 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -45,6 +45,7 @@ public class UIResizableContainer extends JPanel { private boolean isLeftRightDragEnabled = true; private boolean isDownPaneVisible = true ; private int paraHeight; + private int parentHeight = -1; public UIResizableContainer(int direction) { this(new JPanel(), new JPanel(), direction); @@ -207,7 +208,8 @@ public class UIResizableContainer extends JPanel { if (verticalToolPane == null || downPane == null) { return; } - + // REPORT-42913 如果用户修改了分辨率或者dpi,可能造成toolPaneY大于parent.getHeight,整个downPane将丢失,因此这里调整下toolPaneY + adjustToolPaneY(parent); if (direction == Constants.RIGHT) { if(isDownPaneVisible){ upPane.setBounds(0, 0, containerWidth - toolPaneHeight, toolPaneY); @@ -236,6 +238,18 @@ public class UIResizableContainer extends JPanel { } } + private void adjustToolPaneY(Container parent) { + if (parentHeight == -1) { + // 初始化下parentheight,存一下当前的父容器height + parentHeight = parent.getHeight(); + } else if (parentHeight != parent.getHeight()) { + // parentHeight与父容器height不等时,代表用户调整分辨率或者dpi了,此时调整toolPaneY + toolPaneY = toolPaneY * parent.getHeight() / parentHeight; + toolPaneY = Math.min(toolPaneY, (parent.getHeight() - toolPaneHeight)); + parentHeight = parent.getHeight(); + } + } + @Override public void addLayoutComponent(String name, Component comp) { } @@ -540,4 +554,4 @@ public class UIResizableContainer extends JPanel { jf.setSize(500, 500); jf.setVisible(true); } -} \ No newline at end of file +} From 57440714a88276e5b27217e54f457f443788f501 Mon Sep 17 00:00:00 2001 From: Yvan Date: Tue, 1 Dec 2020 09:56:41 +0800 Subject: [PATCH 24/27] =?UTF-8?q?REPORT-42913=20=E4=B8=BA=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=8A=E4=B8=80=E6=AC=A1=E5=85=B3=E9=97=AD=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E6=97=B6upPane=E9=AB=98=E5=BA=A6=E5=8A=A0?= =?UTF-8?q?=E4=B8=8A=E4=B8=80=E4=B8=AA=E5=88=A4=E6=96=AD=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8DupPane=E9=AB=98=E5=BA=A6=E8=B6=85=E8=BF=87=E5=AE=B9?= =?UTF-8?q?=E5=99=A8=E6=80=BB=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/icontainer/UIResizableContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java index 4f4ac9e3b5..35bf403dd5 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -164,7 +164,7 @@ public class UIResizableContainer extends JPanel { * @param toolPaneY */ public void setLastToolPaneY(int toolPaneY) { - this.toolPaneY = toolPaneY; + this.toolPaneY = Math.min(toolPaneY, (getHeight() - toolPaneHeight)); } /** From 57d997f141b5ceee335d84120a2a2c87502be75c Mon Sep 17 00:00:00 2001 From: Yvan Date: Tue, 1 Dec 2020 10:03:09 +0800 Subject: [PATCH 25/27] =?UTF-8?q?REPORT-42913=20=E4=B9=8B=E5=89=8D?= =?UTF-8?q?=E6=83=B3=E5=A4=9A=E4=BA=86=EF=BC=8C=E8=BF=99=E4=B8=AA=E5=9C=A8?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E7=9A=84=E6=97=B6=E5=80=99=E8=BF=98=E6=B2=A1?= =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=B8=B2=E6=9F=93=E6=95=B4=E4=B8=AA=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E7=9A=84=E9=9D=A2=E6=9D=BF=EF=BC=8C=E6=AD=A4=E6=97=B6?= =?UTF-8?q?=E6=8B=BF=E4=B8=8D=E5=88=B0=E7=88=B6=E5=AE=B9=E5=99=A8=E9=AB=98?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/icontainer/UIResizableContainer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java index 35bf403dd5..4f4ac9e3b5 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java +++ b/designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java @@ -164,7 +164,7 @@ public class UIResizableContainer extends JPanel { * @param toolPaneY */ public void setLastToolPaneY(int toolPaneY) { - this.toolPaneY = Math.min(toolPaneY, (getHeight() - toolPaneHeight)); + this.toolPaneY = toolPaneY; } /** From 896c16005d94044730388c6d48847ce1596967b0 Mon Sep 17 00:00:00 2001 From: "Yuan.Wang" <1536296691@qq.com> Date: Tue, 1 Dec 2020 15:05:03 +0800 Subject: [PATCH 26/27] =?UTF-8?q?REPORT-42237=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=8F=90=E5=88=B0release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/designer/creator/XChartEditor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java b/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java index c002bceb38..a6a29339e5 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XChartEditor.java @@ -14,6 +14,7 @@ import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.BaseJForm; import com.fr.design.mainframe.CoverReportPane; +import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.EditingMouseListener; import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.HelpDialogManager; @@ -267,6 +268,9 @@ public class XChartEditor extends XBorderStyleWidgetCreator { if (this != (XCreator) designer.getRootComponent()) { ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, this); editingMouseListener.startEditing(this, isEditing ? adapter.getDesignerEditor() : null, adapter); + if (isEditing) { + EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_SETTINGS); + } } } HelpDialogManager.getInstance().setPane(coverPanel); From 4bb6e7b7bd0e0b430f27ca312bf8495f90ea997e Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Tue, 1 Dec 2020 23:30:09 +0800 Subject: [PATCH 27/27] =?UTF-8?q?CHART-17118=20=E8=AF=95=E7=AE=A1=E5=9E=8B?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E7=9B=98=E6=A0=87=E7=AD=BE=E5=B7=A6=E5=8F=B3?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E5=A2=9E=E5=8A=A0=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../style/label/VanChartGaugeLabelDetailPane.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java index 17910d38a0..86d140f1d9 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java @@ -195,8 +195,14 @@ public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane { } private TwoTuple getAlignNamesAndValues() { - String[] names = new String[]{Toolkit.i18nText("Fine-Design_Chart_Follow"), Toolkit.i18nText("Fine-Design_Chart_Align_Left"), Toolkit.i18nText("Fine-Design_Chart_Align_Right")}; - Integer[] values = new Integer[]{ChartConstants.AUTO_LABEL_POSITION, Constants.LEFT, Constants.RIGHT}; + String[] names = new String[]{ + Toolkit.i18nText("Fine-Design_Chart_Follow"), + Toolkit.i18nText("Fine-Design_Chart_Align_Left"), + Toolkit.i18nText("Fine-Design_Chart_StyleAlignment_Center"), + Toolkit.i18nText("Fine-Design_Chart_Align_Right") + }; + + Integer[] values = new Integer[]{ChartConstants.AUTO_LABEL_POSITION, Constants.LEFT, Constants.CENTER, Constants.RIGHT}; return new TwoTuple<>(names, values); }