From 0f5518c1b1270a59886f8b01b6d166a217a5d1a3 Mon Sep 17 00:00:00 2001 From: "Joe.Jiang" Date: Tue, 29 Oct 2019 19:23:32 +0800 Subject: [PATCH 01/54] =?UTF-8?q?REPORT-22964=20=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=AF=B4=E6=98=8E=E6=97=A0=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E9=94=AE=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/formula/FormulaConstants.java | 50 +++++++++++++++++++ .../com/fr/design/formula/FormulaPane.java | 33 ++++++------ 2 files changed, 69 insertions(+), 14 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/formula/FormulaConstants.java diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaConstants.java b/designer-base/src/main/java/com/fr/design/formula/FormulaConstants.java new file mode 100644 index 000000000..97430ba7f --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/formula/FormulaConstants.java @@ -0,0 +1,50 @@ +package com.fr.design.formula; + +import com.fr.stable.StringUtils; + +public enum FormulaConstants { + + PAGE_NUMBER("$$page_number", "Page_Number"), + TOTAL_PAGE_NUMBER("$$totalPage_number", "Total_Page_Number"), + FINE_USERNAME("$fine_username", "Fine_Username"), + FINE_ROLE("$fine_role", "Fine_Role"), + FINE_POSITION("$fine_position", "Fine_Position"), + NULL("NULL", "Null"), + NOFILTER("NOFILTER", "No_Filter"), + REPORT_NAME("reportName", "Report_Name"), + FORMLET_NAME("formletName", "Formlet_Name"), + SERVLET_URL("servletURL", "Servlet_URL"), + SERVER_SCHEMA("serverSchema", "Server_Schema"), + SERVER_NAME("serverName", "Server_Name"), + SERVER_PORT("serverPort", "Server_Port"), + SERVER_URL("serverURL", "Server_URL"), + CONTEXT_PATH("contextPath", "Context_Path"), + SESSION_ID("sessionID", "SessionID"); + + + private String key; + private String value; + + private FormulaConstants(String key, String value) { + this.key = key; + this.value = value; + } + + public String getKey() { + return key; + } + + public String getValue() { + return value; + } + + public static String getValueByKey(String key) { + for (FormulaConstants formulaConstant : values()) { + if (formulaConstant.getKey().equals(key)) { + return formulaConstant.getValue(); + } + } + return StringUtils.EMPTY; + } + +} diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java index 2cf6efa91..87d0a3a98 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java @@ -19,6 +19,7 @@ import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.parser.FRLexer; import com.fr.parser.FRParser; @@ -779,31 +780,35 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { private void initVariablesTreeSelectionListener() { variablesTree.addTreeSelectionListener(new TreeSelectionListener() { public void valueChanged(TreeSelectionEvent e) { - Object selectedValue = ((DefaultMutableTreeNode) variablesTree.getLastSelectedPathComponent()).getUserObject(); + DefaultMutableTreeNode selectedTreeNode = (DefaultMutableTreeNode) variablesTree.getLastSelectedPathComponent(); + Object selectedValue = selectedTreeNode.getUserObject(); + Object selectedParentValue = ((DefaultMutableTreeNode)selectedTreeNode.getParent()).getUserObject(); + if (selectedValue == null) { return; } - StringBuilder desBuf = new StringBuilder(); - try { - String path; - Locale locale = FRContext.getLocale(); - if (locale.equals(Locale.CHINA)) { - path = "/com/fr/design/insert/formula/variable/cn/"; + + if (selectedValue instanceof TextUserObject) { + //有公式说明的条件:1.属于TextUserObject 2.parent是系统参数 + if (ComparatorUtils.equals(((TextFolderUserObject) selectedParentValue).getText(), + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaPane_Variables"))) { + descriptionTextArea.setText(getVariableDescription((TextUserObject) selectedValue)); } else { - path = "/com/fr/design/insert/formula/variable/en/"; - } - if (selectedValue instanceof TextUserObject) { - desBuf = getText((TextUserObject) selectedValue, path); + descriptionTextArea.setText(""); } - } catch (IOException exp) { - FineLoggerFactory.getLogger().error(exp.getMessage(), exp); + } else if (selectedValue instanceof TextFolderUserObject) { + descriptionTextArea.setText(""); } - descriptionTextArea.setText(desBuf.toString()); descriptionTextArea.moveCaretPosition(0); } }); } + private String getVariableDescription(TextUserObject selectedValue) { + + return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_CurReport_Variable_" + FormulaConstants.getValueByKey(selectedValue.getText())); + } + private void initVariablesTree() { // vairable. variablesTree = new JTree(); From 035f9fd99f28e50966749db787b12f5b0f77e9b8 Mon Sep 17 00:00:00 2001 From: "Joe.Jiang" Date: Wed, 30 Oct 2019 11:11:52 +0800 Subject: [PATCH 02/54] =?UTF-8?q?REPORT-22964=20=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=AF=B4=E6=98=8E=E6=97=A0=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E9=94=AE=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/formula/FormulaConstants.java | 11 +++++++++-- .../main/java/com/fr/design/formula/FormulaPane.java | 10 +++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaConstants.java b/designer-base/src/main/java/com/fr/design/formula/FormulaConstants.java index 97430ba7f..4dfcb4bb4 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FormulaConstants.java +++ b/designer-base/src/main/java/com/fr/design/formula/FormulaConstants.java @@ -2,6 +2,11 @@ package com.fr.design.formula; import com.fr.stable.StringUtils; +/** + * @author Joe + * @version 10.0 + * Created by Joe on 10/30/2019 + */ public enum FormulaConstants { PAGE_NUMBER("$$page_number", "Page_Number"), @@ -21,13 +26,13 @@ public enum FormulaConstants { CONTEXT_PATH("contextPath", "Context_Path"), SESSION_ID("sessionID", "SessionID"); - private String key; private String value; + private static final String KEY_PREFIX = "Fine-Design_CurReport_Variable_"; private FormulaConstants(String key, String value) { this.key = key; - this.value = value; + this.value = KEY_PREFIX + value; } public String getKey() { @@ -47,4 +52,6 @@ public enum FormulaConstants { return StringUtils.EMPTY; } + + } diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java index 87d0a3a98..a8c8c3477 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java @@ -792,22 +792,18 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { //有公式说明的条件:1.属于TextUserObject 2.parent是系统参数 if (ComparatorUtils.equals(((TextFolderUserObject) selectedParentValue).getText(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FormulaPane_Variables"))) { - descriptionTextArea.setText(getVariableDescription((TextUserObject) selectedValue)); + descriptionTextArea.setText(com.fr.design.i18n.Toolkit.i18nText(FormulaConstants.getValueByKey(((TextUserObject) selectedValue).getText()))); } else { - descriptionTextArea.setText(""); + descriptionTextArea.setText(StringUtils.EMPTY); } } else if (selectedValue instanceof TextFolderUserObject) { - descriptionTextArea.setText(""); + descriptionTextArea.setText(StringUtils.EMPTY); } descriptionTextArea.moveCaretPosition(0); } }); } - private String getVariableDescription(TextUserObject selectedValue) { - - return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_CurReport_Variable_" + FormulaConstants.getValueByKey(selectedValue.getText())); - } private void initVariablesTree() { // vairable. From 7786d3593792bcbdf8cbe5810b65395b67be78bf Mon Sep 17 00:00:00 2001 From: Bryant Date: Fri, 1 Nov 2019 08:44:55 +0800 Subject: [PATCH 03/54] =?UTF-8?q?REPORT-23486=20=E4=BF=AE=E5=A4=8Dbug?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E6=9B=B4=E6=94=B9=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/update/actions/RecoverForDesigner.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/update/actions/RecoverForDesigner.java b/designer-base/src/main/java/com/fr/design/update/actions/RecoverForDesigner.java index 7cb2826cf..eb25ccea3 100644 --- a/designer-base/src/main/java/com/fr/design/update/actions/RecoverForDesigner.java +++ b/designer-base/src/main/java/com/fr/design/update/actions/RecoverForDesigner.java @@ -85,12 +85,12 @@ public class RecoverForDesigner implements Recover { private void backupFilesFromInstallLib(String installHome, String todayBackupDir) { try { CommonUtils.mkdirs(new File(StableUtils.pathJoin(todayBackupDir,UpdateConstants.DESIGNERBACKUPPATH))); - File file = new File(StableUtils.pathJoin(installHome,ProjectConstants.LIB_NAME)); - File[] files = file.listFiles(); + File lib = new File(StableUtils.pathJoin(installHome,ProjectConstants.LIB_NAME)); + File[] files = lib.listFiles(); File dir = new File(StableUtils.pathJoin(todayBackupDir,UpdateConstants.DESIGNERBACKUPPATH)); if (files != null) { - for (File file1 : files) { - if (file1.getName().startsWith(UpdateConstants.FINE) || file1.getName().contains(UpdateConstants.ASPECTJRT)) { + for (File file : files) { + if (file.getName().startsWith(UpdateConstants.FINE) || file.getName().contains(UpdateConstants.ASPECTJRT)) { CommonIOUtils.copy(file, dir); } } From 0705f92caf1a50584dcbf65fa70ac2e4102150b7 Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Fri, 1 Nov 2019 12:04:17 +0800 Subject: [PATCH 04/54] =?UTF-8?q?REPORT-23570=20=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E7=AE=A1=E7=90=86=EF=BC=8Cgc=E4=B8=BA?= =?UTF-8?q?=E8=B4=9F=E6=95=B0=E6=97=B6=E5=BA=94=E5=BD=93=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E2=80=9C=E6=97=A0=E5=8F=AF=E4=BC=98=E5=8C=96=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/actions/file/PreferencePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 43d739177..9fa3849df 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -883,7 +883,7 @@ public class PreferencePane extends BasicPane { } catch (InterruptedException e) { FineLoggerFactory.getLogger().error(e, e.getMessage()); } - updateGcDialogPanelInfo(i18nText("Fine-Design_Vcs_Reduce_File_Size") + fileSizeConvert(size)); + updateGcDialogPanelInfo(size <= 0 ? i18nText("Fine-Design_Vcs_No_Optimization_File") : i18nText("Fine-Design_Vcs_Reduce_File_Size") + fileSizeConvert(size)); gcDialogDownPane.revalidate(); gcDialogDownPane.repaint(); gcDialogDownPane.add(gcOkButton); From 444c8c0682384429fcf8bade8019c8b7f4f21090 Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Fri, 1 Nov 2019 12:44:12 +0800 Subject: [PATCH 05/54] =?UTF-8?q?REPORT-23570=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/actions/file/PreferencePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 9fa3849df..4a1c208c9 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -883,7 +883,7 @@ public class PreferencePane extends BasicPane { } catch (InterruptedException e) { FineLoggerFactory.getLogger().error(e, e.getMessage()); } - updateGcDialogPanelInfo(size <= 0 ? i18nText("Fine-Design_Vcs_No_Optimization_File") : i18nText("Fine-Design_Vcs_Reduce_File_Size") + fileSizeConvert(size)); + updateGcDialogPanelInfo(size <= 0 ? i18nText("Fine-Design_Vcs_No_Optimizable_File") : i18nText("Fine-Design_Vcs_Reduce_File_Size") + fileSizeConvert(size)); gcDialogDownPane.revalidate(); gcDialogDownPane.repaint(); gcDialogDownPane.add(gcOkButton); From af80cfe6620a9e77dc72ae283c6de896156fcfdc Mon Sep 17 00:00:00 2001 From: "Joe.Jiang" Date: Fri, 1 Nov 2019 15:57:59 +0800 Subject: [PATCH 06/54] =?UTF-8?q?REPORT-22046=20cpt=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=86=BB=E7=BB=93=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E6=9C=89=E4=B8=AA=E9=94=99=E8=AF=AF=E7=9A=84=E5=BC=95=E5=AF=BC?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/report/freeze/RepeatAndFreezeSettingPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java index 1dd75e163..3fc32f575 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java @@ -216,12 +216,12 @@ public class RepeatAndFreezeSettingPane extends BasicPane { JPanel freezePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); //自适应插件 - if (shouldShowTip()) { +/* if (shouldShowTip()) { JPanel infoPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attention")); BoxCenterAligmentPane actionLabel = getURLActionLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Form_Fit_Tip")); infoPane.add(actionLabel, BorderLayout.SOUTH); this.add(infoPane, BorderLayout.SOUTH); - } + }*/ outfreezePanel.add(freezePanel); // 重复打印部分 // 重复打印标题的起始行 From ac0c319ae4ee360205e06168af8049cff0d35961 Mon Sep 17 00:00:00 2001 From: Lucian Date: Fri, 1 Nov 2019 17:31:50 +0800 Subject: [PATCH 07/54] =?UTF-8?q?REPORT-23115=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E6=9D=83=E9=99=90=E9=85=8D=E7=BD=AE-?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=B8=8D=E5=8C=B9=E9=85=8D=E6=97=B6=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8=E9=83=BD=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/file/NodeAuthProcessor.java | 11 ++++++-- .../action/RemoteDesignAuthManagerAction.java | 28 ++++++++++++++----- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/file/NodeAuthProcessor.java b/designer-base/src/main/java/com/fr/design/file/NodeAuthProcessor.java index 2a1c0cc94..a1082b62f 100644 --- a/designer-base/src/main/java/com/fr/design/file/NodeAuthProcessor.java +++ b/designer-base/src/main/java/com/fr/design/file/NodeAuthProcessor.java @@ -13,6 +13,7 @@ import com.fr.workspace.WorkContext; import com.fr.workspace.server.authority.AuthorityOperator; import com.fr.workspace.server.authority.decision.DecisionOperator; +import java.lang.reflect.UndeclaredThrowableException; import java.util.ArrayList; public class NodeAuthProcessor { @@ -41,9 +42,15 @@ public class NodeAuthProcessor { if (!WorkContext.getCurrent().isLocal()) { try { String userName = WorkContext.getCurrent().getConnection().getUserName(); - String userId = WorkContext.getCurrent().get(DecisionOperator.class).getUserIdByName(userName); + DesignAuthority[] authorities = null; + try { + String userId = WorkContext.getCurrent().get(DecisionOperator.class).getUserIdByName(userName); + authorities = WorkContext.getCurrent().get(AuthorityOperator.class).getAuthorities(userId); + } catch(UndeclaredThrowableException e) { + // 兼容旧版本的服务器 + authorities = WorkContext.getCurrent().get(AuthorityOperator.class).getAuthorities(); + } // 远程设计获取设计成员的权限列表 - DesignAuthority[] authorities = WorkContext.getCurrent().get(AuthorityOperator.class).getAuthorities(userId); DesignAuthority authority = null; if (authorities != null) { diff --git a/designer-base/src/main/java/com/fr/design/remote/action/RemoteDesignAuthManagerAction.java b/designer-base/src/main/java/com/fr/design/remote/action/RemoteDesignAuthManagerAction.java index 63929685d..f48cb12ed 100644 --- a/designer-base/src/main/java/com/fr/design/remote/action/RemoteDesignAuthManagerAction.java +++ b/designer-base/src/main/java/com/fr/design/remote/action/RemoteDesignAuthManagerAction.java @@ -9,11 +9,14 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.remote.ui.AuthorityManagerPane; import com.fr.log.FineLoggerFactory; import com.fr.report.DesignAuthority; +import com.fr.report.constant.RoleType; import com.fr.stable.ArrayUtils; import com.fr.workspace.WorkContext; import com.fr.workspace.server.authority.AuthorityOperator; import java.awt.event.ActionEvent; +import java.util.ArrayList; +import java.util.List; /** * @author yaohwu @@ -38,13 +41,24 @@ public class RemoteDesignAuthManagerAction extends UpdateAction { if (!WorkContext.getCurrent().isLocal()) { try { // 远程设计获取全部设计成员的权限列表 - DesignAuthority[] userAuthorities = WorkContext.getCurrent().get(AuthorityOperator.class).getUserAuthorities(); - DesignAuthority[] customAuthorities = WorkContext.getCurrent().get(AuthorityOperator.class).getCustomRoleAuthorities(); - if (userAuthorities != null && userAuthorities.length != 0) { - managerPane.populateByUser(userAuthorities); - } - if (customAuthorities != null && customAuthorities.length != 0) { - managerPane.populateByCustom(customAuthorities); + DesignAuthority[] authorities = WorkContext.getCurrent().get(AuthorityOperator.class).getAuthorities(); + List userAuthorities = new ArrayList(); + List customAuthorities = new ArrayList(); + if (authorities != null) { + for (DesignAuthority authority : authorities) { + if (authority.getRoleType() == RoleType.CUSTOM) { + customAuthorities.add(authority); + } + else { + userAuthorities.add(authority); + } + } + if (userAuthorities.size() != 0) { + managerPane.populateByUser(userAuthorities.toArray(new DesignAuthority[userAuthorities.size()])); + } + if (customAuthorities.size() != 0) { + managerPane.populateByCustom(customAuthorities.toArray(new DesignAuthority[customAuthorities.size()])); + } } } catch (Exception exception) { FineLoggerFactory.getLogger().error(exception.getMessage(), exception); From 043a59e6d6f39bb96a5dc585ebb9f3232a20abfa Mon Sep 17 00:00:00 2001 From: Bryant Date: Mon, 4 Nov 2019 14:54:43 +0800 Subject: [PATCH 08/54] =?UTF-8?q?REPORT-23486=20=E4=BF=AE=E5=A4=8Dbug?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E6=9B=B4=E6=94=B9=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/update/ui/dialog/RestoreResultDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/update/ui/dialog/RestoreResultDialog.java b/designer-base/src/main/java/com/fr/design/update/ui/dialog/RestoreResultDialog.java index d94a93c71..7522041ff 100644 --- a/designer-base/src/main/java/com/fr/design/update/ui/dialog/RestoreResultDialog.java +++ b/designer-base/src/main/java/com/fr/design/update/ui/dialog/RestoreResultDialog.java @@ -219,7 +219,7 @@ public class RestoreResultDialog extends JDialog { files = installEnv.listFiles(); if (files != null) { for (File file : files) { - if (file.getName().startsWith(UpdateConstants.FINE) || file.getName().equals(UpdateConstants.ASPECTJRT)) { + if (file.getName().startsWith(UpdateConstants.FINE) || file.getName().contains(UpdateConstants.ASPECTJRT)) { list.add(StableUtils.pathJoin(installHome, ProjectConstants.LIB_NAME, file.getName())); } } From ce109401409f58408962371e4f7e9cc85003dfcf Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 4 Nov 2019 16:42:05 +0800 Subject: [PATCH 09/54] =?UTF-8?q?REPORT-22806=09=20=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94=E4=B8=8B=E5=9D=97=E8=BF=98=E6=98=AF?= =?UTF-8?q?=E6=9C=89=E5=8F=A0=E7=9B=96=20=E8=BD=AC=E4=B8=93=E4=BA=BA?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1-Winnie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/FRAbsoluteLayoutAdapter.java | 9 +++---- .../adapters/layout/FRBodyLayoutAdapter.java | 24 +++++++++---------- .../adapters/layout/FRFitLayoutAdapter.java | 5 ++-- .../layout/FRTabFitLayoutAdapter.java | 5 ++-- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java index 8973f1d20..4e6adee4b 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java @@ -38,7 +38,7 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter { public HoverPainter getPainter() { return painter; } - + /** * 是否能在指定位置添加组件 * @param creator 组件 @@ -240,7 +240,8 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter { updateCreatorBackBound(); LayoutUtils.layoutRootContainer(container); }else{ - fixAbsolute(creator, x, y); + //添加到其父组件布局中的时候,要用其父组件布局添加 + container.getLayoutAdapter().addBean(creator, x, y); if (creator.shouldScaleCreator() || creator.hasTitleStyle()) { addParentCreator(creator); } else { @@ -303,7 +304,7 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter { XWAbsoluteLayout layout = (XWAbsoluteLayout) container; layout.updateBoundsWidget(creator); } - + /** * 调整组件大小到合适尺寸位置 * @param creator 组件 @@ -338,4 +339,4 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter { XWAbsoluteLayout xwAbsoluteLayout = (XWAbsoluteLayout) container; return new FRAbsoluteLayoutPropertiesGroupModel(xwAbsoluteLayout); } -} \ No newline at end of file +} diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java index 05da6975c..5a31bab40 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRBodyLayoutAdapter.java @@ -593,26 +593,26 @@ public class FRBodyLayoutAdapter extends AbstractLayoutAdapter { switch (position) { case COMP_TOP: dim.width = maxWidth; - dim.height = maxHeight / 2; - finalY = yL + dim.height; - finalH = maxHeight - dim.height; + dim.height = maxHeight / 2 - actualVal / 2; + finalY = yL + dim.height + actualVal; + finalH = maxHeight - dim.height - actualVal; break; case COMP_BOTTOM: - dim.height = maxHeight / 2; + dim.height = maxHeight / 2 - actualVal / 2; dim.width = maxWidth; - finalH = maxHeight - dim.height; - yL = yL + finalH; + finalH = maxHeight - dim.height - actualVal; + yL = yL + finalH + actualVal; break; case COMP_LEFT: - dim.width = maxWidth / 2; + dim.width = maxWidth / 2 - actualVal / 2; dim.height = maxHeight; - finalX = xL + dim.width; - finalW = maxWidth - dim.width; + finalX = xL + dim.width + actualVal; + finalW = maxWidth - dim.width - actualVal; break; default: - finalW = maxWidth / 2; - xL = xL + finalW; - dim.width = maxWidth - finalW; + finalW = maxWidth / 2 - actualVal / 2; + xL = xL + finalW + actualVal; + dim.width = maxWidth - finalW - actualVal; dim.height = maxHeight; } if (isCalculateChildPos) { diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java index 9aa9e5ab9..b08c6f751 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java @@ -10,6 +10,7 @@ import com.fr.design.designer.beans.painters.FRFitLayoutPainter; import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XLayoutContainer; +import com.fr.design.designer.creator.XWAbsoluteLayout; import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.cardlayout.XWCardLayout; import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout; @@ -150,7 +151,7 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter { //布局控件要先判断是不是可编辑 XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer((XCreator) comp).getTopLayout(); - if (topLayout != null && !isMatchEdge && !topLayout.isEditable()) { + if (topLayout != null && !isMatchEdge && !topLayout.isEditable() && !topLayout.acceptType(XWAbsoluteLayout.class)) { return false; } @@ -1221,4 +1222,4 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter { public ConstraintsGroupModel getLayoutConstraints(XCreator creator) { return new FRFitLayoutConstraints((XWFitLayout) container, creator); } -} \ No newline at end of file +} diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java index b1ca803c6..70a5d5df0 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java @@ -74,7 +74,8 @@ public class FRTabFitLayoutAdapter extends FRFitLayoutAdapter { XWTabFitLayout tabLayout = (XWTabFitLayout) backUpContainer; y = adjustY(y, tabLayout); } - addComp(creator, x, y); + //这时候应该要用计算后的父fit布局添加 + this.container.getLayoutAdapter().addBean(creator, x, y); ((XWidgetCreator) creator).recalculateChildrenSize(); return true; } @@ -102,4 +103,4 @@ public class FRTabFitLayoutAdapter extends FRFitLayoutAdapter { return ComponentUtils.getRelativeBounds(mainLayout); } -} \ No newline at end of file +} From 8541021b9dd40d23a3ba0941ec14b78ed431a08d Mon Sep 17 00:00:00 2001 From: pengda Date: Mon, 4 Nov 2019 17:37:23 +0800 Subject: [PATCH 10/54] =?UTF-8?q?REPORT-19946=20Linux=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/os/impl/DemoAction.java | 2 +- .../src/main/java/com/fr/design/os/impl/RestartAction.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/os/impl/DemoAction.java b/designer-base/src/main/java/com/fr/design/os/impl/DemoAction.java index 8feb02952..c1676a5a9 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/DemoAction.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/DemoAction.java @@ -27,7 +27,7 @@ public class DemoAction implements OSBasedAction { } else if(OperatingSystem.isWindows()){ executorPath = StableUtils.pathJoin(installHome, "bin", "designer.exe demo"); }else{ - executorPath = StableUtils.pathJoin(installHome, "bin", "designer.sh demo"); + executorPath = StableUtils.pathJoin(installHome, "bin", "designer demo"); } if (OperatingSystem.isMacos()) { diff --git a/designer-base/src/main/java/com/fr/design/os/impl/RestartAction.java b/designer-base/src/main/java/com/fr/design/os/impl/RestartAction.java index 47a7ae43b..e31d8fcaf 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/RestartAction.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/RestartAction.java @@ -66,7 +66,7 @@ public class RestartAction implements OSBasedAction { ProcessBuilder builder = new ProcessBuilder(); List commands = new ArrayList(); //现在先写的是restart.sh - commands.add(installHome + File.separator + "bin" + File.separator + "restart.sh"); + commands.add(installHome + File.separator + "bin" + File.separator + "restart"); if (ArrayUtils.isNotEmpty(filesToBeDelete)) { commands.add(StableUtils.join(filesToBeDelete, "+")); } From 8eac5482864d14c38731b412d9abb6ce3719a5aa Mon Sep 17 00:00:00 2001 From: pengda Date: Mon, 4 Nov 2019 17:45:35 +0800 Subject: [PATCH 11/54] =?UTF-8?q?REPORT-19946=20Linux=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/os/impl/DemoAction.java | 1 - .../src/main/java/com/fr/design/os/impl/RestartAction.java | 1 - 2 files changed, 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/os/impl/DemoAction.java b/designer-base/src/main/java/com/fr/design/os/impl/DemoAction.java index c1676a5a9..1696e6ce8 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/DemoAction.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/DemoAction.java @@ -21,7 +21,6 @@ public class DemoAction implements OSBasedAction { } String executorPath; - if (OperatingSystem.isMacos()) { executorPath = StableUtils.pathJoin(installHome, "bin", "designer.app"); } else if(OperatingSystem.isWindows()){ diff --git a/designer-base/src/main/java/com/fr/design/os/impl/RestartAction.java b/designer-base/src/main/java/com/fr/design/os/impl/RestartAction.java index e31d8fcaf..d80fad554 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/RestartAction.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/RestartAction.java @@ -65,7 +65,6 @@ public class RestartAction implements OSBasedAction { private static void restartInLinux(String installHome, String[] filesToBeDelete) throws Exception { ProcessBuilder builder = new ProcessBuilder(); List commands = new ArrayList(); - //现在先写的是restart.sh commands.add(installHome + File.separator + "bin" + File.separator + "restart"); if (ArrayUtils.isNotEmpty(filesToBeDelete)) { commands.add(StableUtils.join(filesToBeDelete, "+")); From 24087923e2102c3aa659a63ba048d1e9d4f07d9d Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 5 Nov 2019 14:55:46 +0800 Subject: [PATCH 12/54] =?UTF-8?q?REPORT-23494=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E5=90=8D=E5=90=8E=20=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=BA=8B=E4=BB=B6=20=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E4=B8=8D=E4=BC=9A=E8=A2=AB=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/designer/properties/EventPropertyTable.java | 1 + 1 file changed, 1 insertion(+) diff --git a/designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java b/designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java index ec953b9da..2a3ab3dac 100644 --- a/designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java +++ b/designer-form/src/main/java/com/fr/design/designer/properties/EventPropertyTable.java @@ -98,6 +98,7 @@ public class EventPropertyTable extends UIListControlPane { Widget widget = creator.toData(); refreshNameableCreator(EventCreator.createEventCreator(widget.supportedEvents(), WidgetEventListenerUpdatePane.class)); + populateNameObjects(); } public void populateNameObjects() { From d8f99774674ced5aef35f768c99ffd6a5cd6fb46 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 6 Nov 2019 11:53:37 +0800 Subject: [PATCH 13/54] =?UTF-8?q?REPORT-23246=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8UI=20=E6=8F=92=E5=85=A5=E6=96=9C=E7=BA=BF=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/utils/gui/FineDesignScreen.java | 36 +++++++++++++++++++ .../editor/BiasTextPainterCellEditor.java | 5 +-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/utils/gui/FineDesignScreen.java diff --git a/designer-base/src/main/java/com/fr/design/utils/gui/FineDesignScreen.java b/designer-base/src/main/java/com/fr/design/utils/gui/FineDesignScreen.java new file mode 100644 index 000000000..13fca5aa5 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/utils/gui/FineDesignScreen.java @@ -0,0 +1,36 @@ +package com.fr.design.utils.gui; + +import com.fr.stable.os.OperatingSystem; + +import java.awt.*; + +/** + * @author hades + * @version 10.0 + * Created by hades on 2019/10/29 + */ +public enum FineDesignScreen { + + /** + * 一个临界dpi + * 设计器(windows/linux)大于等于该dpi界面ui变得很小 (jdk bug 在jdk9修复: http://openjdk.java.net/jeps/263) + */ + DPI_144(144); + + private int value; + + FineDesignScreen(int value) { + this.value = value; + } + + /** + * 判断win/linux下的dpi macos不做处理 + * @return + */ + public static boolean isHighDPI() { + if (OperatingSystem.isMacos()) { + return false; + } + return Toolkit.getDefaultToolkit().getScreenResolution() >= DPI_144.value; + } +} diff --git a/designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java b/designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java index 85b602c42..ab737812f 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java +++ b/designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java @@ -10,6 +10,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.utils.gui.FineDesignScreen; import com.fr.general.ComparatorUtils; import com.fr.grid.Grid; import com.fr.report.cell.TemplateCellElement; @@ -35,7 +36,7 @@ import java.awt.event.ActionListener; public class BiasTextPainterCellEditor extends AbstractCellEditor { private BiasTextPainterPane biasTextPainterPane = null; - private static final double MULTIPLE = 1.5; + private static final double MULTIPLE = FineDesignScreen.isHighDPI() ? 2 : 1.5; /** * Constructor. @@ -114,7 +115,7 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor { //center JPanel centerPane =FRGUIPaneFactory.createBorderLayout_S_Pane(); - defaultPane.add(centerPane, BorderLayout.CENTER); + defaultPane.add(centerPane, BorderLayout.NORTH); //text JPanel textPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); From 820fcc273072d7f72348d7e73fe9284934691322 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 6 Nov 2019 12:49:41 +0800 Subject: [PATCH 14/54] fix --- .../com/fr/design/cell/editor/BiasTextPainterCellEditor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java b/designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java index ab737812f..e97a92b4d 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java +++ b/designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java @@ -115,7 +115,7 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor { //center JPanel centerPane =FRGUIPaneFactory.createBorderLayout_S_Pane(); - defaultPane.add(centerPane, BorderLayout.NORTH); + defaultPane.add(centerPane, BorderLayout.CENTER); //text JPanel textPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); From ae444f7eed8a8fc71d6fcce4837db9c6b02e3697 Mon Sep 17 00:00:00 2001 From: zack Date: Wed, 6 Nov 2019 22:04:55 +0800 Subject: [PATCH 15/54] =?UTF-8?q?REPORT-22634=2019fdc=5F=E5=86=B3=E7=AD=96?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=A2=9E=E5=8A=A0=E9=A2=84=E8=A7=88=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ExtraDesignClassManager.java | 89 ++++++++++++++++--- .../com/fr/design/fun/PreviewProvider.java | 3 +- .../fun/impl/AbstractPreviewProvider.java | 10 +++ .../com/fr/design/mainframe/JTemplate.java | 18 ++-- .../design/ExtraDesignClassManagerTest.java | 2 + .../java/com/fr/design/mainframe/JForm.java | 3 +- .../com/fr/design/mainframe/JWorkBook.java | 13 +-- 7 files changed, 110 insertions(+), 28 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java b/designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java index bd2e50d57..656a7a6a7 100644 --- a/designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java +++ b/designer-base/src/main/java/com/fr/design/ExtraDesignClassManager.java @@ -7,7 +7,14 @@ package com.fr.design; import com.fr.base.BaseUtils; import com.fr.common.annotations.Open; import com.fr.design.data.datapane.TableDataNameObjectCreator; -import com.fr.design.fun.*; +import com.fr.design.fun.CellWidgetOptionProvider; +import com.fr.design.fun.FormWidgetOptionProvider; +import com.fr.design.fun.MobileWidgetStyleProvider; +import com.fr.design.fun.ParameterWidgetOptionProvider; +import com.fr.design.fun.PreviewProvider; +import com.fr.design.fun.ServerTableDataDefineProvider; +import com.fr.design.fun.TableDataDefineProvider; +import com.fr.design.fun.ToolbarItemProvider; import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.core.WidgetOptionFactory; import com.fr.design.menu.ShortCut; @@ -24,6 +31,7 @@ import com.fr.stable.Filter; import com.fr.stable.plugin.ExtraDesignClassManagerProvider; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -127,21 +135,25 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement } public WidgetOption[] getWebWidgetOptions(Set set, Filter filter) { - if (set == null || set.isEmpty()) { - return new WidgetOption[0]; - } - List list = new ArrayList<>(); - for (ToolbarItemProvider provider : set) { - if (filter != null && filter.accept(provider)) { - WidgetOption option = WidgetOptionFactory.createByWidgetClass( + return new DesignExtraBridge() { + + @Override + WidgetOption createT(ToolbarItemProvider provider) { + return WidgetOptionFactory.createByWidgetClass( provider.nameForWidget(), IOUtils.readIcon(provider.iconPathForWidget()), provider.classForWidget() ); - list.add(option); } - } - return list.toArray(new WidgetOption[list.size()]); + + @Override + WidgetOption[] toArray(Collection sCollection) { + if (sCollection == null) { + return new WidgetOption[0]; + } + return sCollection.toArray(new WidgetOption[sCollection.size()]); + } + }.filterSAndTransformT(set, filter); } @@ -224,8 +236,8 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement return new MobileWidgetStyleProvider[0]; } List providers = new ArrayList<>(); - for (MobileWidgetStyleProvider provider: set) { - if(ComparatorUtils.equalsIgnoreCase(provider.xTypeForWidget(), xType)) { + for (MobileWidgetStyleProvider provider : set) { + if (ComparatorUtils.equalsIgnoreCase(provider.xTypeForWidget(), xType)) { providers.add(provider); } } @@ -256,4 +268,55 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement return Collections.unmodifiableSet(shortCuts); } + + public PreviewProvider[] getTemplatePreviews(Filter filter) { + Set set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING); + return new DesignExtraBridge() { + + @Override + PreviewProvider createT(PreviewProvider previewProvider) { + return previewProvider; + } + + @Override + PreviewProvider[] toArray(Collection sCollection) { + if (sCollection == null) { + return new PreviewProvider[0]; + } + return sCollection.toArray(new PreviewProvider[sCollection.size()]); + } + }.filterSAndTransformT(set, filter); + } + + /** + * 抽了一个可能用到的公用逻辑出来:通过filter过滤接口实现(Set)并将对外接口实例转成内部实例S转成T,比如ToolItemProvider转成WidgetOption,当然也可以不转 + * + * @param 你想要得到的类型,可以跟S相同 + * @param 待转换的目标类型 + */ + abstract class DesignExtraBridge { + T[] filterSAndTransformT(Set set, Filter filter) { + if (set == null || set.isEmpty()) { + return toArray(set); + } + List list = new ArrayList<>(); + for (S provider : set) { + if (filter == null || filter.accept(provider)) { + list.add(createT(provider)); + } + } + + return toArray(list); + } + + /** + * S转T + * @param s + * @return + */ + abstract T createT(S s); + + abstract T[] toArray(Collection sCollection); + + } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/fun/PreviewProvider.java b/designer-base/src/main/java/com/fr/design/fun/PreviewProvider.java index f6e8cb219..c07a4efe0 100644 --- a/designer-base/src/main/java/com/fr/design/fun/PreviewProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/PreviewProvider.java @@ -1,6 +1,7 @@ package com.fr.design.fun; import com.fr.design.mainframe.JTemplate; +import com.fr.stable.Filter; import com.fr.stable.fun.mark.Mutable; import java.util.Map; @@ -11,7 +12,7 @@ import java.util.Map; * @since 8.0 * 自定义预览方式接口 */ -public interface PreviewProvider extends Mutable { +public interface PreviewProvider extends Mutable, Filter { String MARK_STRING = "PreviewProvider"; diff --git a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractPreviewProvider.java b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractPreviewProvider.java index f0b780903..3cdac8035 100644 --- a/designer-base/src/main/java/com/fr/design/fun/impl/AbstractPreviewProvider.java +++ b/designer-base/src/main/java/com/fr/design/fun/impl/AbstractPreviewProvider.java @@ -1,7 +1,9 @@ package com.fr.design.fun.impl; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.fun.PreviewProvider; import com.fr.design.mainframe.JTemplate; +import com.fr.design.mainframe.JVirtualTemplate; import com.fr.general.ComparatorUtils; import com.fr.general.web.ParameterConstants; import com.fr.stable.fun.impl.AbstractProvider; @@ -52,4 +54,12 @@ public abstract class AbstractPreviewProvider extends AbstractProvider implement public String getActionType() { return ParameterConstants.VIEWLET; } + + @Override + public boolean accept(JTemplate jTemplate) { + if (jTemplate == null) { + jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + } + return jTemplate == null || jTemplate.isJWorkBook() || jTemplate instanceof JVirtualTemplate; + } } \ No newline at end of file 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 31944deb0..4ac020069 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 @@ -4,7 +4,6 @@ import com.fr.base.BaseUtils; import com.fr.base.FRContext; import com.fr.base.Parameter; import com.fr.base.ScreenResolution; -import com.fr.base.extension.FileExtension; import com.fr.base.io.BaseBook; import com.fr.base.iofile.attr.DesignBanCopyAttrMark; import com.fr.base.iofile.attr.TemplateIdAttrMark; @@ -27,8 +26,8 @@ import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.TemplateTreePane; import com.fr.design.fun.DesignerFrameUpButtonProvider; import com.fr.design.fun.MenuHandler; -import com.fr.design.fun.ReportSupportedFileUIProvider; import com.fr.design.fun.PreviewProvider; +import com.fr.design.fun.ReportSupportedFileUIProvider; import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; import com.fr.design.gui.ibutton.UIButton; @@ -50,7 +49,6 @@ import com.fr.design.write.submit.DBManipulationPane; import com.fr.file.FILE; import com.fr.file.FILEChooserPane; import com.fr.file.MemFILE; -import com.fr.file.filter.ChooseFileFilter; import com.fr.form.ui.NoneWidget; import com.fr.form.ui.Widget; import com.fr.general.ComparatorUtils; @@ -58,6 +56,7 @@ import com.fr.log.FineLoggerFactory; import com.fr.report.cell.Elem; import com.fr.report.cell.cellattr.CellImage; import com.fr.stable.ArrayUtils; +import com.fr.stable.Filter; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; import com.fr.stable.core.UUID; @@ -628,7 +627,7 @@ public abstract class JTemplate> } } - protected void addChooseFILEFilter(FILEChooserPane fileChooser){ + protected void addChooseFILEFilter(FILEChooserPane fileChooser) { } @@ -651,13 +650,13 @@ public abstract class JTemplate> return result; } - protected boolean saveToNewFile(String oldName){ + protected boolean saveToNewFile(String oldName) { boolean result = false; Set providers = ExtraDesignClassManager.getInstance().getArray(ReportSupportedFileUIProvider.XML_TAG); for (ReportSupportedFileUIProvider provider : providers) { result = result || provider.saveToNewFile(this.editingFILE.getPath(), this); } - if(!result){ + if (!result) { result = result || this.saveFile(); //更换最近打开 DesignerEnvManager.getEnvManager().replaceRecentOpenedFilePath(oldName, this.getPath()); @@ -1154,7 +1153,12 @@ public abstract class JTemplate> * @return 预览模式 */ public PreviewProvider[] supportPreview() { - return new PreviewProvider[0]; + return ExtraDesignClassManager.getInstance().getTemplatePreviews(new Filter() { + @Override + public boolean accept(PreviewProvider previewProvider) { + return previewProvider.accept(JTemplate.this); + } + }); } /** diff --git a/designer-base/src/test/java/com/fr/design/ExtraDesignClassManagerTest.java b/designer-base/src/test/java/com/fr/design/ExtraDesignClassManagerTest.java index 89f4ee1b2..781a5ee92 100644 --- a/designer-base/src/test/java/com/fr/design/ExtraDesignClassManagerTest.java +++ b/designer-base/src/test/java/com/fr/design/ExtraDesignClassManagerTest.java @@ -62,7 +62,9 @@ public class ExtraDesignClassManagerTest extends TestCase { return toolbarItemProvider.accept(jTemplate); } }); + WidgetOption[] widgetOptions1 = ExtraDesignClassManager.getInstance().getWebWidgetOptions(set, null); Assert.assertEquals(1, widgetOptions.length); + Assert.assertEquals(2, widgetOptions1.length); } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index a37a1c466..a5b76e1fc 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -937,7 +937,8 @@ public class JForm extends JTemplate implements BaseJForm { */ @Override public PreviewProvider[] supportPreview() { - Set set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING); + PreviewProvider[] templatePreviews = super.supportPreview(); return ArrayUtils.addAll(new PreviewProvider[]{ new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview(), new MobilePreview() - }, set.toArray(new PreviewProvider[set.size()])); + }, templatePreviews); } /** From 0f1d7aa907bbe1b49dda183b3af90eed6e5e906a Mon Sep 17 00:00:00 2001 From: zack Date: Wed, 6 Nov 2019 22:06:52 +0800 Subject: [PATCH 16/54] rt --- .../test/java/com/fr/design/ExtraDesignClassManagerTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer-base/src/test/java/com/fr/design/ExtraDesignClassManagerTest.java b/designer-base/src/test/java/com/fr/design/ExtraDesignClassManagerTest.java index 781a5ee92..8d996611e 100644 --- a/designer-base/src/test/java/com/fr/design/ExtraDesignClassManagerTest.java +++ b/designer-base/src/test/java/com/fr/design/ExtraDesignClassManagerTest.java @@ -9,7 +9,6 @@ import com.fr.design.gui.core.WidgetOption; import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JVirtualTemplate; import com.fr.general.ModuleContext; -import com.fr.log.FineLoggerFactory; import com.fr.report.restriction.CellCountRestriction; import com.fr.report.restriction.ReportRestrictionScene; import com.fr.restriction.Restrictions; @@ -66,7 +65,7 @@ public class ExtraDesignClassManagerTest extends TestCase { Assert.assertEquals(1, widgetOptions.length); Assert.assertEquals(2, widgetOptions1.length); } catch (Exception e) { - FineLoggerFactory.getLogger().error(e.getMessage(), e); + Assert.fail(e.getMessage()); } } } \ No newline at end of file From e0eb45ed53af6f2e502898502d61a16f4232ab41 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 7 Nov 2019 17:07:37 +0800 Subject: [PATCH 17/54] =?UTF-8?q?REPORT-23246=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E8=AE=BE=E7=BD=AE=E7=BA=B8=E5=BC=A0=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E7=84=B6=E5=90=8E=E5=90=88=E5=B9=B6=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E7=9A=84=E9=A2=9C=E8=89=B2=E4=BC=9A=E5=8F=98=E7=99=BD=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-realize/src/main/java/com/fr/grid/GridUI.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/grid/GridUI.java b/designer-realize/src/main/java/com/fr/grid/GridUI.java index 1bb88c7b0..41ea56513 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridUI.java +++ b/designer-realize/src/main/java/com/fr/grid/GridUI.java @@ -477,7 +477,14 @@ public class GridUI extends ComponentUI { this.tmpRectangle.getHeight() - 1); // peter:对于合并的单元格,需要先白色的背景来清除背景. if (tmpCellElement.getColumnSpan() > 1 || tmpCellElement.getRowSpan() > 1) { - WHITE_Backgorund.paint(g2d, this.cell_back_rect); + // REPORT-23492 要看下是否设置了纸张背景 如果设置了按照背景来画 + ReportSettingsProvider reportSettings = getReportSettings(reportPane.getEditingElementCase()); + Background currentBackground = reportSettings.getBackground(); + if (currentBackground != null) { + currentBackground.paint(g2d, this.cell_back_rect); + } else { + WHITE_Backgorund.paint(g2d, this.cell_back_rect); + } //daniel:上面这里就有问题了啊....报表的背景在这个之前画的 会覆盖报表背景....不过只是设计器中看到预览浏览没问题 } // peter:将这个元素添加到需要paint的元素列表当中去,留着画边框线.. From c68dc8671749787e0ea12a90291e4c0bf1d9a5b7 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 7 Nov 2019 17:15:33 +0800 Subject: [PATCH 18/54] fix --- designer-realize/src/main/java/com/fr/grid/GridUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/grid/GridUI.java b/designer-realize/src/main/java/com/fr/grid/GridUI.java index 41ea56513..1ae96b61b 100644 --- a/designer-realize/src/main/java/com/fr/grid/GridUI.java +++ b/designer-realize/src/main/java/com/fr/grid/GridUI.java @@ -478,7 +478,7 @@ public class GridUI extends ComponentUI { // peter:对于合并的单元格,需要先白色的背景来清除背景. if (tmpCellElement.getColumnSpan() > 1 || tmpCellElement.getRowSpan() > 1) { // REPORT-23492 要看下是否设置了纸张背景 如果设置了按照背景来画 - ReportSettingsProvider reportSettings = getReportSettings(reportPane.getEditingElementCase()); + ReportSettingsProvider reportSettings = getReportSettings(report); Background currentBackground = reportSettings.getBackground(); if (currentBackground != null) { currentBackground.paint(g2d, this.cell_back_rect); From ee6768d929124dc29f25c219159382a19dba38e4 Mon Sep 17 00:00:00 2001 From: vito Date: Thu, 7 Nov 2019 20:02:03 +0800 Subject: [PATCH 19/54] =?UTF-8?q?REPORT-22595=E3=80=9010.0.4=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E3=80=91=E5=BC=80=E5=8F=91=E8=80=85=E9=B8=A3?= =?UTF-8?q?=E8=B0=A2=EF=BC=8C=E6=94=BE=E5=88=B0=E5=90=AF=E5=8A=A8=E5=9B=BE?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E4=B8=8B=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/common/SplashPane.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/common/SplashPane.java b/designer-realize/src/main/java/com/fr/start/common/SplashPane.java index a96efe76f..bbd0cab0f 100644 --- a/designer-realize/src/main/java/com/fr/start/common/SplashPane.java +++ b/designer-realize/src/main/java/com/fr/start/common/SplashPane.java @@ -28,10 +28,10 @@ public class SplashPane extends JPanel { private static final Color MODULE_COLOR = new Color(255, 255, 255); private static final int MODULE_INFO_X = uiScale(36); - private static final int MODULE_INFO_Y = uiScale(339); + private static final int MODULE_INFO_Y = uiScale(300); private static final Color THANK_COLOR = new Color(255, 255, 255, (int) (0.6 * 255 + 0.5)); - private static final int THANK_INFO_X = uiScale(470); + private static final int THANK_INFO_Y = uiScale(340); private static final int FONT_SIZE = uiScale(12); private static final int MODULE_INFO_WIDTH = uiScale(150); @@ -84,7 +84,7 @@ public class SplashPane extends JPanel { //感谢用户信息 if (StringUtils.isNotEmpty(thanksLog)) { g.setPaint(THANK_COLOR); - GraphHelper.drawString(g, thanksLog, THANK_INFO_X, MODULE_INFO_Y); + GraphHelper.drawString(g, thanksLog, MODULE_INFO_X, THANK_INFO_Y); } config.restore(); } @@ -114,7 +114,7 @@ public class SplashPane extends JPanel { void updateThanksLog(String text) { thanksLog = text; - repaint(THANK_INFO_X, MODULE_INFO_Y - FONT_SIZE, MODULE_INFO_WIDTH, MODULE_INFO_HEIGHT); + repaint(MODULE_INFO_X, THANK_INFO_Y - FONT_SIZE, MODULE_INFO_WIDTH, MODULE_INFO_HEIGHT); } } From b7d2d199ec1c4da5f06c7f41aa9fe98a2ee447cd Mon Sep 17 00:00:00 2001 From: "Joe.Jiang" Date: Mon, 11 Nov 2019 10:53:13 +0800 Subject: [PATCH 20/54] =?UTF-8?q?REPORT-23627=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E9=A2=9C=E8=89=B2=E8=AE=BE=E7=BD=AE=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E9=A1=B5=E9=9D=A2=E4=B8=ADRGB=E5=92=8CHSL=E4=BA=92?= =?UTF-8?q?=E7=9B=B8=E8=BD=AC=E6=8D=A2=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../style/color/CustomChooserPanel.java | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java b/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java index 79ecdc946..49a3a9125 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java +++ b/designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java @@ -142,13 +142,13 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec */ private static final UILabel B = new UILabel("B"); - private static final int H_MAX = 365; + private static final int H_MAX = 360; private static final int S_MAX = 100; - private static final int L_MAX = 100; + private static final int B_MAX = 100; private static final float HSPINNER_VALUE = 360f; private static final float SSPINNER_VALUE = 100f; - private static final float LSPINNER_VALUE = 100f; + private static final float BSPINNER_VALUE = 100f; private static final int BINARY_FOR_EIGHT = 255; private static final int BINARY_FOR_FOUR = 16; @@ -321,7 +321,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec internalChange = true; sSpinner.setValue(new Integer((int) (s * S_MAX))); internalChange = false; - bSpinner.setValue(new Integer((int) (b * L_MAX))); + bSpinner.setValue(new Integer((int) (b * B_MAX))); revalidate(); } @@ -338,7 +338,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec internalChange = true; hSpinner.setValue(new Integer((int) (h * H_MAX))); internalChange = false; - bSpinner.setValue(new Integer((int) (b * L_MAX))); + bSpinner.setValue(new Integer((int) (b * B_MAX))); revalidate(); } @@ -431,7 +431,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec } /** - * hsl 监听 + * hsb 监听 */ class ImageScrollListener implements ChangeListener { /** @@ -506,7 +506,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec null); internalChange = true; - adjustHSLValue(hsbVals); + adjustHSBValue(hsbVals); internalChange = false; @@ -521,11 +521,11 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec updateHexFields(); } - private void adjustHSLValue(float[] hsbVals) { + private void adjustHSBValue(float[] hsbVals) { if (!spinnerTrigger) { hSpinner.setValue(new Integer((int) (hsbVals[0] * HSPINNER_VALUE))); sSpinner.setValue(new Integer((int) (hsbVals[1] * SSPINNER_VALUE))); - bSpinner.setValue(new Integer((int) (hsbVals[2] * LSPINNER_VALUE))); + bSpinner.setValue(new Integer((int) (hsbVals[2] * BSPINNER_VALUE))); } switch (locked) { case HLOCKED: @@ -536,7 +536,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec gradientPoint.x = (int) ((1 - ((Number) sSpinner.getValue()).intValue() / SSPINNER_VALUE) * IMG_WIDTH); gradientPoint.y = (int) ((1 - - ((Number) bSpinner.getValue()).intValue() / LSPINNER_VALUE) * IMG_HEIGHT); + - ((Number) bSpinner.getValue()).intValue() / BSPINNER_VALUE) * IMG_HEIGHT); } break; case SLOCKED: @@ -546,7 +546,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec if (!handlingMouse) { gradientPoint.x = (int) (((Number) hSpinner.getValue()).intValue() / HSPINNER_VALUE * IMG_WIDTH); gradientPoint.y = (int) ((1 - - ((Number) bSpinner.getValue()).intValue() / LSPINNER_VALUE) * IMG_HEIGHT); + - ((Number) bSpinner.getValue()).intValue() / BSPINNER_VALUE) * IMG_HEIGHT); } break; case BLOCKED: @@ -565,7 +565,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec private void updateImageAndTrack() { float h = ((Number) hSpinner.getValue()).intValue() / HSPINNER_VALUE; float s = ((Number) sSpinner.getValue()).intValue() / SSPINNER_VALUE; - float b = ((Number) bSpinner.getValue()).intValue() / LSPINNER_VALUE; + float b = ((Number) bSpinner.getValue()).intValue() / BSPINNER_VALUE; spinnerTrigger = true; getColorSelectionModel().setSelectedColor(new Color(Color.HSBtoRGB(h, s, b))); @@ -691,11 +691,11 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec container.add(label); container.add(mainPanel); - // hsl和rgb面板 - JPanel hslAndRgbPanel = new JPanel(); - hslAndRgbPanel.setLayout(new BorderLayout(0, 16)); - hslAndRgbPanel.add(initialHSLPanel(), BorderLayout.CENTER); - hslAndRgbPanel.add(initialRGBPanel(), BorderLayout.SOUTH); + // hsb和rgb面板 + JPanel hsbAndRgbPanel = new JPanel(); + hsbAndRgbPanel.setLayout(new BorderLayout(0, 16)); + hsbAndRgbPanel.add(initialHSBPanel(), BorderLayout.CENTER); + hsbAndRgbPanel.add(initialRGBPanel(), BorderLayout.SOUTH); // 十六进制面板 JPanel hexPanel = new JPanel(); @@ -703,7 +703,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec hexPanel.add(new UILabel("#")); hexPanel.add(field); - mainPanel.add(hslAndRgbPanel, BorderLayout.CENTER); + mainPanel.add(hsbAndRgbPanel, BorderLayout.CENTER); mainPanel.add(hexPanel, BorderLayout.SOUTH); JPanel rightPane = new JPanel(new BorderLayout()); @@ -719,11 +719,11 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec return container; } - //初始化HSL部分 - private JPanel initialHSLPanel() { + //初始化HSB部分 + private JPanel initialHSBPanel() { hRadio = new UIRadioButton("H"); sRadio = new UIRadioButton("S"); - bRadio = new UIRadioButton("L"); + bRadio = new UIRadioButton("B"); ButtonGroup group = new ButtonGroup(); group.add(hRadio); group.add(sRadio); @@ -748,27 +748,27 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec sSpinner.addChangeListener(scroll); bSpinner.addChangeListener(scroll); - JPanel hslPanel = new JPanel(); - hslPanel.setLayout(new GridLayout(3, 0, 0, 5)); + JPanel hsbPanel = new JPanel(); + hsbPanel.setLayout(new GridLayout(3, 0, 0, 5)); JPanel hPanel = new JPanel(); hPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0)); hPanel.add(hRadio); hPanel.add(hSpinner); - hslPanel.add(hPanel); + hsbPanel.add(hPanel); JPanel sPanel = new JPanel(); sPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0)); sPanel.add(sRadio); sPanel.add(sSpinner); - hslPanel.add(sPanel); + hsbPanel.add(sPanel); JPanel lPanel = new JPanel(); lPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0)); lPanel.add(bRadio); lPanel.add(bSpinner); - hslPanel.add(lPanel); - return hslPanel; + hsbPanel.add(lPanel); + return hsbPanel; } private JPanel initialRGBPanel() { @@ -856,7 +856,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec */ private void updateBLockImage() { int[] pix = new int[IMG_WIDTH * IMG_HEIGHT]; - float bValue = ((Number) bSpinner.getValue()).intValue() / LSPINNER_VALUE; + float bValue = ((Number) bSpinner.getValue()).intValue() / BSPINNER_VALUE; int index = 0; for (int j = 0; j < IMG_HEIGHT; j++) { @@ -1028,7 +1028,7 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec int[] trackPix = new int[TRACK_WIDTH * IMG_HEIGHT]; float hValue = ((Number) hSpinner.getValue()).intValue() / HSPINNER_VALUE; - float bValue = ((Number) bSpinner.getValue()).intValue() / LSPINNER_VALUE; + float bValue = ((Number) bSpinner.getValue()).intValue() / BSPINNER_VALUE; int trackIndex = 0; for (int j = 0; j < IMG_HEIGHT; j++) { From 972fce709738b5327a38c1f5f818565fd6eac95b Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 11 Nov 2019 15:04:52 +0800 Subject: [PATCH 21/54] =?UTF-8?q?Mobile-23948=20=E4=B8=8A=E8=8F=9C?= =?UTF-8?q?=E5=8D=95tab=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobile/ui/UpMenuStyleDefinePane.java | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java index be8ff823a..f0364f555 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java @@ -5,10 +5,12 @@ import com.fr.design.constants.LayoutConstants; import com.fr.design.designer.IntervalConstants; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.widget.UITitleSplitLine; import com.fr.design.mainframe.widget.preview.MobileTemplatePreviewPane; +import com.fr.design.utils.gui.UIComponentUtils; import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.general.FRFont; @@ -20,21 +22,14 @@ import javax.swing.ButtonGroup; import javax.swing.JPanel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.Component; -import java.awt.Dimension; -import java.awt.FontMetrics; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.RenderingHints; -import java.awt.Stroke; +import java.awt.*; public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { private UIRadioButton gapFix; private UIRadioButton titleWidthFix; private LinePane bottomBorderPane; private LinePane underLinePane; + private UISpinner minTabWidth; public UpMenuStyleDefinePane(WCardTagLayout tagLayout) { super(tagLayout); @@ -44,6 +39,10 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { JPanel panel = super.createCenterPane(); UILabel displayGap = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Display_Gap")); displayGap.setPreferredSize(new Dimension(55, 20)); + UILabel tabWidthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Tab_Min_Width")); + tabWidthLabel.setPreferredSize(new Dimension(75, 20)); + minTabWidth = new UISpinner(0, Integer.MAX_VALUE, 1, 92); + JPanel tabWidthPanel = UIComponentUtils.wrapWithBorderLayoutPane(minTabWidth); gapFix = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Gap_Fix")); titleWidthFix = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Title_Width_Fix")); ButtonGroup buttonGroup = new ButtonGroup(); @@ -72,9 +71,13 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{displayGap, flowLeft}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20)); centerPane.setPreferredSize(new Dimension(500, 20)); - JPanel outerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - outerPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 15, 0)); - outerPane.add(centerPane, BorderLayout.CENTER); + JPanel wrapTabWidthPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{tabWidthLabel, tabWidthPanel}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); + wrapTabWidthPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20)); + wrapTabWidthPanel.setPreferredSize(new Dimension(200, 20)); + JPanel outerPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10); + outerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 5, 20));; + outerPane.add(centerPane); + outerPane.add(wrapTabWidthPanel); panel.add(outerPane); return panel; } @@ -125,6 +128,7 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { UpMenuStyle style = (UpMenuStyle) ob; gapFix.setSelected(style.isGapFix()); titleWidthFix.setSelected(style.isTitleWidthFix()); + minTabWidth.setValueWithoutEvent(style.getMinTabWidth()); bottomBorderPane.populate(style.getBottomBorder()); underLinePane.populate(style.getUnderline()); } @@ -140,6 +144,7 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { UpMenuStyle style = new UpMenuStyle(); style.setGapFix(gapFix.isSelected()); style.setTitleWidthFix(titleWidthFix.isSelected()); + style.setMinTabWidth((int) minTabWidth.getValue()); style.setBottomBorder(bottomBorderPane.update()); style.setUnderline(underLinePane.update()); return style; From 18b35deef881a9659f94bb5cad49a7623b43eba1 Mon Sep 17 00:00:00 2001 From: Bryant Date: Mon, 11 Nov 2019 15:23:19 +0800 Subject: [PATCH 22/54] =?UTF-8?q?REPORT-22108=20=E8=BF=99=E9=87=8C?= =?UTF-8?q?=E5=86=99=E6=AD=BB=E4=BA=86=EF=BC=8C=E4=B8=80=E6=97=A6=E8=B6=85?= =?UTF-8?q?=E8=BF=87=E4=BA=8630=E8=A1=8C=E5=B0=B1=E4=BC=9A=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/tabledata/tabledatapane/EmbeddedTableDataPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java index cb6c63a36..a506e86f8 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java @@ -220,7 +220,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane Date: Mon, 11 Nov 2019 15:34:38 +0800 Subject: [PATCH 23/54] =?UTF-8?q?REPORT-22108=20=E8=BF=99=E9=87=8C?= =?UTF-8?q?=E5=86=99=E6=AD=BB=E4=BA=86=EF=BC=8C=E4=B8=80=E6=97=A6=E8=B6=85?= =?UTF-8?q?=E8=BF=87=E4=BA=8630=E5=88=97=E5=B0=B1=E4=BC=9A=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java | 2 +- .../data/tabledata/tabledatapane/EmbeddedTableDataPane.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java index 48d36e247..6a3b707ab 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataDefinedPane.java @@ -64,7 +64,7 @@ public class EmbeddedTableDataDefinedPane extends BasicPane{ // 行号显示 TableColumn tableColumn = dataJTable.getColumnModel().getColumn(0); tableColumn.setCellRenderer(new CellRenderer()); - tableColumn.setMaxWidth(30); + tableColumn.setMaxWidth(dataJTable.getColumnCount()); // 控制按钮 add = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add")); diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java index a506e86f8..afefe7264 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/EmbeddedTableDataPane.java @@ -220,7 +220,7 @@ public class EmbeddedTableDataPane extends AbstractTableDataPane Date: Tue, 12 Nov 2019 11:46:49 +0800 Subject: [PATCH 24/54] =?UTF-8?q?REPORT-22462=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E6=97=A5=E6=96=87=E3=80=81=E9=9F=A9=E6=96=87=E7=89=88?= =?UTF-8?q?=E6=BF=80=E6=B4=BB=E9=A1=B5=E9=93=BE=E6=8E=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/locale/impl/UserInfoMark.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/locale/impl/UserInfoMark.java b/designer-base/src/main/java/com/fr/design/locale/impl/UserInfoMark.java index 3739c49f6..c72f6a4ff 100644 --- a/designer-base/src/main/java/com/fr/design/locale/impl/UserInfoMark.java +++ b/designer-base/src/main/java/com/fr/design/locale/impl/UserInfoMark.java @@ -19,10 +19,11 @@ public class UserInfoMark implements LocaleMark { private static final String EN_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.en"); private static final String TW_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.tw"); private static final String JP_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.jp"); + private static final String KR_LOGIN_HTML = CloudCenter.getInstance().acquireUrlByKind("frlogin.kr"); public UserInfoMark() { map.put(Locale.CHINA, CN_LOGIN_HTML); - map.put(Locale.KOREA, EN_LOGIN_HTML); + map.put(Locale.KOREA, KR_LOGIN_HTML); map.put(Locale.JAPAN, JP_LOGIN_HTML); map.put(Locale.US, EN_LOGIN_HTML); map.put(Locale.TAIWAN, TW_LOGIN_HTML); From 7e5e7816510f17f572ce4a99ef2dbd293fcff788 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 12 Nov 2019 17:20:36 +0800 Subject: [PATCH 25/54] =?UTF-8?q?MOBILE-23952=20=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=94=AF=E6=8C=81=E5=8F=AA=E8=83=BD=E6=89=AB?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/ibutton/ModeButtonGroup.java | 36 +++++++++++++++ .../mobile/ScanCodeMobileDefinePane.java | 44 +++++++++++++------ .../widget/ui/mobile/ScanCodeMobilePane.java | 42 ++++++++++++------ 3 files changed, 94 insertions(+), 28 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/gui/ibutton/ModeButtonGroup.java diff --git a/designer-base/src/main/java/com/fr/design/gui/ibutton/ModeButtonGroup.java b/designer-base/src/main/java/com/fr/design/gui/ibutton/ModeButtonGroup.java new file mode 100644 index 000000000..c13498705 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/gui/ibutton/ModeButtonGroup.java @@ -0,0 +1,36 @@ +package com.fr.design.gui.ibutton; + + +import javax.swing.*; +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * 互斥的按钮 + * @author hades + * @version 10.0 + * Created by hades on 2019/11/12 + */ +public class ModeButtonGroup extends ButtonGroup { + + private Map buttonMap = new LinkedHashMap<>(); + + public void put(T t, AbstractButton button) { + add(button); + buttonMap.put(t, button); + } + + public void setSelectButton(T t) { + buttonMap.get(t).setSelected(true); + } + + public T getCurrentSelected() { + for (Map.Entry entry : buttonMap.entrySet()) { + if (entry.getValue().isSelected()) { + return entry.getKey(); + } + } + return buttonMap.entrySet().iterator().next().getKey(); + } + +} diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ScanCodeMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ScanCodeMobileDefinePane.java index dfa902d86..444569fbc 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ScanCodeMobileDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ScanCodeMobileDefinePane.java @@ -1,24 +1,24 @@ package com.fr.design.widget.ui.designer.mobile; import com.fr.base.mobile.MobileScanCodeAttr; -import com.fr.base.mobile.ScanCodeState; +import com.fr.base.mobile.TextInputMode; import com.fr.design.designer.creator.XCreator; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.frpane.AttributeChangeListener; -import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ibutton.ModeButtonGroup; +import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.FormDesigner; import com.fr.form.ui.TextEditor; -import javax.swing.BorderFactory; -import javax.swing.JPanel; -import java.awt.BorderLayout; +import javax.swing.*; +import java.awt.*; public class ScanCodeMobileDefinePane extends MobileWidgetDefinePane { private XCreator xCreator; - private UICheckBox appScanCodeCheck; + private ModeButtonGroup buttonGroup; public ScanCodeMobileDefinePane(XCreator xCreator) { this.xCreator = xCreator; @@ -33,14 +33,31 @@ public class ScanCodeMobileDefinePane extends MobileWidgetDefinePane { } private UIExpandablePane getMobileSettingsPane() { - JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - appScanCodeCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Support_Scan_Code"), true); - appScanCodeCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + JPanel panel = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10); + buttonGroup = new ModeButtonGroup<>(); + UIRadioButton scanCodeAndManualInput = new UIRadioButton( + com.fr.design.i18n.Toolkit.i18nText("Fine-Design__Mobile_Support_Scan_Code_And_Manual_Input"), true); + UIRadioButton onlyManualInput = new UIRadioButton( + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Only_Support_Manual_Input"), false); + UIRadioButton onlyScanCodeInput = new UIRadioButton( + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Only_Support_Scan_Code_Input"), false); + scanCodeAndManualInput.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + onlyManualInput.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + onlyScanCodeInput.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + buttonGroup.put(TextInputMode.SUPPORT_SCAN_CODE_And_MANUAL, scanCodeAndManualInput); + buttonGroup.put(TextInputMode.ONLY_SUPPORT_MANUAL, onlyManualInput); + buttonGroup.put(TextInputMode.ONLY_SUPPORT_SCAN_CODE, onlyScanCodeInput); + buttonGroup.add(scanCodeAndManualInput); + buttonGroup.add(onlyManualInput); + buttonGroup.add(onlyScanCodeInput); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); - panel.add(appScanCodeCheck); + panel.add(scanCodeAndManualInput); + panel.add(onlyManualInput); + panel.add(onlyScanCodeInput); final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane(); panelWrapper.add(panel, BorderLayout.NORTH); - return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, panelWrapper); + return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, + panelWrapper); } private void bindListeners2Widgets() { @@ -61,15 +78,14 @@ public class ScanCodeMobileDefinePane extends MobileWidgetDefinePane { @Override public void populate(FormDesigner designer) { MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) xCreator.toData()).getMobileScanCodeAttr(); - ScanCodeState scanCodeState = mobileScanCodeAttr.getScanCodeState(); - appScanCodeCheck.setSelected(scanCodeState.getState()); + buttonGroup.setSelectButton(mobileScanCodeAttr.getTextInputMode()); this.bindListeners2Widgets(); } @Override public void update() { MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) xCreator.toData()).getMobileScanCodeAttr(); - mobileScanCodeAttr.setScanCodeState(ScanCodeState.parse(appScanCodeCheck.isSelected())); + mobileScanCodeAttr.setTextInputMode(buttonGroup.getCurrentSelected()); DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); } diff --git a/designer-realize/src/main/java/com/fr/design/widget/ui/mobile/ScanCodeMobilePane.java b/designer-realize/src/main/java/com/fr/design/widget/ui/mobile/ScanCodeMobilePane.java index e9c798ec9..74807add9 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/ui/mobile/ScanCodeMobilePane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/ui/mobile/ScanCodeMobilePane.java @@ -1,49 +1,63 @@ package com.fr.design.widget.ui.mobile; import com.fr.base.mobile.MobileScanCodeAttr; -import com.fr.base.mobile.ScanCodeState; +import com.fr.base.mobile.TextInputMode; import com.fr.design.foldablepane.UIExpandablePane; -import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ibutton.ModeButtonGroup; +import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.widget.mobile.WidgetMobilePane; import com.fr.form.ui.TextEditor; import com.fr.form.ui.Widget; -import javax.swing.BorderFactory; -import javax.swing.JPanel; -import java.awt.BorderLayout; +import javax.swing.*; +import java.awt.*; public class ScanCodeMobilePane extends WidgetMobilePane { - private UICheckBox appScanCodeCheck; + private ModeButtonGroup buttonGroup; + @Override protected void init() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.add(getMobileSettingPane(), BorderLayout.NORTH); } private UIExpandablePane getMobileSettingPane() { - JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - appScanCodeCheck = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Support_Scan_Code"), true); - appScanCodeCheck.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + JPanel panel = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10); + buttonGroup = new ModeButtonGroup<>(); + UIRadioButton scanCodeAndManualInput = new UIRadioButton( + com.fr.design.i18n.Toolkit.i18nText("Fine-Design__Mobile_Support_Scan_Code_And_Manual_Input"), true); + UIRadioButton onlyManualInput = new UIRadioButton( + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Only_Support_Manual_Input"), false); + UIRadioButton onlyScanCodeInput = new UIRadioButton( + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Only_Support_Scan_Code_Input"), false); + scanCodeAndManualInput.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + onlyManualInput.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + onlyScanCodeInput.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + buttonGroup.put(TextInputMode.SUPPORT_SCAN_CODE_And_MANUAL, scanCodeAndManualInput); + buttonGroup.put(TextInputMode.ONLY_SUPPORT_MANUAL, onlyManualInput); + buttonGroup.put(TextInputMode.ONLY_SUPPORT_SCAN_CODE, onlyScanCodeInput); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); - panel.add(appScanCodeCheck); + panel.add(scanCodeAndManualInput); + panel.add(onlyManualInput); + panel.add(onlyScanCodeInput); final JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane(); panelWrapper.add(panel, BorderLayout.NORTH); - return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, panelWrapper); + return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, + panelWrapper); } @Override public void populate(Widget widget) { MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) widget).getMobileScanCodeAttr(); - ScanCodeState scanCodeState = mobileScanCodeAttr.getScanCodeState(); - appScanCodeCheck.setSelected(scanCodeState.getState()); + buttonGroup.setSelectButton(mobileScanCodeAttr.getTextInputMode()); } @Override public void update(Widget widget) { MobileScanCodeAttr mobileScanCodeAttr = ((TextEditor) widget).getMobileScanCodeAttr(); - mobileScanCodeAttr.setScanCodeState(ScanCodeState.parse(appScanCodeCheck.isSelected())); + mobileScanCodeAttr.setTextInputMode(buttonGroup.getCurrentSelected()); } From 3a64382ff90794f3e3176b8a04e83cdea2246587 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 12 Nov 2019 17:22:18 +0800 Subject: [PATCH 26/54] fix --- .../fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java index f0364f555..eb50df659 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java @@ -75,7 +75,7 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { wrapTabWidthPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20)); wrapTabWidthPanel.setPreferredSize(new Dimension(200, 20)); JPanel outerPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10); - outerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 5, 20));; + outerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 5, 20)); outerPane.add(centerPane); outerPane.add(wrapTabWidthPanel); panel.add(outerPane); From 567ce9609c3f818bc351cb77fc6825e3b1dc75dc Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 13 Nov 2019 16:10:08 +0800 Subject: [PATCH 27/54] =?UTF-8?q?REPORT-23496=20=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E7=89=88=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=93=BE=E6=8E=A5=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/locale/impl/VideoMark.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/locale/impl/VideoMark.java b/designer-base/src/main/java/com/fr/design/locale/impl/VideoMark.java index 2071faba3..8e086a569 100644 --- a/designer-base/src/main/java/com/fr/design/locale/impl/VideoMark.java +++ b/designer-base/src/main/java/com/fr/design/locale/impl/VideoMark.java @@ -15,9 +15,9 @@ import java.util.Map; public class VideoMark implements LocaleMark { private Map map = new HashMap<>(); - private static final String VIDEO_EN = CloudCenter.getInstance().acquireUrlByKind("bbs.video.en"); - private static final String VIDEO_CN = CloudCenter.getInstance().acquireUrlByKind("bbs.video"); - private static final String VIDEO_TW = CloudCenter.getInstance().acquireUrlByKind("bbs.video.tw"); + private static final String VIDEO_EN = CloudCenter.getInstance().acquireUrlByKind("bbs.video.en_US"); + private static final String VIDEO_CN = CloudCenter.getInstance().acquireUrlByKind("bbs.video.zh_CN"); + private static final String VIDEO_TW = CloudCenter.getInstance().acquireUrlByKind("bbs.video.zh_TW"); public VideoMark() { map.put(Locale.CHINA, VIDEO_CN); From 514f3e64081b9cee67dee5c11bac5878fbd42e48 Mon Sep 17 00:00:00 2001 From: "Joe.Jiang" Date: Thu, 14 Nov 2019 14:54:03 +0800 Subject: [PATCH 28/54] =?UTF-8?q?REPORT-17192=20=E6=A8=A1=E6=9D=BFWeb?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E4=B8=AD=EF=BC=8C=E5=88=86=E9=A1=B5=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E8=AE=BE=E7=BD=AE=EF=BC=8C=E9=87=87=E7=94=A8=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=99=A8=E8=AE=BE=E7=BD=AE=E5=8F=8C=E5=87=BB=E7=BD=AE?= =?UTF-8?q?=E7=81=B0=E5=B7=A5=E5=85=B7=E6=A0=8F=E5=8F=AF=E5=BC=B9=E5=87=BA?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/webattr/ToolBarDragPane.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java index fc3d81352..a8cd06a9b 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/ToolBarDragPane.java @@ -227,6 +227,15 @@ public class ToolBarDragPane extends WidgetToolBarPane { GUICoreUtils.setEnabled(this, b); isEnabled = b; removeAllListener(northToolBar.getToolBarButtons()); + removeAllListener(southToolBar.getToolBarButtons()); + removeToolBarListener(northToolBar); + removeToolBarListener(southToolBar); + } + + private void removeToolBarListener(ToolBarPane toolBarPane) { + if (!isEnabled) { + toolBarPane.removeDefaultMouseListener(); + } } private void removeAllListener(List toolBarButtons) { From 03e9ea5e795a9f50ebf318dba90666fbe1bddd87 Mon Sep 17 00:00:00 2001 From: "Joe.Jiang" Date: Thu, 14 Nov 2019 17:02:43 +0800 Subject: [PATCH 29/54] =?UTF-8?q?REPORT-22046=20cpt=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=86=BB=E7=BB=93=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E6=9C=89=E4=B8=AA=E9=94=99=E8=AF=AF=E7=9A=84=E5=BC=95=E5=AF=BC?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/report/freeze/RepeatAndFreezeSettingPane.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java index 3fc32f575..17cf8566a 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java @@ -214,14 +214,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane { JPanel repeatPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); repeatPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); JPanel freezePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); - - //自适应插件 -/* if (shouldShowTip()) { - JPanel infoPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attention")); - BoxCenterAligmentPane actionLabel = getURLActionLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Form_Fit_Tip")); - infoPane.add(actionLabel, BorderLayout.SOUTH); - this.add(infoPane, BorderLayout.SOUTH); - }*/ + outfreezePanel.add(freezePanel); // 重复打印部分 // 重复打印标题的起始行 From 70ced0541513faf67c3da3c237177fb0dea795e3 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 15 Nov 2019 15:51:21 +0800 Subject: [PATCH 30/54] =?UTF-8?q?MOBILE-23948=20UI=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobile/ui/UpMenuStyleDefinePane.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java index eb50df659..d096471a7 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java @@ -51,29 +51,29 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf { gapFix.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); titleWidthFix.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); buttonGroup.add(titleWidthFix); + JPanel flowLeft = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); + flowLeft.add(gapFix); + flowLeft.add(titleWidthFix); + JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{displayGap, flowLeft}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); + centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20)); + centerPane.setPreferredSize(new Dimension(500, 20)); + final JPanel wrapTabWidthPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{tabWidthLabel, tabWidthPanel}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); + wrapTabWidthPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20)); + wrapTabWidthPanel.setPreferredSize(new Dimension(200, 20)); gapFix.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { updatePreviewPane(); + wrapTabWidthPanel.setVisible(titleWidthFix.isSelected()); } }); titleWidthFix.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { updatePreviewPane(); + wrapTabWidthPanel.setVisible(titleWidthFix.isSelected()); } }); - - - JPanel flowLeft = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane(); - flowLeft.add(gapFix); - flowLeft.add(titleWidthFix); - JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{displayGap, flowLeft}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); - centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20)); - centerPane.setPreferredSize(new Dimension(500, 20)); - JPanel wrapTabWidthPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{tabWidthLabel, tabWidthPanel}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM); - wrapTabWidthPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20)); - wrapTabWidthPanel.setPreferredSize(new Dimension(200, 20)); JPanel outerPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10); outerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 5, 20)); outerPane.add(centerPane); From b784ae0156c756578d4126b8996d041e92b77fe2 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 18 Nov 2019 15:04:46 +0800 Subject: [PATCH 31/54] =?UTF-8?q?REPORT-24098=20=E7=A8=B3=E5=AE=9A?= =?UTF-8?q?=E5=85=B1=E5=88=9B=EF=BC=9A=E8=AE=BE=E8=AE=A1=E5=99=A8=E4=B8=80?= =?UTF-8?q?=E6=89=93=E5=BC=80=E6=A8=A1=E6=9D=BF=E5=B0=B1=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=93=8D=E4=BD=9C=EF=BC=8C=E6=9C=AA=E5=81=9A?= =?UTF-8?q?=E4=BB=BB=E4=BD=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/icombocheckbox/UIComboCheckBox.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java b/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java index e570ee515..9d69f2247 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java @@ -132,7 +132,17 @@ public class UIComboCheckBox extends JComponent implements UIObserver, GlobalNam } private UITextField createEditor() { - UITextField editor = new UITextField(); + UITextField editor = new UITextField() { + @Override + protected void initListener() { + this.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + attributeChange(); + } + }); + } + }; editor.setEditable(false); editor.setPreferredSize(new Dimension(110, 20)); addPopupListener(editor); From 1b087b977c4ab93720cd5a6d6d7a6ba5f1b7155b Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 19 Nov 2019 14:45:27 +0800 Subject: [PATCH 32/54] =?UTF-8?q?REPORT-7034=E3=80=90=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E3=80=91=E8=AE=BE=E8=AE=A1=E5=99=A8=E3=80=8Bfrm=E3=80=8Bbody?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E7=9A=84=E5=B8=83=E5=B1=80=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E4=BB=A5=E5=90=8E=EF=BC=8Cbody=E7=9A=84?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E4=BB=A5=E5=8F=8A=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=9D=87=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/AbstractFRLayoutDefinePane.java | 36 +++++++++++++++++++ .../FRAbsoluteBodyLayoutDefinePane.java | 4 ++- .../layout/FRAbsoluteLayoutDefinePane.java | 2 +- .../layout/FRFitLayoutDefinePane.java | 4 ++- 4 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/AbstractFRLayoutDefinePane.java diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/AbstractFRLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/AbstractFRLayoutDefinePane.java new file mode 100644 index 000000000..0a718ee60 --- /dev/null +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/AbstractFRLayoutDefinePane.java @@ -0,0 +1,36 @@ +package com.fr.design.widget.ui.designer.layout; + +import com.fr.design.designer.creator.XCreator; +import com.fr.design.mainframe.FormDesigner; +import com.fr.design.widget.ui.designer.AbstractDataModify; +import com.fr.form.ui.container.WSortLayout; + +/** + * @author hades + * @version 9.0 + * Created by hades on 2019/11/18 + */ +public abstract class AbstractFRLayoutDefinePane extends AbstractDataModify { + + + public AbstractFRLayoutDefinePane(XCreator xCreator) { + super(xCreator); + } + + public AbstractFRLayoutDefinePane(XCreator xCreator, FormDesigner designer) { + super(xCreator, designer); + } + + protected void copyLayoutAttr(WSortLayout srcLayout, WSortLayout destLayout) { + destLayout.clearListeners(); + destLayout.clearMobileWidgetList(); + for (int i = 0, len = srcLayout.getMobileWidgetListSize(); i < len; i++) { + destLayout.addMobileWidget(srcLayout.getMobileWidget(i)); + } + destLayout.setSorted(true); + for (int i = 0, len = srcLayout.getListenerSize(); i < len; i++) { + destLayout.addListener(srcLayout.getListener(i)); + } + } + +} diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java index 900334cb7..3a53cf5ff 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java @@ -131,7 +131,9 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane { if (layoutType == WBodyLayoutType.ABSOLUTE) { ((XWFitLayout) creator.getBackupParent()).toData().resetStyle(); if (state == WBodyLayoutType.FIT.getTypeValue()) { - ((XWFitLayout)creator.getBackupParent()).switch2FitBodyLayout(creator); + XWFitLayout xwFitLayout = ((XWFitLayout)creator.getBackupParent()); + xwFitLayout.switch2FitBodyLayout(creator); + copyLayoutAttr(layout, xwFitLayout.toData()); } } layout.setBorderStyle((LayoutBorderStyle) borderStyleEditor.getValue()); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java index a5dabe2f0..81c0bdc67 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java @@ -23,7 +23,7 @@ import java.awt.Component; /** * Created by ibm on 2017/8/2. */ -public class FRAbsoluteLayoutDefinePane extends AbstractDataModify { +public class FRAbsoluteLayoutDefinePane extends AbstractFRLayoutDefinePane { protected UIComboBox comboBox; public FRAbsoluteLayoutDefinePane(XCreator xCreator) { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java index ff8ef4411..73022d15d 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java @@ -34,6 +34,7 @@ import com.fr.form.ui.container.WAbsoluteBodyLayout; import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WBodyLayoutType; import com.fr.form.ui.container.WFitLayout; +import com.fr.form.ui.container.WSortLayout; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.report.core.ReportUtils; @@ -48,7 +49,7 @@ import java.awt.Dimension; /** * Created by ibm on 2017/8/2. */ -public class FRFitLayoutDefinePane extends AbstractDataModify { +public class FRFitLayoutDefinePane extends AbstractFRLayoutDefinePane { private static final int ADAPT_LABEL_MAX_WIDTH = 80; private XWFitLayout xWFitLayout; private WFitLayout wFitLayout; @@ -208,6 +209,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify { } xwAbsoluteBodyLayout.add(component); } + copyLayoutAttr(wFitLayout, wAbsoluteBodyLayout); xWFitLayout.setBackupParent(xwAbsoluteBodyLayout); FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner(); formDesigner.getSelectionModel().setSelectedCreators( From c26ec30e4b332d224143d5eacfd5271a0d14a541 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 19 Nov 2019 14:46:46 +0800 Subject: [PATCH 33/54] fix --- .../widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java | 1 - .../design/widget/ui/designer/layout/FRFitLayoutDefinePane.java | 2 -- 2 files changed, 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java index 81c0bdc67..dff0e159a 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java @@ -11,7 +11,6 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.widget.ui.designer.AbstractDataModify; import com.fr.form.ui.container.WAbsoluteLayout; import javax.swing.BorderFactory; diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java index 73022d15d..4481307bf 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java @@ -26,7 +26,6 @@ import com.fr.design.mainframe.widget.accessibles.AccessibleBodyWatermarkEditor; import com.fr.design.mainframe.widget.accessibles.AccessibleWLayoutBorderStyleEditor; import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.widget.FRWidgetFactory; -import com.fr.design.widget.ui.designer.AbstractDataModify; import com.fr.design.widget.ui.designer.component.PaddingBoundPane; import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.Widget; @@ -34,7 +33,6 @@ import com.fr.form.ui.container.WAbsoluteBodyLayout; import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WBodyLayoutType; import com.fr.form.ui.container.WFitLayout; -import com.fr.form.ui.container.WSortLayout; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; import com.fr.report.core.ReportUtils; From 668c96259ec0261f8dae20e176a1bc426a302560 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 19 Nov 2019 14:50:31 +0800 Subject: [PATCH 34/54] =?UTF-8?q?REPORT-12734=20=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E4=B8=AD=E7=9A=84=E4=B8=80=E4=BA=9B=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E8=AE=BE=E7=BD=AE=E6=97=A0=E6=95=88=2010.0=E5=90=8C?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/condition/WHPane.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/condition/WHPane.java b/designer-realize/src/main/java/com/fr/design/condition/WHPane.java index 753e3e776..e92bf212e 100644 --- a/designer-realize/src/main/java/com/fr/design/condition/WHPane.java +++ b/designer-realize/src/main/java/com/fr/design/condition/WHPane.java @@ -10,7 +10,10 @@ import com.fr.stable.Constants; import com.fr.stable.unit.*; import javax.swing.*; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; import java.math.BigDecimal; +import java.text.ParseException; /** * @author richie @@ -30,6 +33,17 @@ public abstract class WHPane extends ConditionAttrSingleConditionPane Date: Tue, 19 Nov 2019 17:54:05 +0800 Subject: [PATCH 35/54] =?UTF-8?q?REPORT-22877=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E9=9B=86?= =?UTF-8?q?=E7=BE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/file/PreferencePane.java | 38 +++++++++++++++---- .../com/fr/design/env/RemoteWorkspace.java | 8 +++- .../DesignerFrameFileDealerPane.java | 4 +- .../mainframe/vcs/common/VcsHelper.java | 5 +-- 4 files changed, 40 insertions(+), 15 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index e982d04cd..55ccfce63 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -1,7 +1,5 @@ package com.fr.design.actions.file; -import com.fr.cluster.ClusterBridge; -import com.fr.cluster.engine.base.FineClusterConfig; import com.fr.config.Configuration; import com.fr.config.ServerPreferenceConfig; import com.fr.design.DesignerEnvManager; @@ -47,10 +45,36 @@ import com.fr.workspace.WorkContext; import com.fr.workspace.server.vcs.VcsOperator; import com.fr.workspace.server.vcs.git.config.GcConfig; -import javax.swing.*; -import javax.swing.event.*; -import java.awt.*; -import java.awt.event.*; +import javax.swing.BorderFactory; +import javax.swing.BoxLayout; +import javax.swing.JDialog; +import javax.swing.JFileChooser; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JProgressBar; +import javax.swing.KeyStroke; +import javax.swing.SwingUtilities; +import javax.swing.SwingWorker; +import javax.swing.Timer; +import javax.swing.UIManager; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dialog; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.Window; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; import java.io.File; import java.text.DecimalFormat; import java.util.Locale; @@ -663,7 +687,7 @@ public class PreferencePane extends BasicPane { defaultStringToFormulaBox.setSelected(false); } VcsConfigManager vcsConfigManager = designerEnvManager.getVcsConfigManager(); - if (FineClusterConfig.getInstance().isCluster()) { + if (WorkContext.getCurrent().isCluster()) { vcsEnableCheckBox.setEnabled(false); gcEnableCheckBox.setEnabled(false); } diff --git a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java index 36d8e7f7a..6a582f1fa 100644 --- a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java +++ b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java @@ -1,5 +1,6 @@ package com.fr.design.env; +import com.fr.cluster.engine.remote.ClusterOperator; import com.fr.design.i18n.Toolkit; import com.fr.stable.AssistUtils; import com.fr.workspace.WorkContext; @@ -66,7 +67,12 @@ public class RemoteWorkspace implements Workspace { } return isRoot; } - + + @Override + public boolean isCluster() { + return WorkContext.getCurrent().get(ClusterOperator.class).isCluster(); + } + @Override public WorkspaceConnection getConnection() { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java index 207121598..f24375da1 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java @@ -3,8 +3,6 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; import com.fr.base.extension.FileExtension; import com.fr.base.vcs.DesignerMode; -import com.fr.cluster.ClusterBridge; -import com.fr.cluster.engine.base.FineClusterConfig; import com.fr.design.DesignModelAdapter; import com.fr.design.DesignerEnvManager; import com.fr.design.ExtraDesignClassManager; @@ -369,7 +367,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt private void fireVcsActionChange() { if (!DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() || VcsHelper.getInstance().isUnSelectedTemplate() - || FineClusterConfig.getInstance().isCluster()) { + || WorkContext.getCurrent().isCluster()) { setEnabled(false); return; } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java index 547ddf6ae..8229c9f8d 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java @@ -1,7 +1,5 @@ package com.fr.design.mainframe.vcs.common; -import com.fr.cluster.ClusterBridge; -import com.fr.cluster.engine.base.FineClusterConfig; import com.fr.concurrent.NamedThreadFactory; import com.fr.design.DesignerEnvManager; import com.fr.design.file.HistoryTemplateListCache; @@ -27,7 +25,6 @@ import com.fr.workspace.server.vcs.git.config.GcConfig; import javax.swing.Icon; import javax.swing.border.EmptyBorder; import java.awt.Color; - import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -174,7 +171,7 @@ public class VcsHelper implements JTemplateActionListener { public void templateSaved(JTemplate jt) { if (needInit() && DesignerEnvManager.getEnvManager().getVcsConfigManager().isVcsEnable() - && !FineClusterConfig.getInstance().isCluster()) { + && !WorkContext.getCurrent().isCluster()) { fireVcs(jt); } } From 5107f9a0b35a322ccdf2033057d10bc59416b131 Mon Sep 17 00:00:00 2001 From: Bryant Date: Wed, 20 Nov 2019 10:09:29 +0800 Subject: [PATCH 36/54] =?UTF-8?q?REPORT-24070=20=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E7=95=8C=E9=9D=A2=E7=9B=91=E5=90=AC=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/designer/creator/CRPropertyDescriptor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptor.java b/designer-base/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptor.java index e4729f070..e2470875d 100644 --- a/designer-base/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptor.java +++ b/designer-base/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptor.java @@ -4,7 +4,7 @@ package com.fr.design.designer.creator; import com.fr.stable.StringUtils; -import com.fr.stable.core.PropertyChangeAdapter; +import com.fr.stable.core.PropertyChangeListener; import java.beans.IntrospectionException; import java.beans.PropertyDescriptor; @@ -17,7 +17,7 @@ public final class CRPropertyDescriptor extends PropertyDescriptor { public static final String RENDERER = "renderer"; private boolean isSubProperty = false; - private PropertyChangeAdapter l; + private PropertyChangeListener l; public CRPropertyDescriptor(String name, Class beanClass) throws IntrospectionException { super(name, beanClass); @@ -35,7 +35,7 @@ public final class CRPropertyDescriptor extends PropertyDescriptor { return this; } - public CRPropertyDescriptor setPropertyChangeListener(PropertyChangeAdapter l) { + public CRPropertyDescriptor setPropertyChangeListener(PropertyChangeListener l) { this.l = l; return this; } From 7c5e9cc3cc715bd5b3f7738aa7304c5b147a2f7a Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 22 Nov 2019 19:53:13 +0800 Subject: [PATCH 37/54] =?UTF-8?q?REPORT-24176=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=20=E6=95=B0=E6=8D=AE=E5=AD=97=E5=85=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/DesignTableDataManager.java | 14 +++++++--- .../data/datapane/TableDataComboBox.java | 28 ++++++++++++------- .../fr/design/present/DictPresentPane.java | 7 ++++- .../design/present/dict/DictionaryPane.java | 8 +++++- .../present/dict/TableDataDictPane.java | 8 +++++- .../com/fr/design/present/PresentPane.java | 1 + 6 files changed, 49 insertions(+), 17 deletions(-) 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 0018d5333..6cf3d9062 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 @@ -20,7 +20,7 @@ import com.fr.design.data.tabledata.wrapper.TableDataFactory; import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; import com.fr.design.dialog.DialogActionAdapter; -import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.gui.iprogressbar.AutoProgressBar; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; @@ -160,13 +160,20 @@ public abstract class DesignTableDataManager { } } + public static void addDsChangeListener(ChangeListener l) { + addDsChangeListener(l, HistoryTemplateListCache.getInstance().getCurrentEditingTemplate()); + } + + public static void addGlobalDsChangeListener(ChangeListener l) { + addDsChangeListener(l, null); + } + /** * 添加模板数据集改变 监听事件. * * @param l ChangeListener监听器 */ - public static void addDsChangeListener(ChangeListener l) { - JTemplate template = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + private static void addDsChangeListener(ChangeListener l, JTemplate template) { String key = StringUtils.EMPTY; if (template != null) { key = template.getPath(); @@ -178,7 +185,6 @@ public abstract class DesignTableDataManager { } dsListeners.add(l); } - /** * 获取数据源source中dsName的所有字段 * diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java index dddb269bc..ebbdbf0f3 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataComboBox.java @@ -34,6 +34,7 @@ public class TableDataComboBox extends UIComboBox implements Prepare4DataSourceC private static final long serialVersionUID = 1L; private boolean refresModel = false; private String treeName; //树数据集本身的名字 + private ChangeListener changeListener; public TableDataComboBox(TableDataSource source){ this(source,StringUtils.EMPTY); @@ -136,15 +137,22 @@ public class TableDataComboBox extends UIComboBox implements Prepare4DataSourceC } } - /** - *注册listener,相应数据集改变 - */ - public void registerDSChangeListener() { - DesignTableDataManager.addDsChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent e) { - TableDataComboBox.this.refresh(DesignTableDataManager.getEditingTableDataSource()); - } - }); - } + /** + *注册listener,相应数据集改变 + */ + @Override + public void registerDSChangeListener() { + changeListener = new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + TableDataComboBox.this.refresh(DesignTableDataManager.getEditingTableDataSource()); + } + }; + DesignTableDataManager.addDsChangeListener(changeListener); + } + + public void registerGlobalDSChangeListener() { + DesignTableDataManager.addGlobalDsChangeListener(changeListener); + } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/present/DictPresentPane.java b/designer-base/src/main/java/com/fr/design/present/DictPresentPane.java index 17733fb1b..cba37ea19 100644 --- a/designer-base/src/main/java/com/fr/design/present/DictPresentPane.java +++ b/designer-base/src/main/java/com/fr/design/present/DictPresentPane.java @@ -5,6 +5,7 @@ import java.awt.event.ItemListener; import com.fr.base.present.DictPresent; import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.data.tabledata.Prepare4DataSourceChange; import com.fr.design.present.dict.DictionaryPane; @@ -13,7 +14,7 @@ import com.fr.design.present.dict.DictionaryPane; * @author zhou * @since 2012-5-31上午10:54:20 */ -public class DictPresentPane extends FurtherBasicBeanPane { +public class DictPresentPane extends FurtherBasicBeanPane implements Prepare4DataSourceChange { private DictionaryPane dictionaryPane; public DictPresentPane() { @@ -50,4 +51,8 @@ public class DictPresentPane extends FurtherBasicBeanPane { dictionaryPane.reset(); } + @Override + public void registerDSChangeListener() { + dictionaryPane.registerDSChangeListener(); + } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java b/designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java index 3f62c0170..e50ed86b9 100644 --- a/designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java +++ b/designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java @@ -5,6 +5,7 @@ import com.fr.data.impl.DynamicSQLDict; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.constants.LayoutConstants; import com.fr.design.data.DataCreatorUI; +import com.fr.design.data.tabledata.Prepare4DataSourceChange; import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; @@ -20,7 +21,7 @@ import java.util.List; * @author zhou * @since 2012-5-31下午12:20:41 */ -public class DictionaryPane extends UIComboBoxPane implements DataCreatorUI { +public class DictionaryPane extends UIComboBoxPane implements DataCreatorUI, Prepare4DataSourceChange { private TableDataDictPane tableDataDictPane; @Override @@ -77,4 +78,9 @@ public class DictionaryPane extends UIComboBoxPane implements DataCr paneList.add(new FormulaDictPane()); return paneList; } + + @Override + public void registerDSChangeListener() { + tableDataDictPane.registerDSChangeListener(); + } } diff --git a/designer-base/src/main/java/com/fr/design/present/dict/TableDataDictPane.java b/designer-base/src/main/java/com/fr/design/present/dict/TableDataDictPane.java index ab9d8d90c..3c08c1c9d 100644 --- a/designer-base/src/main/java/com/fr/design/present/dict/TableDataDictPane.java +++ b/designer-base/src/main/java/com/fr/design/present/dict/TableDataDictPane.java @@ -16,6 +16,7 @@ import com.fr.design.data.datapane.TableDataComboBox; import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.datapane.preview.PreviewLabel; import com.fr.design.data.datapane.preview.PreviewLabel.Previewable; +import com.fr.design.data.tabledata.Prepare4DataSourceChange; import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.data.tabledata.wrapper.TemplateTableDataWrapper; import com.fr.design.editor.DoubleDeckValueEditorPane; @@ -48,7 +49,7 @@ import java.util.List; * @editor zhou * @since 2012-3-29下午1:49:24 */ -public class TableDataDictPane extends FurtherBasicBeanPane implements Previewable, UIObserver { +public class TableDataDictPane extends FurtherBasicBeanPane implements Previewable, UIObserver, Prepare4DataSourceChange { private static final int BEGIN = 1; private static final int END = 10; private static final int VGAP = 24; @@ -368,4 +369,9 @@ public class TableDataDictPane extends FurtherBasicBeanPane public boolean shouldResponseChangeListener() { return true; } + + @Override + public void registerDSChangeListener() { + tableDataNameComboBox.registerGlobalDSChangeListener(); + } } diff --git a/designer-realize/src/main/java/com/fr/design/present/PresentPane.java b/designer-realize/src/main/java/com/fr/design/present/PresentPane.java index fa7683bb0..8e8a669c9 100644 --- a/designer-realize/src/main/java/com/fr/design/present/PresentPane.java +++ b/designer-realize/src/main/java/com/fr/design/present/PresentPane.java @@ -75,6 +75,7 @@ public class PresentPane extends UIComboBoxPane { displays.add(none.title4PopupWindow()); dictPresentPane = new DictPresentPane(); + dictPresentPane.registerDSChangeListener(); paneList.add(dictPresentPane); keys.add(DictPresent.class.getName()); displays.add(dictPresentPane.title4PopupWindow()); From 9daf000d59be72c07c6431d800079dbe0def7925 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 25 Nov 2019 17:06:40 +0800 Subject: [PATCH 38/54] fix --- .../design/data/DesignTableDataManager.java | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) 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 6cf3d9062..44ec26127 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 @@ -73,7 +73,7 @@ public abstract class DesignTableDataManager { */ private static java.util.Map globalDsCache = new java.util.HashMap(); private static java.util.Map dsNameChangedMap = new HashMap(); -// private static List dsListeners = new ArrayList(); + private static List globalDsListeners = new ArrayList<>(); private static Map> dsListenersMap = new HashMap>(); @@ -95,15 +95,19 @@ public abstract class DesignTableDataManager { * 响应数据集改变. */ private static void fireDsChanged() { + fireDsChanged(globalDsListeners); for (Entry> listenerEntry : dsListenersMap.entrySet()) { List dsListeners = listenerEntry.getValue(); - for (int i = 0; i < dsListeners.size(); i++) { - //增强for循环用的iterator实现的, 如果中间哪个listener修改或删除了(如ChartEditPane.dsChangeListener), - // 由于dsListeners是arraylist, 此时会ConcurrentModifyException -// for (ChangeListener l : dsListeners) { - ChangeEvent e = null; - dsListeners.get(i).stateChanged(e); - } + fireDsChanged(dsListeners); + } + } + + private static void fireDsChanged(List dsListeners) { + for (int i = 0; i < dsListeners.size(); i++) { + //增强for循环用的iterator实现的, 如果中间哪个listener修改或删除了(如ChartEditPane.dsChangeListener), + // 由于dsListeners是arraylist, 此时会ConcurrentModifyException + ChangeEvent e = null; + dsListeners.get(i).stateChanged(e); } } @@ -160,12 +164,8 @@ public abstract class DesignTableDataManager { } } - public static void addDsChangeListener(ChangeListener l) { - addDsChangeListener(l, HistoryTemplateListCache.getInstance().getCurrentEditingTemplate()); - } - public static void addGlobalDsChangeListener(ChangeListener l) { - addDsChangeListener(l, null); + globalDsListeners.add(l); } /** @@ -173,7 +173,8 @@ public abstract class DesignTableDataManager { * * @param l ChangeListener监听器 */ - private static void addDsChangeListener(ChangeListener l, JTemplate template) { + public static void addDsChangeListener(ChangeListener l) { + JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); String key = StringUtils.EMPTY; if (template != null) { key = template.getPath(); From 2927a00a09911be6c9d1dab7be5e26c0a457b0b8 Mon Sep 17 00:00:00 2001 From: pengda Date: Tue, 26 Nov 2019 09:51:35 +0800 Subject: [PATCH 39/54] =?UTF-8?q?REPORT-23954=20=20linux=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8-rhel=E7=B3=BB=E7=BB=9F=EF=BC=8C=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/controlpane/UIControlPane.java | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java index d47805de9..6319b239b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java @@ -9,18 +9,9 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.menu.ShortCut; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.widget.FRWidgetFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; - -import javax.swing.BorderFactory; -import javax.swing.JComponent; -import javax.swing.JDialog; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JSplitPane; -import javax.swing.border.EmptyBorder; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Cursor; @@ -34,6 +25,14 @@ import java.awt.Point; import java.awt.Rectangle; import java.awt.Toolkit; import java.awt.Window; +import javax.swing.BorderFactory; +import javax.swing.JComponent; +import javax.swing.JDialog; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JSplitPane; +import javax.swing.border.EmptyBorder; + import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; @@ -72,7 +71,6 @@ abstract class UIControlPane extends JControlPane { this.creators = this.createNameableCreators(); initCardPane(); - if (isNewStyle()) { getPopupEditDialog(cardPane); this.add(getLeftPane(), BorderLayout.CENTER); @@ -148,9 +146,7 @@ abstract class UIControlPane extends JControlPane { topToolBar.setLayout(new BorderLayout()); ShortCut addItem = shortCutFactory.addItemShortCut().getShortCut(); addItem.intoJToolBar(topToolBar); - JPanel leftTopPane = getLeftTopPane(topToolBar); - leftTopPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0)); leftPane.add(leftTopPane, BorderLayout.NORTH); @@ -171,7 +167,6 @@ abstract class UIControlPane extends JControlPane { JPanel leftTopPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); leftTopPane.add(toolBarPane, BorderLayout.EAST); leftTopPane.add(addItemLabel, BorderLayout.CENTER); - return leftTopPane; } @@ -202,7 +197,6 @@ abstract class UIControlPane extends JControlPane { topToolBar.validate(); this.controlUpdatePane = createControlUpdatePane();//REPORT-4841 刷新一下编辑面板 cardPane.add(controlUpdatePane, "EDIT"); - this.repaint(); } @@ -248,7 +242,6 @@ abstract class UIControlPane extends JControlPane { return; } } - // 要隐藏 先检查有没有非法输入 // 非法输入检查放在最后,因为可能出现面板弹出新弹框而失去焦点的情况,比如 输入公式时,弹出公式编辑对话框 try { @@ -268,6 +261,8 @@ abstract class UIControlPane extends JControlPane { addWindowFocusListener(new WindowAdapter() { @Override public void windowLostFocus(WindowEvent e) { + //在Linux上拉回焦点,不然导致一些面板关不掉 + requestFocus(); hideDialog(); } }); From b8177b3b489de5572618c0a03a03ee8968d67f4e Mon Sep 17 00:00:00 2001 From: pengda Date: Tue, 26 Nov 2019 09:59:10 +0800 Subject: [PATCH 40/54] =?UTF-8?q?REPORT-23960=20linux=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8-rhel=E7=B3=BB=E7=BB=9F=EF=BC=8C=E8=B6=85=E7=BA=A7?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/HyperlinkGroupPaneActionImpl.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java b/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java index fcade7789..71a37e42f 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java @@ -3,7 +3,7 @@ package com.fr.design.mainframe; import com.fr.base.Style; import com.fr.design.actions.utils.ReportActionUtils; import com.fr.design.designer.TargetComponent; -import com.fr.design.file.HistoryTemplateListPane; +import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider; import com.fr.general.FRFont; @@ -24,7 +24,7 @@ import java.awt.Color; */ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionProvider { private static HyperlinkGroupPaneActionProvider instance; - + private static Selection selection ; private HyperlinkGroupPaneActionImpl() { } @@ -40,7 +40,9 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro ElementCasePane reportPane = (ElementCasePane)elementCasePane; final TemplateElementCase report = reportPane.getEditingElementCase(); NameJavaScriptGroup nameHyperlinks = getNameJSGroup(reportPane, report); + selection = reportPane.getSelection(); hyperlinkGroupPane.populate(nameHyperlinks); + } private NameJavaScriptGroup getNameJSGroup(ElementCasePane reportPane, final TemplateElementCase report) { @@ -67,13 +69,12 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro } ElementCasePane reportPane = (ElementCasePane)jt.getCurrentElementCasePane(); final TemplateElementCase report = reportPane.getEditingElementCase(); - final Selection sel = reportPane.getSelection(); final NameJavaScriptGroup updateNameHyperlinks = hyperlinkGroupPane.updateJSGroup(); - if (sel instanceof FloatSelection) { - FloatElement selectedFloatElement = report.getFloatElement(((FloatSelection)sel).getSelectedFloatName()); + if (selection instanceof FloatSelection) { + FloatElement selectedFloatElement = report.getFloatElement(((FloatSelection)selection).getSelectedFloatName()); selectedFloatElement.setNameHyperlinkGroup(updateNameHyperlinks); } else { - ReportActionUtils.actionIterateWithCellSelection((CellSelection)sel, report, new ReportActionUtils.IterAction() { + ReportActionUtils.actionIterateWithCellSelection((CellSelection)selection, report, new ReportActionUtils.IterAction() { public void dealWith(CellElement editCellElement) { Style elementStyle = editCellElement.getStyle(); FRFont frFont = elementStyle.getFRFont(); @@ -94,7 +95,6 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro } }); } - - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified(); + HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTargetModified(); } } From 1b936122d0bd92763e207a70250635f2a116b2c2 Mon Sep 17 00:00:00 2001 From: pengda Date: Tue, 26 Nov 2019 10:31:27 +0800 Subject: [PATCH 41/54] =?UTF-8?q?REPORT-23943=20=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF=EF=BC=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E9=A2=84=E5=AE=9A=E4=B9=89=E6=8E=A7=E4=BB=B6=EF=BC=8C=E5=BC=B9?= =?UTF-8?q?=E6=A1=86=E6=97=A0=E6=B3=95=E7=BC=A9=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/FormWidgetPopWindow.java | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetPopWindow.java b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetPopWindow.java index fc3967a99..7f1304d3a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetPopWindow.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetPopWindow.java @@ -12,14 +12,11 @@ import java.awt.Rectangle; import java.awt.Toolkit; import java.awt.event.AWTEventListener; import java.awt.event.MouseEvent; - import javax.swing.JPanel; import javax.swing.JWindow; - import com.fr.design.constants.UIConstants; -import com.fr.design.designer.beans.location.Location; import com.fr.design.gui.core.WidgetOption; -import com.fr.stable.OperatingSystem; +import com.fr.stable.os.OperatingSystem; //august: public class FormWidgetPopWindow extends JWindow { @@ -52,24 +49,28 @@ public class FormWidgetPopWindow extends JWindow { if (event instanceof MouseEvent) { MouseEvent mv = (MouseEvent) event; if (mv.getClickCount() > 0) { - Point point = new Point((int) (mv.getLocationOnScreen().getX()), (int) mv.getLocationOnScreen().getY()); - if (OperatingSystem.isWindows()) { - if(!FormWidgetPopWindow.this.contains(point)) { - FormWidgetPopWindow.this.setVisible(false); - } - } else if (OperatingSystem.isMacOS()) { - Dimension d = FormWidgetPopWindow.this.getSize(); - Point p = FormWidgetPopWindow.this.getLocation(); - Rectangle rect = new Rectangle(p, d); - if (!rect.contains(point)) { - FormWidgetPopWindow.this.setVisible(false); - } - } + hideWindow(mv); } } } }; + private void hideWindow(MouseEvent mv){ + Point point = new Point((int) (mv.getLocationOnScreen().getX()), (int) mv.getLocationOnScreen().getY()); + if (OperatingSystem.isWindows()) { + if (!FormWidgetPopWindow.this.contains(point)) { + FormWidgetPopWindow.this.setVisible(false); + } + }else if(OperatingSystem.isMacos() || OperatingSystem.isLinux()){ + Dimension d = FormWidgetPopWindow.this.getSize(); + Point p = FormWidgetPopWindow.this.getLocation(); + Rectangle rect = new Rectangle(p, d); + if (!rect.contains(point)) { + FormWidgetPopWindow.this.setVisible(false); + } + } + } + private class EditorChoosePane extends JPanel { public EditorChoosePane() { super(); From ffa155d0108bee325988142e5789b6352d46c90d Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 26 Nov 2019 14:35:51 +0800 Subject: [PATCH 42/54] =?UTF-8?q?REPORT-24357=20[=E5=86=92=E7=83=9F]?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7=E4=B8=AD=E7=BC=A9=E8=BF=9B?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=EF=BC=8C=E8=AE=BE=E7=BD=AE=E5=AE=8C=E6=AF=95?= =?UTF-8?q?=E4=B8=8D=E7=82=B9=E5=87=BB=E5=8E=9F=E6=9D=A5=E7=9A=84=E7=84=A6?= =?UTF-8?q?=E7=82=B9=EF=BC=8C=E7=BC=A9=E8=BF=9B=E8=B7=9D=E7=A6=BB=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=BF=9D=E5=AD=98=2010.0=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/ispinner/UIBasicSpinner.java | 13 +++++++++++++ .../main/java/com/fr/design/condition/WHPane.java | 11 ----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/ispinner/UIBasicSpinner.java b/designer-base/src/main/java/com/fr/design/gui/ispinner/UIBasicSpinner.java index 4b71a2c75..9c9f48fae 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ispinner/UIBasicSpinner.java +++ b/designer-base/src/main/java/com/fr/design/gui/ispinner/UIBasicSpinner.java @@ -7,6 +7,9 @@ import javax.swing.*; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import java.awt.*; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.text.ParseException; /** * Created by IntelliJ IDEA. @@ -56,7 +59,17 @@ public class UIBasicSpinner extends JSpinner implements UIObserver { } }); } + final JFormattedTextField textField = ((JSpinner.DefaultEditor) this.getEditor()).getTextField(); + textField.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent e) { + try { + textField.commitEdit(); + } catch (ParseException ignore) { + } + } + }); } diff --git a/designer-realize/src/main/java/com/fr/design/condition/WHPane.java b/designer-realize/src/main/java/com/fr/design/condition/WHPane.java index e92bf212e..dce2d466a 100644 --- a/designer-realize/src/main/java/com/fr/design/condition/WHPane.java +++ b/designer-realize/src/main/java/com/fr/design/condition/WHPane.java @@ -33,17 +33,6 @@ public abstract class WHPane extends ConditionAttrSingleConditionPane Date: Wed, 27 Nov 2019 15:50:59 +0800 Subject: [PATCH 43/54] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20=20?= =?UTF-8?q?=E9=80=82=E9=85=8D=E4=B8=80=E4=BA=9B=E8=80=81=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E5=B1=9E=E6=80=A7=E7=9B=91=E5=90=AC=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/designer/creator/CRPropertyDescriptor.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptor.java b/designer-base/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptor.java index e2470875d..2a42fabd2 100644 --- a/designer-base/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptor.java +++ b/designer-base/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptor.java @@ -4,6 +4,7 @@ package com.fr.design.designer.creator; import com.fr.stable.StringUtils; +import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeListener; import java.beans.IntrospectionException; @@ -40,6 +41,12 @@ public final class CRPropertyDescriptor extends PropertyDescriptor { return this; } + @Deprecated + public CRPropertyDescriptor setPropertyChangeListener(PropertyChangeAdapter l) { + this.l = l; + return this; + } + public void firePropertyChanged() { if (l != null) { l.propertyChange(); From 867012b3b1c16abeb4d2641ed5968bd9cd837c6f Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 28 Nov 2019 10:28:04 +0800 Subject: [PATCH 44/54] =?UTF-8?q?REPORT-24085=20=E7=A8=B3=E5=AE=9A?= =?UTF-8?q?=E5=85=B1=E5=88=9B=EF=BC=9A=E5=9C=A8=E6=96=87=E4=BB=B6=E6=A0=91?= =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E7=9B=AE=E5=BD=95=E4=B8=8B=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=EF=BC=8C=E4=BC=9A=E7=9B=B4=E6=8E=A5=E8=B7=B3?= =?UTF-8?q?=E5=88=B0=E4=B8=8A=E4=B8=80=E7=BA=A7=E7=9B=AE=E5=BD=95=20by=20j?= =?UTF-8?q?oe.jiang?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/file/TemplateTreePane.java | 14 +++++++++++++- .../itree/refreshabletree/RefreshableJTree.java | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java index ed63b06ce..1708c0753 100644 --- a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java +++ b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java @@ -44,6 +44,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Enumeration; +import java.util.Objects; import static javax.swing.JOptionPane.WARNING_MESSAGE; import static javax.swing.JOptionPane.YES_NO_OPTION; @@ -299,7 +300,18 @@ public class TemplateTreePane extends JPanel implements FileOperations { } } } - reportletsTree.refresh(); + refreshAfterDelete(); + } + + private void refreshAfterDelete() { + TreePath[] paths = reportletsTree.getSelectionPaths(); + if (paths == null) { + reportletsTree.refresh(); + } else { + for (TreePath path : Objects.requireNonNull(reportletsTree.getSelectionPaths())) { + reportletsTree.refreshParent(path); + } + } } private boolean deleteNodes(Collection nodes) { diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/RefreshableJTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/RefreshableJTree.java index b2008f386..a22f2a302 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/RefreshableJTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/refreshabletree/RefreshableJTree.java @@ -145,6 +145,11 @@ public abstract class RefreshableJTree extends CheckBoxTree { refresh((ExpandMutableTreeNode) this.getModel().getRoot(), StringUtils.EMPTY); } + //REPORT-24085,只刷新父节点 + public void refreshParent(TreePath path) { + refresh((ExpandMutableTreeNode) path.getParentPath().getLastPathComponent(), StringUtils.EMPTY); + } + public void refreshChildByName(String childName) { refresh((ExpandMutableTreeNode) this.getModel().getRoot(), childName); } From c66568f7785e7cd02945c262d773c996466fd52d Mon Sep 17 00:00:00 2001 From: lucian Date: Thu, 28 Nov 2019 17:54:01 +0800 Subject: [PATCH 45/54] =?UTF-8?q?REPORT-24455=20=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E5=B7=A5=E4=BD=9C=E7=9B=AE=E5=BD=95=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=A8=A1=E6=9D=BF=E4=BF=9D=E5=AD=98=EF=BC=8C?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E7=9A=84=E7=89=B9=E5=88=AB=E6=85=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/env/RemoteWorkspace.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java index 6a582f1fa..c0319f935 100644 --- a/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java +++ b/designer-base/src/main/java/com/fr/design/env/RemoteWorkspace.java @@ -1,6 +1,6 @@ package com.fr.design.env; -import com.fr.cluster.engine.remote.ClusterOperator; +import com.fr.cluster.engine.base.FineClusterConfig; import com.fr.design.i18n.Toolkit; import com.fr.stable.AssistUtils; import com.fr.workspace.WorkContext; @@ -70,7 +70,7 @@ public class RemoteWorkspace implements Workspace { @Override public boolean isCluster() { - return WorkContext.getCurrent().get(ClusterOperator.class).isCluster(); + return FineClusterConfig.getInstance().isCluster(); } @Override From 8db3817862302298d1c3fd4edc8c1ffd16382581 Mon Sep 17 00:00:00 2001 From: jinbokai Date: Thu, 28 Nov 2019 20:54:44 +0800 Subject: [PATCH 46/54] =?UTF-8?q?REPORT-20328=20sonar=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/actions/TableDataSourceAction.java | 1 + .../main/java/com/fr/design/mainframe/chart/ChartEditPane.java | 1 + 2 files changed, 2 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java b/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java index 6e627434d..ff62c6fb8 100644 --- a/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java @@ -64,6 +64,7 @@ public class TableDataSourceAction extends TemplateComponentAction Date: Fri, 29 Nov 2019 13:06:45 +0800 Subject: [PATCH 47/54] =?UTF-8?q?CHART-11634=20=E8=AF=95=E7=AE=A1=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E7=9B=98=E4=BB=8E=E6=A8=AA=E5=90=91=E5=8F=98=E6=88=90?= =?UTF-8?q?=E7=BA=B5=E5=90=91=20=E6=A0=87=E7=AD=BE=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E4=BB=8E=E4=B8=8A=E4=B8=8B=E5=8F=98=E6=88=90?= =?UTF-8?q?=E5=B7=A6=E5=8F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/frpane/AbstractAttrNoScrollPane.java | 2 +- .../label/VanChartPlotLabelDetailPane.java | 95 ++++++++++++++----- 2 files changed, 72 insertions(+), 25 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java index 1366b46b3..6af119426 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java @@ -65,7 +65,7 @@ public abstract class AbstractAttrNoScrollPane extends BasicPane { } - protected void initListener(Container parentComponent) { + public void initListener(Container parentComponent) { for (int i = 0; i < parentComponent.getComponentCount(); i++) { Component tmpComp = parentComponent.getComponent(i); 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 012c410a8..5168f443e 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 @@ -1,6 +1,7 @@ package com.fr.van.chart.designer.style.label; import com.fr.chart.chartattr.Plot; +import com.fr.chartx.TwoTuple; import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ibutton.UIButtonGroup; @@ -11,6 +12,7 @@ import com.fr.design.layout.TableLayoutHelper; 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.AttrLabelDetail; import com.fr.plugin.chart.base.AttrTooltipContent; @@ -47,11 +49,16 @@ public class VanChartPlotLabelDetailPane extends BasicPane { protected ColorSelectBox backgroundColor; private JPanel tractionLinePane; + private JPanel positionPane; + private Integer[] oldPositionValues; protected VanChartStylePane parent; + private Plot plot; public VanChartPlotLabelDetailPane(Plot plot, VanChartStylePane parent) { this.parent = parent; + this.plot = plot; + this.setLayout(new BorderLayout()); initToolTipContentPane(plot); JPanel contentPane = createLabelPane(plot); @@ -105,42 +112,80 @@ public class VanChartPlotLabelDetailPane extends BasicPane { return TableLayout4VanChartHelper.createExpandablePaneWithTitle(title, panel); } - protected JPanel createLabelPositionPane(double[] row, double[] col, Plot plot) { - if(plot instanceof VanChartLabelPositionPlot){ + private TwoTuple getPositionNamesAndValues() { + if (plot instanceof VanChartLabelPositionPlot) { + String[] names = ((VanChartLabelPositionPlot) plot).getLabelLocationNameArray(); - Integer[] values = ((VanChartLabelPositionPlot) plot).getLabelLocationValueArray(); + Integer[] values = ((VanChartLabelPositionPlot) plot).getLabelLocationValueArray(); - if(names == null || names.length == 0){ - return new JPanel(); + if (names == null || names.length == 0) { + return null; } - if(values == null || values.length == 0){ - return new JPanel(); + if (values == null || values.length == 0) { + return null; } - position = new UIButtonGroup(names, values); - autoAdjust = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_On"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false}); + return new TwoTuple<>(names, values); + } + return null; + } + private JPanel createLabelPositionPane(double[] row, double[] col, Plot plot) { - Component[][] comps = new Component[2][2]; + if (getPositionNamesAndValues() == null) { + return new JPanel(); + } - comps[0] = new Component[]{null,null}; - comps[1] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position"), SwingConstants.LEFT), position}; + autoAdjust = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_On"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false}); - JPanel panel =new JPanel(new BorderLayout()); - panel.add(getLabelPositionPane(comps,row,col),BorderLayout.CENTER); - if(plot.isSupportLeadLine()){ - tractionLine = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Show_Guideline")); - tractionLinePane = TableLayout4VanChartHelper.createGapTableLayoutPane("",tractionLine); - panel.add(tractionLinePane, BorderLayout.SOUTH); - initPositionListener(); - } else if(PlotFactory.plotAutoAdjustLabelPosition(plot)){ - panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Auto_Adjust"),autoAdjust), BorderLayout.SOUTH); - } - return panel; + JPanel panel = new JPanel(new BorderLayout()); + + positionPane = new JPanel(); + checkPositionPane(); + panel.add(positionPane, BorderLayout.CENTER); + + + if (plot.isSupportLeadLine()) { + tractionLine = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Show_Guideline")); + tractionLinePane = TableLayout4VanChartHelper.createGapTableLayoutPane("", tractionLine); + panel.add(tractionLinePane, BorderLayout.SOUTH); + initPositionListener(); + } else if (PlotFactory.plotAutoAdjustLabelPosition(plot)) { + panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Auto_Adjust"), autoAdjust), BorderLayout.SOUTH); } - return new JPanel(); + return panel; } + private void checkPositionPane() { + TwoTuple result = getPositionNamesAndValues(); + if (result == null) { + return; + } + + Integer[] values = result.getSecond(); + if (ComparatorUtils.equals(values, oldPositionValues)) { + return; + } + oldPositionValues = values; + + position = new UIButtonGroup(result.getFirst(), values); + + Component[][] comps = new Component[2][2]; + + comps[0] = new Component[]{null, null}; + comps[1] = new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layout_Position"), SwingConstants.LEFT), position}; + + double[] row = new double[]{TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED}; + double[] col = new double[]{TableLayout.FILL, TableLayout4VanChartHelper.EDIT_AREA_WIDTH}; + + positionPane.removeAll(); + positionPane.setLayout(new BorderLayout()); + positionPane.add(getLabelPositionPane(comps, row, col), BorderLayout.CENTER); + + parent.initListener(positionPane); + } + + protected JPanel getLabelPositionPane (Component[][] comps, double[] row, double[] col){ JPanel panel = TableLayoutHelper.createTableLayoutPane(comps,row,col); return createTableLayoutPaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Attr_Layout"), panel); @@ -228,6 +273,8 @@ public class VanChartPlotLabelDetailPane extends BasicPane { } public void populate(AttrLabelDetail detail) { + checkPositionPane(); + dataLabelContentPane.populateBean(detail.getContent()); if(position != null){ position.setSelectedItem(detail.getPosition()); From 9278f6e3b1bde55e9e16d4280e5341ba5cb31238 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 2 Dec 2019 13:39:23 +0800 Subject: [PATCH 48/54] =?UTF-8?q?MOBILE-24394=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=86=BB=E7=BB=93=E9=80=89=E9=A1=B9=E6=93=8D=E4=BD=9C=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E8=BF=9B=E8=A1=8C=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/icombocheckbox/UIComboCheckBox.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java b/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java index 9d69f2247..25be23b2c 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java @@ -23,6 +23,8 @@ import java.awt.FlowLayout; import java.awt.FontMetrics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.ArrayList; @@ -141,6 +143,12 @@ public class UIComboCheckBox extends JComponent implements UIObserver, GlobalNam attributeChange(); } }); + this.addFocusListener(new FocusAdapter() { + @Override + public void focusLost(FocusEvent e) { + attributeChange(); + } + }); } }; editor.setEditable(false); From f65f770a12eebf03bf93a3b8d5cd7c24da5bffd4 Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 2 Dec 2019 13:53:52 +0800 Subject: [PATCH 49/54] =?UTF-8?q?CHART-11634=20bug=E9=80=80=E5=9B=9E?= =?UTF-8?q?=EF=BC=9A=E5=80=BC=E6=A0=87=E7=AD=BE=E6=B2=A1=E6=9C=89=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=20=E6=8A=A5npe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/style/label/VanChartPlotLabelDetailPane.java | 3 +++ 1 file changed, 3 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 5168f443e..de5cb4d90 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 @@ -157,6 +157,9 @@ public class VanChartPlotLabelDetailPane extends BasicPane { } private void checkPositionPane() { + if (positionPane == null) { + return; + } TwoTuple result = getPositionNamesAndValues(); if (result == null) { return; From 2d9bb546cc1b3381c6fd73f28b3856ef9cad9c05 Mon Sep 17 00:00:00 2001 From: pengda Date: Mon, 2 Dec 2019 17:31:45 +0800 Subject: [PATCH 50/54] =?UTF-8?q?REPORT-19946=20linux=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/common/SplashWindow.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/start/common/SplashWindow.java b/designer-realize/src/main/java/com/fr/start/common/SplashWindow.java index 951fba326..aa375c1dc 100644 --- a/designer-realize/src/main/java/com/fr/start/common/SplashWindow.java +++ b/designer-realize/src/main/java/com/fr/start/common/SplashWindow.java @@ -1,14 +1,12 @@ package com.fr.start.common; -import com.fr.base.BaseUtils; import com.fr.design.fun.OemProcessor; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.IOUtils; import com.fr.log.FineLoggerFactory; import com.fr.stable.image4j.codec.ico.ICODecoder; import com.fr.stable.os.OperatingSystem; import com.fr.start.OemHandler; -import com.sun.awt.AWTUtilities; - import javax.swing.*; import java.awt.*; import java.awt.image.*; @@ -41,8 +39,6 @@ public class SplashWindow extends JFrame { this.setAlwaysOnTop(false); this.setUndecorated(true); - AWTUtilities.setWindowOpaque(this, false); - //使窗体背景透明 if (OperatingSystem.isWindows()) { this.setBackground(new Color(0, 0, 0, 0)); @@ -73,7 +69,7 @@ public class SplashWindow extends JFrame { this.setIconImages(image); } catch (IOException e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); - this.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png")); + this.setIconImage(IOUtils.readImage("/com/fr/base/images/oem/logo.png")); } } From 2059abaa7b6c087d46dc46dd60ad463f74c3994f Mon Sep 17 00:00:00 2001 From: shine Date: Mon, 2 Dec 2019 17:33:57 +0800 Subject: [PATCH 51/54] =?UTF-8?q?CHART-11852=20CHART-11634=E6=94=B9?= =?UTF-8?q?=E5=87=BA=E6=9D=A5=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E5=B1=9E=E6=80=A7=E7=9A=84=E6=A0=87=E7=AD=BE=E6=B2=A1?= =?UTF-8?q?=E6=9C=89parentPane?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/style/label/VanChartPlotLabelDetailPane.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 de5cb4d90..b774de89e 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 @@ -185,7 +185,9 @@ public class VanChartPlotLabelDetailPane extends BasicPane { positionPane.setLayout(new BorderLayout()); positionPane.add(getLabelPositionPane(comps, row, col), BorderLayout.CENTER); - parent.initListener(positionPane); + if (parent != null) { + parent.initListener(positionPane); + } } From e69f6ecc6b3baeabd02a1e1afab58f659040c47b Mon Sep 17 00:00:00 2001 From: shine Date: Tue, 3 Dec 2019 14:14:36 +0800 Subject: [PATCH 52/54] =?UTF-8?q?CHART-11779=20=E8=BF=9C=E7=A8=8B=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=20=E5=9C=B0=E5=9B=BE=E8=B5=84=E6=BA=90=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=B7=E6=96=B0=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../type/VanChartMapSourceChoosePane.java | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java index bbce11d9f..b5960f1b1 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java @@ -3,6 +3,8 @@ package com.fr.van.chart.map.designer.type; import com.fr.base.Parameter; import com.fr.base.Utils; import com.fr.decision.webservice.v10.map.WMSFactory; +import com.fr.decision.webservice.v10.map.geojson.helper.GEOJSONHelper; +import com.fr.design.constants.LayoutConstants; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; import com.fr.design.file.HistoryTemplateListPane; @@ -19,6 +21,7 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.JTemplate; import com.fr.general.ComparatorUtils; +import com.fr.general.IOUtils; import com.fr.general.http.HttpClient; import com.fr.plugin.chart.base.GisLayer; import com.fr.plugin.chart.base.ViewCenter; @@ -34,6 +37,7 @@ import com.fr.plugin.chart.type.ZoomLevel; import com.fr.stable.ArrayUtils; import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.drillmap.designer.data.comp.MapDataTree; +import com.fr.workspace.WorkContext; import javax.swing.BorderFactory; import javax.swing.JOptionPane; @@ -223,17 +227,33 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { sourceTitleLabel = createSourceTitleLabel(); + boolean hasRefreshButton = !WorkContext.getCurrent().isLocal(); + + UIButton button = new UIButton(IOUtils.readIcon("/com/fr/design/images/control/refresh.png")); + button.setToolTipText("更新服务器地图资源文件"); + button.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + GEOJSONHelper.reset(); + GEOJSONHelper.getInstance(); + } + }); + + double p = TableLayout.PREFERRED; double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH; double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; - double[] columnSize = {d, e}; double[] rowSize = {p, p}; + + double[] columnSize = hasRefreshButton ? new double[]{d + 10, e - 20, 20} : new double[]{d, e}; + Component[] comps = hasRefreshButton ? new Component[]{sourceTitleLabel, sourceComboBox, button} : new Component[]{sourceTitleLabel, sourceComboBox}; + double hGap = hasRefreshButton ? 0 : TableLayout4VanChartHelper.COMPONENT_INTERVAL; Component[][] components = new Component[][]{ new Component[]{null,null}, - new Component[]{sourceTitleLabel,sourceComboBox}, + comps, }; - return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize, columnSize); + return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, hGap, LayoutConstants.VGAP_LARGE); } private JPanel createGISLayerPane() { From c0f2fc6b886aa88975515cd25e8286c4865b578c Mon Sep 17 00:00:00 2001 From: shine Date: Tue, 3 Dec 2019 14:16:36 +0800 Subject: [PATCH 53/54] tooltip --- .../chart/map/designer/type/VanChartMapSourceChoosePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java index b5960f1b1..30627d9cf 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java @@ -230,7 +230,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { boolean hasRefreshButton = !WorkContext.getCurrent().isLocal(); UIButton button = new UIButton(IOUtils.readIcon("/com/fr/design/images/control/refresh.png")); - button.setToolTipText("更新服务器地图资源文件"); + button.setToolTipText("refresh remote map json"); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { From 676ce66802fa0da8c42e868f1812858755848d92 Mon Sep 17 00:00:00 2001 From: shine Date: Tue, 3 Dec 2019 14:23:01 +0800 Subject: [PATCH 54/54] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/map/designer/type/VanChartMapSourceChoosePane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java index 30627d9cf..297d78166 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/VanChartMapSourceChoosePane.java @@ -17,6 +17,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.JTemplate; @@ -230,7 +231,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { boolean hasRefreshButton = !WorkContext.getCurrent().isLocal(); UIButton button = new UIButton(IOUtils.readIcon("/com/fr/design/images/control/refresh.png")); - button.setToolTipText("refresh remote map json"); + button.setToolTipText(Toolkit.i18nText("Fine-Design_Chart_Update_Remote_Map_JSON")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) {