From 95f3f7f12050ea5d884bab17c9eb330f04996934 Mon Sep 17 00:00:00 2001 From: pengda Date: Tue, 20 Apr 2021 16:27:55 +0800 Subject: [PATCH 01/11] =?UTF-8?q?REPORT-51162=20=E7=AB=AF=E5=8F=A3?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E9=99=90=E5=88=B6=E5=A4=B1=E6=95=88=20&=20RE?= =?UTF-8?q?PORT-51260=20redshift=E7=9A=84=E7=89=B9=E5=AE=9Aurl=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E6=97=A0=E6=B3=95=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/connect/JDBCDefPane.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java index 18681ca186..4331828238 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java @@ -51,9 +51,10 @@ public class JDBCDefPane extends JPanel { public static final String DRIVER_TYPE = "driver_type"; public static final String USER_NAME = "user_name"; private static final String OTHER_DB = "Others"; - private static final Pattern ORACLE_URL = Pattern.compile("^jdbc:oracle:thin:@[/]*([0-9a-zA-Z_\\.]+)(:([0-9]+|port))?([:/](.*))?.*", Pattern.CASE_INSENSITIVE); - private static final Pattern GENERAL_URL = Pattern.compile("^jdbc:(mysql|sqlserver|db2|derby|postgresql|inceptor|inceptor2|hive2)://([0-9a-zA-Z_\\.]+)(:([0-9]+|port))?((/|;DatabaseName=)(.*))?.*", Pattern.CASE_INSENSITIVE); + private static final Pattern ORACLE_URL = Pattern.compile("^jdbc:oracle:thin:@[/]*([-0-9a-zA-Z_\\.]+)(:([0-9]+|port))?([:/](.*))?.*", Pattern.CASE_INSENSITIVE); + private static final Pattern GENERAL_URL = Pattern.compile("^jdbc:(mysql|sqlserver|db2|derby|postgresql|inceptor|inceptor2|hive2)://([-0-9a-zA-Z_\\.]+)(:([0-9]+|port))?((/|;DatabaseName=)(.*))?.*", Pattern.CASE_INSENSITIVE); private static final Pattern PORT = Pattern.compile("^0$|^[1-9][\\d]*[\\d]*$"); + private static final Pattern CHAR_NEED_ESCAPE = Pattern.compile("[?|$^*\\\\\\[\\](){}.+]"); // 编码转换. private String originalCharSet = null; private static Map jdbcMap = new HashMap(); @@ -389,6 +390,9 @@ public class JDBCDefPane extends JPanel { InputMethodListener portInputMethodListener = new InputMethodListener() { @Override public void inputMethodTextChanged(InputMethodEvent event) { + if (null == event.getText()) { + return; + } char ch = event.getText().current(); if (!(ch >= '0' && ch <= '9')) { event.consume(); @@ -484,13 +488,13 @@ public class JDBCDefPane extends JPanel { KeyListener portKeyListener = new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { - String port = portTextField.getText().trim(); + String port = portTextField.getText(); if (isPortValid(port)) { updateURL(); } else { - portTextField.setText(port.replaceAll(e.getKeyChar() + "", "")); + portTextField.setText(port.replaceAll(getCharNeedReplace(e.getKeyChar()) , "")); if (!isPortValid(portTextField.getText())) { - portTextField.setText(""); + portTextField.setText(StringUtils.EMPTY); updateURL(); } } @@ -501,6 +505,15 @@ public class JDBCDefPane extends JPanel { return PORT.matcher(port).find(); } + private String getCharNeedReplace(char c) { + String charNeedReplace = c + ""; + Matcher matcher = CHAR_NEED_ESCAPE.matcher(charNeedReplace); + if (matcher.find()) { + charNeedReplace = "\\" + charNeedReplace; + } + return charNeedReplace; + } + DocumentListener updateURLListener = new DocumentListener() { @Override From 8cb25024fd09f40cce2892456f17f67724f95041 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 20 Apr 2021 17:35:50 +0800 Subject: [PATCH 02/11] =?UTF-8?q?REPORT-51199=20=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E9=A2=84=E8=A7=88=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=81=8F=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/images/m_file/preview_disabled.svg | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/resources/com/fr/design/images/m_file/preview_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/m_file/preview_disabled.svg index 217f23e156..6f2c4afa1f 100644 --- a/designer-base/src/main/resources/com/fr/design/images/m_file/preview_disabled.svg +++ b/designer-base/src/main/resources/com/fr/design/images/m_file/preview_disabled.svg @@ -1,11 +1,7 @@ - - icon_报表web属性_打印预览_normal - - - - - - + + icon_预览_disabled + + - + \ No newline at end of file From 9a8d4a66d71e28df762d47f43634175eab1d2377 Mon Sep 17 00:00:00 2001 From: lucian Date: Tue, 20 Apr 2021 18:16:19 +0800 Subject: [PATCH 03/11] =?UTF-8?q?REPORT-50908=20=E5=A1=AB=E6=8A=A5-?= =?UTF-8?q?=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7=E8=AE=BE=E7=BD=AE-?= =?UTF-8?q?=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7=E4=B8=AD=E5=AF=B9=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=AE=9A=E4=BD=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/icombobox/SearchPreTaskTreeComboBox.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/icombobox/SearchPreTaskTreeComboBox.java b/designer-base/src/main/java/com/fr/design/gui/icombobox/SearchPreTaskTreeComboBox.java index 9e453471ef..9ee2a59495 100644 --- a/designer-base/src/main/java/com/fr/design/gui/icombobox/SearchPreTaskTreeComboBox.java +++ b/designer-base/src/main/java/com/fr/design/gui/icombobox/SearchPreTaskTreeComboBox.java @@ -1,5 +1,6 @@ package com.fr.design.gui.icombobox; +import com.fr.design.ui.util.UIUtil; import com.fr.log.FineLoggerFactory; import javax.swing.JTree; @@ -64,7 +65,12 @@ public class SearchPreTaskTreeComboBox extends FRTreeComboBox { // 任务执行后置空,否则会被别的操作重复触发 setPreSearchTask(null); } - search(); + UIUtil.invokeLaterIfNeeded(new Runnable() { + @Override + public void run() { + search(); + } + }); return null; } }.execute(); From 9abed876cd2355a8cda9ab917b4749f616e721cc Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 20 Apr 2021 19:59:28 +0800 Subject: [PATCH 04/11] =?UTF-8?q?CHART-18997=20=E5=A4=84=E7=90=86=E4=B8=8B?= =?UTF-8?q?=E6=89=93=E5=BC=80=E6=A8=A1=E6=9D=BF=E5=87=BA=E9=94=99=E6=97=B6?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/file/EditEnvAction.java | 11 +++++ .../design/actions/file/SwitchExistEnv.java | 12 ++++- .../design/dialog/link/MessageWithLink.java | 49 ++++++++++++------- .../fr/design/mainframe/DesktopCardPane.java | 29 +++++++++-- .../mainframe/EastRegionContainerPane.java | 2 +- .../com/fr/design/mainframe/JTemplate.java | 11 ++++- .../fr/design/mainframe/OpenLoadingPane.java | 5 +- .../main/java/com/fr/design/menu/MenuDef.java | 2 +- .../com/fr/design/worker/open/OpenWorker.java | 44 +++++++++++++++-- 9 files changed, 136 insertions(+), 29 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/EditEnvAction.java b/designer-base/src/main/java/com/fr/design/actions/file/EditEnvAction.java index a4b7c88034..d007e315fe 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/EditEnvAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/EditEnvAction.java @@ -3,6 +3,8 @@ package com.fr.design.actions.file; import com.fr.design.EnvChangeEntrance; import com.fr.design.actions.UpdateAction; +import com.fr.design.file.HistoryTemplateListCache; +import com.fr.design.mainframe.JTemplate; import java.awt.event.ActionEvent; @@ -17,4 +19,13 @@ public class EditEnvAction extends UpdateAction { public void actionPerformed(ActionEvent e) { EnvChangeEntrance.getInstance().chooseEnv(); } + + @Override + public void update() { + super.update(); + JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + if (template != null) { + this.setEnabled(!template.isSaving()); + } + } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java b/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java index bc88f72fd0..c59a92b975 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java @@ -1,10 +1,11 @@ package com.fr.design.actions.file; -import com.fr.base.svg.IconUtils; import com.fr.design.DesignerEnvManager; import com.fr.design.EnvChangeEntrance; import com.fr.design.actions.UpdateAction; import com.fr.design.env.DesignerWorkspaceInfo; +import com.fr.design.file.HistoryTemplateListCache; +import com.fr.design.mainframe.JTemplate; import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; import com.fr.design.menu.SeparatorDef; @@ -68,5 +69,14 @@ public class SwitchExistEnv extends MenuDef { EnvChangeEntrance.getInstance().switch2Env(envName); } } + + @Override + public void update() { + super.update(); + JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + if (template != null) { + this.setEnabled(!template.isSaving()); + } + } } } diff --git a/designer-base/src/main/java/com/fr/design/dialog/link/MessageWithLink.java b/designer-base/src/main/java/com/fr/design/dialog/link/MessageWithLink.java index 8a1f55cbdf..889a0c3c9c 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/link/MessageWithLink.java +++ b/designer-base/src/main/java/com/fr/design/dialog/link/MessageWithLink.java @@ -9,6 +9,7 @@ import java.awt.Font; import java.net.URI; import javax.swing.JEditorPane; import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; /** * 用来构建JOptionPane带超链的消息提示 @@ -19,31 +20,45 @@ import javax.swing.event.HyperlinkEvent; */ public class MessageWithLink extends JEditorPane { + private static final UILabel LABEL = new UILabel(); + + public MessageWithLink(String message, String linkName, String link) { - super("text/html", "" + message + "" + linkName + "" + ""); - addHyperlinkListener(e -> { - if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) { - try { - Desktop.getDesktop().browse(URI.create(link)); - } catch (Exception exception) { - FineLoggerFactory.getLogger().error(exception.getMessage(), exception); - } - } - }); - setEditable(false); - setBorder(null); + this(message, linkName, link, LABEL.getBackground(), LABEL.getFont()); } public MessageWithLink(String linkName, String link ) { this(StringUtils.EMPTY, linkName, link); } - private static StringBuilder getStyle() { - // 构建和相同风格样式 - UILabel label = new UILabel(); - Font font = label.getFont(); - Color color = label.getBackground(); + public MessageWithLink(String message, String linkName, String link, Color color) { + this(message, linkName, link, color, LABEL.getFont()); + } + + public MessageWithLink(String message, String linkName, String link, Color color, Font font) { + super("text/html", "" + message + "" + linkName + "" + ""); + initListener(link); + setEditable(false); + setBorder(null); + } + + protected void initListener(String link) { + addHyperlinkListener(new HyperlinkListener() { + @Override + public void hyperlinkUpdate(HyperlinkEvent e) { + if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) { + try { + Desktop.getDesktop().browse(URI.create(link)); + } catch (Exception exception) { + FineLoggerFactory.getLogger().error(exception.getMessage(), exception); + } + } + } + }); + } + private static StringBuilder generateStyle(Color color, Font font) { + // 构建相同风格样式 StringBuilder style = new StringBuilder("font-family:" + font.getFamily() + ";"); style.append("font-weight:").append(font.isBold() ? "bold" : "normal").append(";"); style.append("font-size:").append(font.getSize()).append("pt;"); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java b/designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java index f940f89045..a2cc6f8065 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java @@ -21,10 +21,16 @@ import javax.swing.JLayeredPane; */ public class DesktopCardPane extends BasicPane implements TargetModifiedListener { + private static final int CONTENT_LAYER = 0; + private static final int TRANSPARENT_LAYER = 1; + private static final int LOADING_LAYER = 2; + private static final int FAILED_LAYER = 3; + private static final long serialVersionUID = 1L; private JTemplate component; private TransparentPane transparentPane = new TransparentPane(); private OpenLoadingPane loadingPane = new OpenLoadingPane(); + private OpenFailedPane failedPane = new OpenFailedPane(); private JLayeredPane layeredPane = new JLayeredPane() { @Override public void doLayout() { @@ -36,8 +42,9 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener protected DesktopCardPane() { setLayout(new BorderLayout()); - layeredPane.add(transparentPane, 1); - layeredPane.add(loadingPane, 2); + layeredPane.add(transparentPane, TRANSPARENT_LAYER); + layeredPane.add(failedPane, FAILED_LAYER); + add(layeredPane, BorderLayout.CENTER); } protected void showJTemplate(final JTemplate jt) { @@ -53,7 +60,7 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener layeredPane.remove(component); } component = jt; - layeredPane.add(component, 0); + layeredPane.add(component, CONTENT_LAYER); checkSavingAndOpening(jt); add(layeredPane, BorderLayout.CENTER); validate(); @@ -69,18 +76,34 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener showCover(); } else if (jt.isOpening()) { showOpenStatus(); + } else if (jt.isOpenFailed()) { + showOpenFailedCover(); } else { hideCover(); } } + /** + * 让loadingPane懒加载 + */ + private void checkLoadingPane() { + if (layeredPane.getComponent(LOADING_LAYER) != loadingPane) { + layeredPane.add(loadingPane, LOADING_LAYER); + } + } + private void showOpenStatus() { DesignerContext.getDesignerFrame().refreshUIToolBar(); DesignerFrameFileDealerPane.getInstance().stateChange(); EastRegionContainerPane.getInstance().updateAllPropertyPane(); + checkLoadingPane(); layeredPane.moveToFront(loadingPane); } + public void showOpenFailedCover() { + layeredPane.moveToFront(failedPane); + } + public void showCover() { layeredPane.moveToFront(transparentPane); DesignerContext.getDesignerFrame().refreshUIToolBar(); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java index 8097d02f40..3bf9848de2 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java @@ -794,7 +794,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { public void setEnabled(boolean isEnabled) { JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); if (template != null) { - this.isEnabled = isEnabled && !template.isOpening() && !template.isSaving(); + this.isEnabled = isEnabled && template.checkEnable(); } else { this.isEnabled = isEnabled; } 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 b374dbbf97..8d526971cb 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 @@ -115,6 +115,7 @@ public abstract class JTemplate> protected TimeConsumeTimer consumeTimer = new TimeConsumeTimer(); private volatile boolean saving = false; private volatile boolean opening = false; + private volatile boolean openFailed = false; private PluginEventListener pluginListener; @@ -1585,8 +1586,16 @@ public abstract class JTemplate> this.opening = opening; } + public boolean isOpenFailed() { + return openFailed; + } + + public void setOpenFailed(boolean openFailed) { + this.openFailed = openFailed; + } + public boolean checkEnable() { - return !isSaving() && !isOpening(); + return !isSaving() && !isOpening() && !isOpenFailed(); } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/OpenLoadingPane.java b/designer-base/src/main/java/com/fr/design/mainframe/OpenLoadingPane.java index 5a81319739..9ee095c996 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/OpenLoadingPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/OpenLoadingPane.java @@ -1,7 +1,6 @@ package com.fr.design.mainframe; import com.fr.design.gui.ilable.UILabel; -import com.fr.general.IOUtils; import java.awt.Color; import java.awt.Component; import java.awt.Container; @@ -17,6 +16,8 @@ import javax.swing.JPanel; */ public class OpenLoadingPane extends JPanel { + private static final ImageIcon LOADING_ICON = new ImageIcon(OpenLoadingPane.class.getResource("/com/fr/design/images/mainframe/loading.gif")); + private UILabel loadingLabel; public OpenLoadingPane() { @@ -53,7 +54,7 @@ public class OpenLoadingPane extends JPanel { } }); setBackground(Color.WHITE); - loadingLabel = new UILabel(new ImageIcon(IOUtils.readImage("com/fr/plugin/chart/vanchart/export/loading.png"))); + loadingLabel = new UILabel(LOADING_ICON); add(loadingLabel); } diff --git a/designer-base/src/main/java/com/fr/design/menu/MenuDef.java b/designer-base/src/main/java/com/fr/design/menu/MenuDef.java index 55b80c0ec8..cee1658b91 100644 --- a/designer-base/src/main/java/com/fr/design/menu/MenuDef.java +++ b/designer-base/src/main/java/com/fr/design/menu/MenuDef.java @@ -411,7 +411,7 @@ public class MenuDef extends ShortCut { JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); boolean flag = true; if (template != null) { - flag = !template.isSaving() && !template.isOpening(); + flag = template.checkEnable(); } component.setEnabled(flag); if (!flag) { diff --git a/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java b/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java index f166020513..2da4d335ec 100644 --- a/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java +++ b/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java @@ -1,11 +1,15 @@ package com.fr.design.worker.open; +import com.fr.chart.exception.ChartNotFoundException; +import com.fr.design.dialog.FineJOptionPane; import com.fr.design.file.HistoryTemplateListCache; +import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerFrameFileDealerPane; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.JTemplate; import com.fr.design.worker.WorkerManager; +import com.fr.exception.DecryptTemplateException; import com.fr.file.FILE; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; @@ -13,7 +17,9 @@ import java.util.concurrent.Callable; import java.util.concurrent.CancellationException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; +import javax.swing.JOptionPane; import javax.swing.SwingWorker; +import javax.swing.UIManager; /** * 模板打开的worker @@ -54,11 +60,34 @@ public class OpenWorker extends SwingWorker { result = get(); } catch (CancellationException ignored) { return; - } catch (Exception e) { - FineLoggerFactory.getLogger().error(e.getMessage(), e); + } catch (Throwable t) { + processFailed(); + Throwable cause = t.getCause(); + if (cause instanceof DecryptTemplateException) { + FineJOptionPane.showMessageDialog( + DesignerContext.getDesignerFrame(), + Toolkit.i18nText("Fine-Design_Encrypt_Decrypt_Exception"), + Toolkit.i18nText("Fine-Design_Basic_Alert"), + JOptionPane.WARNING_MESSAGE, + UIManager.getIcon("OptionPane.errorIcon") + ); + } + if (cause instanceof ChartNotFoundException) { + FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), + Toolkit.i18nText("Fine-Design_Chart_Not_Found_Exception"), + Toolkit.i18nText("Fine-Design_Basic_Error"), + JOptionPane.ERROR_MESSAGE, + UIManager.getIcon("OptionPane.errorIcon")); + } + FineLoggerFactory.getLogger().error(t.getMessage(), t); + return; } - this.template.setOpening(false); // 后续动作 + processResult(); + } + + private void processResult() { + this.template.setOpening(false); if (slowly && templateCallable != null) { try { JTemplate book = templateCallable.call(); @@ -89,6 +118,15 @@ public class OpenWorker extends SwingWorker { WorkerManager.getInstance().removeWorker(taskName); } + private void processFailed() { + this.template.setOpenFailed(true); + this.template.setOpening(false); + DesignerContext.getDesignerFrame().getCenterTemplateCardPane().showOpenFailedCover(); + DesignerFrameFileDealerPane.getInstance().stateChange(); + WorkerManager.getInstance().removeWorker(taskName); + + } + public void addCallBack(Callable> templateCallable) { this.templateCallable = templateCallable; } From 907e2957afe37bad882a49c5d1ae6dd1dfeb2f33 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 20 Apr 2021 20:06:24 +0800 Subject: [PATCH 05/11] =?UTF-8?q?CHART-18997=20=E5=A4=84=E7=90=86=E4=B8=8B?= =?UTF-8?q?=E6=89=93=E5=BC=80=E6=A8=A1=E6=9D=BF=E5=87=BA=E9=94=99=E6=97=B6?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/OpenFailedPane.java | 92 ++++++++++++++++++ .../fr/design/images/mainframe/loading.gif | Bin 0 -> 17443 bytes .../design/images/mainframe/open_failed.png | Bin 0 -> 2550 bytes 3 files changed, 92 insertions(+) create mode 100644 designer-base/src/main/java/com/fr/design/mainframe/OpenFailedPane.java create mode 100644 designer-base/src/main/resources/com/fr/design/images/mainframe/loading.gif create mode 100644 designer-base/src/main/resources/com/fr/design/images/mainframe/open_failed.png diff --git a/designer-base/src/main/java/com/fr/design/mainframe/OpenFailedPane.java b/designer-base/src/main/java/com/fr/design/mainframe/OpenFailedPane.java new file mode 100644 index 0000000000..101585abb3 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/mainframe/OpenFailedPane.java @@ -0,0 +1,92 @@ +package com.fr.design.mainframe; + +import com.fr.design.dialog.link.MessageWithLink; +import com.fr.design.file.HistoryTemplateListCache; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.i18n.Toolkit; +import com.fr.general.IOUtils; +import com.fr.stable.StringUtils; +import java.awt.Color; +import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.LayoutManager; +import javax.swing.JPanel; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; + +/** + * @author hades + * @version 10.0 + * Created by hades on 2021/4/20 + */ +public class OpenFailedPane extends JPanel { + + private UILabel label; + private MessageWithLink link; + + public OpenFailedPane() { + this.setLayout(new LayoutManager() { + @Override + public void addLayoutComponent(String name, Component comp) { + + } + + @Override + public void removeLayoutComponent(Component comp) { + + } + + @Override + public Dimension preferredLayoutSize(Container parent) { + return parent.getPreferredSize(); + } + + @Override + public Dimension minimumLayoutSize(Container parent) { + return null; + } + + @Override + public void layoutContainer(Container parent) { + int width = parent.getParent().getWidth(); + int height = parent.getParent().getHeight(); + int labelWidth = label.getPreferredSize().width; + int labelHeight = label.getPreferredSize().height; + int labelX = (width - labelWidth) / 2; + int labelY = (height - labelHeight) / 2; + int linkWidth = link.getPreferredSize().width; + int linkHeight = link.getPreferredSize().height; + int linkX = (width - linkWidth) / 2; + int linkY = (height - labelHeight) / 2 + labelHeight; + label.setBounds(labelX, labelY, labelWidth, labelHeight); + link.setBounds(linkX, linkY, linkWidth, linkHeight); + } + }); + this.setBackground(Color.WHITE); + label = new UILabel(IOUtils.readIcon("/com/fr/design/images/mainframe/open_failed.png"), UILabel.CENTER); + link = new MessageWithLink(Toolkit.i18nText("Fine-Design_Open_Failed_Tip"), Toolkit.i18nText("Fine-Design_Open_Failed_Retry"), StringUtils.EMPTY, Color.WHITE) { + @Override + protected void initListener(String link) { + addHyperlinkListener(new HyperlinkListener() { + @Override + public void hyperlinkUpdate(HyperlinkEvent e) { + if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) { + // 重试 + JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + template = JTemplateFactory.createJTemplate(template.getEditingFILE()); + DesignerContext.getDesignerFrame().addAndActivateJTemplate(template); + HistoryTemplateListCache.getInstance(). setCurrentEditingTemplate(template); + } + } + }); + } + }; + link.setBackground(Color.WHITE); + this.add(label); + this.add(link); + } + + + +} diff --git a/designer-base/src/main/resources/com/fr/design/images/mainframe/loading.gif b/designer-base/src/main/resources/com/fr/design/images/mainframe/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..c77b4fe1006d29f61dddeb03fa96d3614184947c GIT binary patch literal 17443 zcmaKTcRY-zH8gEn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-8?q?=E5=AE=9A=E5=90=8E=E4=BF=9D=E5=AD=98=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datapane/connect/DatabaseConnectionPane.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java index 3e1e1f5315..61988cc69a 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java @@ -73,6 +73,7 @@ public abstract class DatabaseConnectionPane Date: Wed, 21 Apr 2021 11:48:37 +0800 Subject: [PATCH 07/11] =?UTF-8?q?REPORT-47952=20=E5=85=AC=E5=BC=8F?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E4=B8=AD=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=8E=B7=E5=8F=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/DesignModelAdapter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/DesignModelAdapter.java b/designer-base/src/main/java/com/fr/design/DesignModelAdapter.java index 7a237ffb59..04fcd5144f 100644 --- a/designer-base/src/main/java/com/fr/design/DesignModelAdapter.java +++ b/designer-base/src/main/java/com/fr/design/DesignModelAdapter.java @@ -283,6 +283,9 @@ public abstract class DesignModelAdapter map, Filter filter) { + + // 兼容下通过老数据集参数获取 + tableDataParameters = getLatestTableDataParameters(); // 处理初始化添加 if (tableDataParametersMap.isEmpty()) { From b72d94b00377a0dfe844b2470e3127ecc525f3cf Mon Sep 17 00:00:00 2001 From: lucian Date: Wed, 21 Apr 2021 15:25:16 +0800 Subject: [PATCH 08/11] =?UTF-8?q?REPORT-50908=20=E5=A1=AB=E6=8A=A5-?= =?UTF-8?q?=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7=E8=AE=BE=E7=BD=AE-?= =?UTF-8?q?=E5=A1=AB=E6=8A=A5=E5=B1=9E=E6=80=A7=E4=B8=AD=E5=AF=B9=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=AE=9A=E4=BD=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/ChoosePane.java | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java index 6460cadb9e..2a8446f893 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java @@ -1,7 +1,6 @@ package com.fr.design.data.datapane; import com.fr.base.TableData; -import com.fr.concurrent.NamedThreadFactory; import com.fr.data.core.DataCoreUtils; import com.fr.data.core.db.DBUtils; import com.fr.data.core.db.TableProcedure; @@ -18,7 +17,7 @@ import com.fr.design.data.datapane.preview.PreviewLabel.Previewable; import com.fr.design.data.datapane.preview.PreviewTablePane; import com.fr.design.data.tabledata.Prepare4DataSourceChange; import com.fr.design.dialog.FineJOptionPane; -import com.fr.design.gui.icombobox.SearchPreTaskTreeComboBox; +import com.fr.design.gui.icombobox.FRTreeComboBox; import com.fr.design.gui.icombobox.FilterableComboBoxModel; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBoxEditor; @@ -60,10 +59,6 @@ import java.util.Collection; import java.util.Enumeration; import java.util.List; import java.util.Set; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.FutureTask; /** * @author zhou @@ -85,25 +80,20 @@ public class ChoosePane extends BasicBeanPane implements Refresha /** * 表名 */ - protected SearchPreTaskTreeComboBox tableNameComboBox; + protected FRTreeComboBox tableNameComboBox; private SwingWorker populateWorker; - private static final ExecutorService SERVICE = Executors.newSingleThreadExecutor(new NamedThreadFactory("ChoosePaneThread")); - private PopupMenuListener popupMenuListener = new PopupMenuListener() { @Override public void popupMenuWillBecomeVisible(PopupMenuEvent e) { - FutureTask task = new FutureTask(new Callable() { + new Thread() { @Override - public Object call() { + public void run() { calculateTableDataNames(); - return null; } - }); - SERVICE.submit(task); - tableNameComboBox.setPreSearchTask(task); + }.start(); } @Override @@ -167,7 +157,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha schemaBox = new StringUIComboBox(); schemaBox.setEditor(new ComboBoxEditor()); - tableNameComboBox = new SearchPreTaskTreeComboBox(new JTree(new DefaultMutableTreeNode()), tableNameTreeRenderer, false); + tableNameComboBox = new FRTreeComboBox(new JTree(new DefaultMutableTreeNode()), tableNameTreeRenderer, false); tableNameComboBox.setEditable(true); tableNameComboBox.setRenderer(listCellRenderer); registerDSChangeListener(); From e8a70ea8bf01de9cb99a8a0b468a21d883ee50fb Mon Sep 17 00:00:00 2001 From: shine Date: Thu, 22 Apr 2021 14:20:43 +0800 Subject: [PATCH 09/11] =?UTF-8?q?CHART-18997design=20=E8=A1=A8=E5=8D=95=20?= =?UTF-8?q?=E6=89=A9=E5=B1=95=E5=9B=BE=E8=A1=A8=E5=9B=BE=E8=A1=A8=E5=9D=97?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E5=A4=B1=E8=B4=A5=20=E4=B8=8D=E5=90=9E?= =?UTF-8?q?=E6=8A=9B=E9=94=99rethrow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/mainframe/DesignerFrame.java | 2 +- .../main/java/com/fr/design/worker/open/OpenWorker.java | 9 +++++---- .../main/java/com/fr/design/mainframe/app/CptApp.java | 2 +- .../main/java/com/fr/design/mainframe/app/CptxApp.java | 2 +- .../main/java/com/fr/design/mainframe/app/FormApp.java | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index b66e6046bf..abedf38805 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -4,7 +4,7 @@ package com.fr.design.mainframe; import com.fr.base.BaseUtils; -import com.fr.chart.exception.ChartNotFoundException; +import com.fr.base.chart.exception.ChartNotFoundException; import com.fr.design.DesignModelAdapter; import com.fr.design.DesignState; import com.fr.design.DesignerEnvManager; diff --git a/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java b/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java index 2da4d335ec..f556eb612e 100644 --- a/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java +++ b/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java @@ -1,6 +1,6 @@ package com.fr.design.worker.open; -import com.fr.chart.exception.ChartNotFoundException; +import com.fr.base.chart.exception.ChartNotFoundException; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.i18n.Toolkit; @@ -13,13 +13,14 @@ import com.fr.exception.DecryptTemplateException; import com.fr.file.FILE; import com.fr.general.ComparatorUtils; import com.fr.log.FineLoggerFactory; + +import javax.swing.JOptionPane; +import javax.swing.SwingWorker; +import javax.swing.UIManager; import java.util.concurrent.Callable; import java.util.concurrent.CancellationException; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import javax.swing.JOptionPane; -import javax.swing.SwingWorker; -import javax.swing.UIManager; /** * 模板打开的worker diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java index b55640990a..5733151c16 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/CptApp.java @@ -3,9 +3,9 @@ package com.fr.design.mainframe.app; import com.fr.base.BaseUtils; import com.fr.base.Style; import com.fr.base.TempNameStyle; +import com.fr.base.chart.exception.ChartNotFoundException; import com.fr.base.extension.FileExtension; import com.fr.base.io.XMLEncryptUtils; -import com.fr.chart.exception.ChartNotFoundException; import com.fr.config.ServerPreferenceConfig; import com.fr.design.DesignerEnvManager; import com.fr.design.actions.server.StyleListAction; diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/CptxApp.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/CptxApp.java index c7411e942f..95104e2f8e 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/CptxApp.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/CptxApp.java @@ -1,9 +1,9 @@ package com.fr.design.mainframe.app; +import com.fr.base.chart.exception.ChartNotFoundException; import com.fr.base.extension.FileExtension; import com.fr.base.frpx.exception.FRPackageRunTimeException; import com.fr.base.frpx.exception.InvalidWorkBookException; -import com.fr.chart.exception.ChartNotFoundException; import com.fr.design.i18n.Toolkit; import com.fr.exception.DecryptTemplateException; import com.fr.exception.RemoteDesignPermissionDeniedException; diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java b/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java index 6f801e058c..616d4be079 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java @@ -1,8 +1,8 @@ package com.fr.design.mainframe.app; import com.fr.base.Parameter; +import com.fr.base.chart.exception.ChartNotFoundException; import com.fr.base.io.XMLEncryptUtils; -import com.fr.chart.exception.ChartNotFoundException; import com.fr.design.DesignerEnvManager; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.AbstractAppProvider; From 1a028c69f12910ccccd58db15560fc0b9393ad0c Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 23 Apr 2021 10:36:48 +0800 Subject: [PATCH 10/11] =?UTF-8?q?REPORT-51446=20=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E8=A1=A8=E5=90=AF=E5=8A=A8=E8=AE=BE=E8=AE=A1=E5=99=A8=E4=BC=9A?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E5=B9=B6=E9=97=AA=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer-base/src/main/java/com/fr/start/BaseDesigner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/start/BaseDesigner.java b/designer-base/src/main/java/com/fr/start/BaseDesigner.java index 5eaab74a52..b3945d0d7f 100644 --- a/designer-base/src/main/java/com/fr/start/BaseDesigner.java +++ b/designer-base/src/main/java/com/fr/start/BaseDesigner.java @@ -155,7 +155,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock { isException = true;//此时有文件nullpointer异常,执行打开空文件 } } - if (file.exists() && !isException) { + if (file != null && file.exists() && !isException) { df.openTemplate(file); } else { df.addAndActivateJTemplate(); From fb0d6575de14889736788e0819b4e0d528989cae Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 23 Apr 2021 14:59:09 +0800 Subject: [PATCH 11/11] =?UTF-8?q?REPORT-51317=20=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E5=90=8E=EF=BC=8C=E4=BF=9D=E5=AD=98=E4=B8=AD?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=8A=A8=E7=94=BB=E8=BF=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/worker/save/SaveWorker.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/worker/save/SaveWorker.java b/designer-base/src/main/java/com/fr/design/worker/save/SaveWorker.java index 2ce5089705..f6c21f208d 100644 --- a/designer-base/src/main/java/com/fr/design/worker/save/SaveWorker.java +++ b/designer-base/src/main/java/com/fr/design/worker/save/SaveWorker.java @@ -52,13 +52,19 @@ public class SaveWorker extends SwingWorker { try { success = get(); } catch (Exception e) { + processResult(); FineLoggerFactory.getLogger().error(e.getMessage(), e); FineJOptionPane.showMessageDialog( DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design-Basic_Save_Failure"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), JOptionPane.ERROR_MESSAGE); + return; } + processResult(); + } + + private void processResult() { this.template.setSaving(false); // 恢复界面 if (slowly && ComparatorUtils.equals(this.template.getName(), HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getName())) {