From 26438dce0f9c108367b9303b5f79d78721ba15ee Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 13 May 2022 13:56:05 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-71402=20fvs=E4=BD=BF=E7=94=A8=E5=90=AB?= =?UTF-8?q?=E6=9C=89SQL=E7=9A=84=E5=85=AC=E5=BC=8F=EF=BC=8C=E6=A8=A1?= =?UTF-8?q?=E6=8B=9F=E8=AE=A1=E7=AE=97=E6=97=B6=EF=BC=8C=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=8D=A1=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/formula/FormulaPane.java | 3 +- .../ParameterInputNoneListenerPane.java | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 designer-base/src/main/java/com/fr/design/parameter/ParameterInputNoneListenerPane.java 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 ef321e7081..2c5db9a314 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 @@ -38,6 +38,7 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; +import com.fr.design.parameter.ParameterInputNoneListenerPane; import com.fr.design.parameter.ParameterInputPane; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; @@ -964,7 +965,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { if (parameters.length < 1 && editor4CalPane.update().size() < 1) { return parameterMap; } - ParameterInputPane pPane = new ParameterInputPane(parameters); + ParameterInputPane pPane = new ParameterInputNoneListenerPane(parameters); pPane.showSmallWindow(new JFrame(), new DialogActionAdapter() { @Override public void doOk() { diff --git a/designer-base/src/main/java/com/fr/design/parameter/ParameterInputNoneListenerPane.java b/designer-base/src/main/java/com/fr/design/parameter/ParameterInputNoneListenerPane.java new file mode 100644 index 0000000000..2484a4b206 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/parameter/ParameterInputNoneListenerPane.java @@ -0,0 +1,30 @@ +package com.fr.design.parameter; + +import com.fr.design.editor.ValueEditorPane; +import com.fr.stable.ParameterProvider; + +/** + * 与ParameterInputPane区别在于 输入参数不会触发模板修改事件 + * + * 适用于参数不需要存储在模板中的场景 + * + * @author hades + * @version 11.0 + * Created by hades on 2022/5/13 + */ +public class ParameterInputNoneListenerPane extends ParameterInputPane { + + public ParameterInputNoneListenerPane(ParameterProvider[] parameters) { + super(parameters); + } + + public ParameterInputNoneListenerPane(ParameterProvider[] parameters, boolean allowBlank) { + super(parameters, allowBlank); + } + + @Override + protected void initTextListener(ValueEditorPane textF) { + // 这边输入参数 不用联动模板变化激活保存按钮 相关参数并不存储在模板 + // do nothing + } +}