From 5eaaf35d7f72bde9c86390f20df9dbca19bc3d09 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Fri, 3 Sep 2021 11:57:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-57868=20=E8=A7=A3=E5=86=B3=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=A0=BC=E5=88=87=E6=8D=A2=E5=85=83=E7=B4=A0=E7=9A=84?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/insert/cell/GeneralCellAction.java | 8 ++++++++ .../java/com/fr/design/cell/editor/TextCellEditor.java | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/insert/cell/GeneralCellAction.java b/designer-realize/src/main/java/com/fr/design/actions/insert/cell/GeneralCellAction.java index ae805e027..758c4e335 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/insert/cell/GeneralCellAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/insert/cell/GeneralCellAction.java @@ -10,6 +10,7 @@ import com.fr.design.menu.MenuKeySet; import javax.swing.*; +import java.awt.event.ActionEvent; /** * @@ -52,4 +53,11 @@ public class GeneralCellAction extends AbstractCellAction implements WorkBookSup public Class getCellValueClass() { return String.class; } + + @Override + public void actionPerformed(ActionEvent evt) { + super.actionPerformed(evt); + this.getEditingComponent().getGrid().getCellEditor().stopCellEditing(); + } + } diff --git a/designer-realize/src/main/java/com/fr/design/cell/editor/TextCellEditor.java b/designer-realize/src/main/java/com/fr/design/cell/editor/TextCellEditor.java index 898474d1c..c0995fe0c 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/editor/TextCellEditor.java +++ b/designer-realize/src/main/java/com/fr/design/cell/editor/TextCellEditor.java @@ -129,7 +129,7 @@ public class TextCellEditor extends AbstractCellEditor { } this.oldValue = Utils.objectToString(value); - this.textField.setText(oldValue); + resetTextWithoutDocumentListener(oldValue); //peter:只读方式获得Style. Style style = null; if(cellElement != null) { @@ -176,4 +176,11 @@ public class TextCellEditor extends AbstractCellEditor { public void keyReleased(KeyEvent evt) { } }; + + + private void resetTextWithoutDocumentListener(String text) { + this.textField.getDocument().removeDocumentListener(documentlistener); + this.textField.setText(text); + this.textField.getDocument().addDocumentListener(documentlistener); + } } \ No newline at end of file From 959d8b953d9abe66337c6d1d7c99a8aa34552e67 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Fri, 3 Sep 2021 15:29:01 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-58746=20zip=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/share/action/InstallComponentAction.java | 4 +++- .../com/fr/design/mainframe/share/util/InstallUtils.java | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java b/designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java index a845759f7..6cb00b6ff 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java @@ -95,7 +95,9 @@ public class InstallComponentAction extends UpdateAction { } ShareWidgetInfoManager.getInstance().saveXmlInfo(); - boolean needShowMessage = (chosenFiles.length > 1 && chosenFiles.length != failureList.size()) || containRues(chosenFiles); + boolean reuNeedShowMessage = chosenFiles.length > 1 && chosenFiles.length != failureList.size(); + boolean reusNeedShowMessage = containRues(chosenFiles) && !failureList.isEmpty(); + boolean needShowMessage = reuNeedShowMessage || reusNeedShowMessage; return new InstallBackInfo(installStatus, needShowMessage, failureList); } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java b/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java index 610f688a4..cd3e8c1ad 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java @@ -30,9 +30,14 @@ public class InstallUtils { * 安装组件包 */ public static boolean installReusFile(File chosenFile, long installTime, List list) { - return installReusFile(chosenFile, installTime, list, o -> { + InstallResult installResult = installReusFile(chosenFile, installTime, list, o -> { //do nothing - }).installStatus; + }); + Group group = installResult.group; + if (group.getAllBindInfoList().length == 0) { + DefaultShareGroupManager.getInstance().removeGroup(group); + } + return installResult.installStatus; } /** From 52c9bbd735a31173b94e6b782f03facc43abe1a1 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Fri, 3 Sep 2021 17:36:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?EPORT-58647=20=E5=88=9B=E5=BB=BA=E5=85=B1?= =?UTF-8?q?=E4=BA=AB=E7=BB=84=E4=BB=B6=E5=B0=81=E9=9D=A2=E5=9B=BE=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E7=BB=98=E5=88=B6=E8=83=8C=E6=99=AF=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/share/action/CreateComponentAction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java b/designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java index 1baac868f..53bea9480 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/action/CreateComponentAction.java @@ -251,7 +251,7 @@ public class CreateComponentAction extends UpdateAction { private Image componentToImage(Component comp, Rectangle rect) { - BufferedImage im = new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_ARGB); + BufferedImage im = new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_RGB); comp.paint(im.getGraphics()); return im; } @@ -260,7 +260,7 @@ public class CreateComponentAction extends UpdateAction { private Image moduleToImage(Form form, ElementCaseEditor editor, Map parameterMap, Rectangle rect) { if (editor == null) { - return new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_ARGB); + return new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_RGB); } FormElementCaseProvider provider = editor.getElementCase(); provider.setName(editor.getWidgetName());