From 155264458b41737dadeba6d405e82b5c2193fe4b Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Thu, 24 Mar 2022 15:52:55 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-68061=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E5=85=83=E7=B4=A0-=E6=95=B0=E6=8D=AE=E8=AE=BE=E7=BD=AE-?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=88=86=E7=BB=84=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E7=82=B9=E5=87=BB=E7=A1=AE=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cellquick/CellDSColumnEditor.java | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java b/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java index 23015e9d0..486492161 100644 --- a/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java +++ b/designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java @@ -282,7 +282,7 @@ public class CellDSColumnEditor extends CellQuickEditor { private void initComponents(){ dataPane = new SelectedDataColumnPane(true, true); groupPane = new ResultSetGroupDockingPane(); - + initListener(); double[] rowSize = {P}, columnSize = {60, F}; UILabel uiLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Filter_Conditions")); condition = new DSColumnConditionAction(); @@ -299,6 +299,35 @@ public class CellDSColumnEditor extends CellQuickEditor { conditionPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); } + + + private void initListener() { + dataPane.setListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + if (e.getStateChange() == ItemEvent.SELECTED) { + dataPane.update(cellElement); + fireTargetModified(); + } + } + }); + groupPane.setListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + if (e == null) { + //分组-高级-自定义点确定的时候传进来null的e,但是这时候应该触发保存 + groupPane.update(); + fireTargetModified(); + return; + } + if (e.getStateChange() == ItemEvent.DESELECTED) { + groupPane.update(); + fireTargetModified(); + } + } + }); + } + @Override protected AttributeChangeListener getAttributeChangeListener() { return new AttributeChangeListener() {