From bc9a93d903fa1fc49f141dfbdd0ef06c2d25bed8 Mon Sep 17 00:00:00 2001 From: Yvan Date: Mon, 14 Dec 2020 14:41:00 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-44961=20=E6=8A=8ATableDataDictPane?= =?UTF-8?q?=E4=B8=AD=E7=9A=84needTableDataChange=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BAtrue=EF=BC=8C=E5=9C=A8CheckBoxGroupD?= =?UTF-8?q?efinePane=E4=B8=AD=E5=88=9B=E5=BB=BADictionaryPane=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E4=BC=A0=E5=85=A5=E4=B8=80=E4=B8=AAfalse?= =?UTF-8?q?=EF=BC=8C=E8=BF=99=E6=A0=B7=E5=B0=B1=E4=B8=8D=E4=BC=9A=E5=BD=B1?= =?UTF-8?q?=E5=93=8D=E5=85=B6=E5=AE=83=E4=BD=BF=E7=94=A8=E4=BA=86Dictionar?= =?UTF-8?q?yPane=E7=9A=84=E5=9C=B0=E6=96=B9=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../accessibles/AccessibleDictionaryEditor.java | 1 - .../java/com/fr/design/present/DictPresentPane.java | 1 - .../com/fr/design/present/dict/DictionaryPane.java | 11 +++++++---- .../fr/design/present/dict/TableDataDictPane.java | 12 ++++++++---- .../widget/ui/designer/CheckBoxGroupDefinePane.java | 4 ++-- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleDictionaryEditor.java b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleDictionaryEditor.java index 6be31c526..3edf47b05 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleDictionaryEditor.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/AccessibleDictionaryEditor.java @@ -21,7 +21,6 @@ public class AccessibleDictionaryEditor extends UneditableAccessibleEditor { protected void showEditorPane() { if (dictPane == null) { dictPane = new DictionaryPane(); - dictPane.setNeedTableDataChange(true); } BasicDialog dlg = dictPane.showWindow(SwingUtilities.getWindowAncestor(this)); diff --git a/designer-base/src/main/java/com/fr/design/present/DictPresentPane.java b/designer-base/src/main/java/com/fr/design/present/DictPresentPane.java index 85f027217..82cf70372 100644 --- a/designer-base/src/main/java/com/fr/design/present/DictPresentPane.java +++ b/designer-base/src/main/java/com/fr/design/present/DictPresentPane.java @@ -19,7 +19,6 @@ public class DictPresentPane extends FurtherBasicBeanPane implement public DictPresentPane() { dictionaryPane = new DictionaryPane(); - dictionaryPane.setNeedTableDataChange(true); this.setLayout(new BorderLayout()); this.add(dictionaryPane, BorderLayout.CENTER); } diff --git a/designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java b/designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java index f74138be5..3f42732f1 100644 --- a/designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java +++ b/designer-base/src/main/java/com/fr/design/present/dict/DictionaryPane.java @@ -24,6 +24,13 @@ import java.util.List; public class DictionaryPane extends UIComboBoxPane implements DataCreatorUI, Prepare4DataSourceChange { private TableDataDictPane tableDataDictPane; + public DictionaryPane() { + } + + public DictionaryPane(boolean needTableDataChange) { + this.tableDataDictPane.setNeedTableDataChange(needTableDataChange); + } + @Override protected void initLayout() { this.setLayout(new BorderLayout(0, 4)); @@ -83,8 +90,4 @@ public class DictionaryPane extends UIComboBoxPane implements DataCr public void registerDSChangeListener() { tableDataDictPane.registerDSChangeListener(); } - - public void setNeedTableDataChange(boolean needTableDataChange) { - tableDataDictPane.setNeedTableDataChange(needTableDataChange); - } } diff --git a/designer-base/src/main/java/com/fr/design/present/dict/TableDataDictPane.java b/designer-base/src/main/java/com/fr/design/present/dict/TableDataDictPane.java index 098280bc5..5eb6c2873 100644 --- a/designer-base/src/main/java/com/fr/design/present/dict/TableDataDictPane.java +++ b/designer-base/src/main/java/com/fr/design/present/dict/TableDataDictPane.java @@ -64,7 +64,7 @@ public class TableDataDictPane extends FurtherBasicBeanPane private ItemListener itemListener; private UIObserverListener uiObserverListener; private FormulaEditor localFormulaEditor = new FormulaEditor(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter_Formula")); - private boolean needTableDataChange = false; + private boolean needTableDataChange = true; public TableDataDictPane() { initBasicComponets(); @@ -95,7 +95,7 @@ public class TableDataDictPane extends FurtherBasicBeanPane tableDataNameComboBox = new TableDataComboBox(DesignTableDataManager.getEditingTableDataSource()); tableDataNameComboBox.addItemListener(e -> { if (e.getStateChange() == ItemEvent.SELECTED) { - tdChange(e, needTableDataChange); + tdChange(e); } }); // keyColumnPane = ValueEditorPaneFactory.createValueEditorPane(new Editor[]{new ColumnNameEditor(), new ColumnIndexEditor()}); @@ -164,7 +164,7 @@ public class TableDataDictPane extends FurtherBasicBeanPane return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Dic_Data_Query"); } - private void tdChange(final ItemEvent e, boolean needTableDataChange) { + private void tdChange(final ItemEvent e) { TableDataWrapper tableDataWrappe = this.tableDataNameComboBox.getSelectedItem(); if (tableDataWrappe == null) { return; @@ -173,7 +173,7 @@ public class TableDataDictPane extends FurtherBasicBeanPane itemListener.itemStateChanged(e); localFormulaEditor.addChangeListener(event -> itemListener.itemStateChanged(e)); } - if (needTableDataChange) { + if (isNeedTableDataChange()) { changeColumnsName(); } } @@ -404,4 +404,8 @@ public class TableDataDictPane extends FurtherBasicBeanPane public void registerDSChangeListener() { tableDataNameComboBox.registerGlobalDSChangeListener(); } + + public boolean isNeedTableDataChange() { + return needTableDataChange; + } } diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java index 19a61a631..022afc610 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/CheckBoxGroupDefinePane.java @@ -29,9 +29,9 @@ public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane