From 0aa84fb9da06a7edd7b00c8086b3b2edc67aaacc Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 1 Nov 2016 19:02:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=20?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E6=A0=91=E6=98=AF=E5=90=A6=E5=8E=BB=E9=87=8D?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/widget/ui/TreeEditorDefinePane.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java index f09998325..9123eabc0 100644 --- a/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java @@ -1,18 +1,16 @@ package com.fr.design.widget.ui; -import java.awt.BorderLayout; - -import javax.swing.BorderFactory; -import javax.swing.JPanel; - import com.fr.design.data.DataCreatorUI; +import com.fr.design.gui.frpane.TreeSettingPane; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.itree.refreshabletree.TreeRootPane; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.gui.frpane.TreeSettingPane; import com.fr.form.ui.TreeEditor; import com.fr.general.Inter; +import javax.swing.*; +import java.awt.*; + /* * richer:tree editor @@ -31,12 +29,14 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane { protected void populateSubFieldEditorBean(TreeEditor e) { this.treeSettingPane.populate(e); treeRootPane.populate(e.getTreeAttr()); + this.removeRepeatCheckBox.setSelected(e.isRemoveRepeat()); } @Override protected TreeEditor updateSubFieldEditorBean() { TreeEditor editor = treeSettingPane.updateTreeEditor(); editor.setTreeAttr(treeRootPane.update()); + editor.setRemoveRepeat(this.removeRepeatCheckBox.isSelected()); return editor; } From 752e05ecd523d904393776f1ed92ea6d5a613045 Mon Sep 17 00:00:00 2001 From: zack Date: Wed, 2 Nov 2016 09:42:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E6=9C=89npe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/widget/ui/TreeEditorDefinePane.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java index 9123eabc0..10210738f 100644 --- a/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java @@ -29,14 +29,18 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane { protected void populateSubFieldEditorBean(TreeEditor e) { this.treeSettingPane.populate(e); treeRootPane.populate(e.getTreeAttr()); - this.removeRepeatCheckBox.setSelected(e.isRemoveRepeat()); + if (this.removeRepeatCheckBox != null) { + this.removeRepeatCheckBox.setSelected(e.isRemoveRepeat()); + } } @Override protected TreeEditor updateSubFieldEditorBean() { TreeEditor editor = treeSettingPane.updateTreeEditor(); editor.setTreeAttr(treeRootPane.update()); - editor.setRemoveRepeat(this.removeRepeatCheckBox.isSelected()); + if (this.removeRepeatCheckBox != null) { + editor.setRemoveRepeat(this.removeRepeatCheckBox.isSelected()); + } return editor; }