From 2b1d0bb9f60ab4e367d4539e8af06f72efb46c90 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 5 Sep 2017 14:18:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-3958=20&&=20REPORT-4374=20[9.0?= =?UTF-8?q?=E4=B8=80=E8=BD=AE=E5=9B=9E=E5=BD=92]=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=8C=89=E9=92=AE=E7=B1=BB=E5=9E=8B=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=97=A0=E6=95=88=20=E6=8E=A7=E4=BB=B6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E6=A0=87=E7=AD=BE=E5=90=8D=E7=A7=B0=EF=BC=8C?= =?UTF-8?q?=E6=9C=89=E7=9A=84=E6=8E=A7=E4=BB=B6=E8=83=BD=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=9C=89=E7=9A=84=E4=B8=8D=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/CellWidgetPropertyPane.java | 10 +++- .../src/com/fr/design/widget/WidgetPane.java | 4 ++ .../fr/design/widget/ui/ButtonDefinePane.java | 4 ++ .../widget/ui/btn/ButtonSytleDefinedPane.java | 60 +++++++++---------- .../widget/ui/btn/FreeButtonDetailPane.java | 18 ++---- .../ui/designer/CheckBoxDefinePane.java | 2 + .../ui/designer/DateEditorDefinePane.java | 3 - 7 files changed, 51 insertions(+), 50 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java b/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java index e0a2cf441..39b3e3d93 100644 --- a/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java +++ b/designer/src/com/fr/design/mainframe/CellWidgetPropertyPane.java @@ -75,8 +75,8 @@ public class CellWidgetPropertyPane extends BasicPane { FRContext.getLogger().error(e.getMessage(), e); } } - cellEditorDefPane.populate(cellWidget); + cellEditorDefPane.populate(cellWidget); } @@ -122,10 +122,16 @@ public class CellWidgetPropertyPane extends BasicPane { } } }); - DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); + if(DesignerContext.getDesignerFrame().getSelectedJTemplate() != null){ + DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); + } } + public void reInitAllListener(){ + cellEditorDefPane.registerListener(); + } + private Widget upDateWidgetAuthority(TemplateCellElement cellElement, Widget newWidget) { try { Widget oldWidget = (Widget) cellElement.getWidget().clone(); diff --git a/designer/src/com/fr/design/widget/WidgetPane.java b/designer/src/com/fr/design/widget/WidgetPane.java index 593bf2197..61e79acb8 100644 --- a/designer/src/com/fr/design/widget/WidgetPane.java +++ b/designer/src/com/fr/design/widget/WidgetPane.java @@ -163,6 +163,10 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener } + public void registerListener(){ + initAllListeners(); + } + private static class EditorTypeComboBox extends UIComboBox { private Item item = new Item(Inter.getLocText("Widget-User_Defined"), diff --git a/designer/src/com/fr/design/widget/ui/ButtonDefinePane.java b/designer/src/com/fr/design/widget/ui/ButtonDefinePane.java index 3d2a703dd..59a5b62bb 100644 --- a/designer/src/com/fr/design/widget/ui/ButtonDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ButtonDefinePane.java @@ -1,10 +1,12 @@ package com.fr.design.widget.ui; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.CellWidgetPropertyPane; import com.fr.design.widget.ui.btn.ButtonDetailPaneFactory; import com.fr.form.ui.Button; import com.fr.form.ui.FreeButton; import com.fr.design.widget.btn.ButtonDetailPane; + import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.*; @@ -38,6 +40,8 @@ public class ButtonDefinePane extends AbstractDataModify