From 90394c357d4933e24a8bf9145eba7d611796327a Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 18 Jun 2020 15:03:45 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-33599=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=A0=8F=E5=AF=BC=E5=87=BAtxt=EF=BC=8C?= =?UTF-8?q?=E5=BD=93=E4=BF=AE=E6=94=B9=E5=AF=BC=E5=87=BA=E7=9A=84=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=97=B6=E6=A8=A1=E7=89=88=E4=BC=9A=E8=A2=AB=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E4=B8=BA=E5=BE=85=E4=BF=9D=E5=AD=98=E7=8A=B6=E6=80=81?= =?UTF-8?q?=20&&=20REPORT-33525=20=E5=88=A0=E9=99=A4=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E7=9A=84Js=E6=88=96=E8=80=85css=20=E6=9C=89=E6=AD=A7=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/frpane/EditingStringListPane.java | 6 +++++- .../fr/design/parameter/ParameterInputPane.java | 17 +++++++++++------ .../export/AbstractWorkBookExportAction.java | 10 ++++++++-- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java index 068e9cc9d..7168db0b5 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/EditingStringListPane.java @@ -3,6 +3,7 @@ package com.fr.design.gui.frpane; import com.fr.design.beans.BasicBeanPane; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.JListUtils; @@ -150,7 +151,10 @@ public abstract class EditingStringListPane extends BasicBeanPane> public void actionPerformed(ActionEvent e) { Object selected = jlist.getSelectedValue(); if (selected != null) { - int re = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(EditingStringListPane.this), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sure_To_Delete") + selected.toString() + "?"); + int re = FineJOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(EditingStringListPane.this), + Toolkit.i18nText("Fine-Design_Basic_Sure_To_Delete") + selected.toString() + "?", + Toolkit.i18nText("Fine-Design_Basic_Confirm"), + JOptionPane.OK_CANCEL_OPTION); if (re == JOptionPane.OK_OPTION) { JListUtils.removeSelectedListItems(jlist); } diff --git a/designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java b/designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java index 8e8819c67..b16e6b279 100644 --- a/designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java +++ b/designer-base/src/main/java/com/fr/design/parameter/ParameterInputPane.java @@ -106,12 +106,8 @@ public class ParameterInputPane extends BasicPane { contentPane.add(flowTableLayoutHelper.createLabelFlowPane(parameterDisplayName + ":", editPane)); //add editor to parameter hashtable. - textF.getCurrentEditor().addChangeListener(new ChangeListener() { - @Override - public void stateChanged(ChangeEvent e) { - HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTargetModified(); - } - }); + initTextListener(textF); + this.editorNameMap.put(textF, parameter.getName()); nameAddedList.add(parameter.getName()); } @@ -120,6 +116,15 @@ public class ParameterInputPane extends BasicPane { flowTableLayoutHelper.adjustLabelWidth(); } + protected void initTextListener(ValueEditorPane textF) { + textF.getCurrentEditor().addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTargetModified(); + } + }); + } + private Editor[] makeEditorByValue(Object pv) { Editor[] editors = {null}; if (pv instanceof Integer) { diff --git a/designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractWorkBookExportAction.java b/designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractWorkBookExportAction.java index 22a411820..a96dbf6bb 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractWorkBookExportAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/file/export/AbstractWorkBookExportAction.java @@ -5,6 +5,7 @@ package com.fr.design.actions.file.export; import com.fr.base.Parameter; import com.fr.design.dialog.DialogActionAdapter; +import com.fr.design.editor.ValueEditorPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JWorkBook; import com.fr.design.parameter.ParameterInputPane; @@ -43,8 +44,13 @@ public abstract class AbstractWorkBookExportAction extends AbstractExportAction< Parameter[] parameters = tpl.getParameters(); // 检查Parameter if (parameters != null && parameters.length > 0) { - final ParameterInputPane pPane = new ParameterInputPane( - parameters); + final ParameterInputPane pPane = new ParameterInputPane(parameters) { + @Override + protected void initTextListener(ValueEditorPane textF) { + // 导出不做处理 + // do noting + } + }; pPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { @Override public void doOk() {