From 19e798b709cd635f56b412ec824439065bb984fe Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 14 Sep 2017 15:24:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-4581=20=E6=8A=A5=E8=A1=A8=E5=9D=97?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F-=E6=A0=87=E9=A2=98=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=B8=8D=E8=B5=B7=E4=BD=9C=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/XBorderStyleWidgetCreator.java | 8 ++++++++ .../design/mainframe/widget/ui/FormWidgetCardPane.java | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java b/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java index e2b01a646..7dd2a0bc0 100644 --- a/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java @@ -148,5 +148,13 @@ public class XBorderStyleWidgetCreator extends XWidgetCreator{ public boolean supportSetVisibleOrEnable(){ return false; } + + /** + * data属性改变触发其他操作 + * + */ + public void firePropertyChange(){ + initStyle(); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 60f8cbe05..068c896dc 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -152,8 +152,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { private void initDefinePane() { currentEditorDefinePane = null; - boolean dedicateLayout = xCreator.acceptType(XWScaleLayout.class) && xCreator.getComponentCount() > 0 && ((XCreator) xCreator.getComponent(0)).shouldScaleCreator() || xCreator.acceptType(XWTitleLayout.class); - XCreator creator = dedicateLayout ? (XCreator) xCreator.getComponent(0) : xCreator; + XCreator creator = getXCreatorDedicated(); FormWidgetDefinePaneFactoryBase.RN rn = FormWidgetDefinePaneFactoryBase.createWidgetDefinePane(creator, creator.toData(), new Operator() { @Override public void did(DataCreatorUI ui, String cardName) { @@ -168,6 +167,10 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { currentEditorDefinePane = definePane; } + private XCreator getXCreatorDedicated(){ + boolean dedicateLayout = xCreator.acceptType(XWScaleLayout.class) && xCreator.getComponentCount() > 0 && ((XCreator) xCreator.getComponent(0)).shouldScaleCreator() || xCreator.acceptType(XWTitleLayout.class); + return dedicateLayout ? (XCreator) xCreator.getComponent(0) : xCreator; + } @Override public String title4PopupWindow() { @@ -217,7 +220,8 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { } public void fireValueChanged() { - xCreator.firePropertyChange(); + XCreator creator = getXCreatorDedicated(); + creator.firePropertyChange(); designer.fireTargetModified(); designer.refreshDesignerUI(); } From e23afa15590bfc5d38fc4431539863c8ac820fe4 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 14 Sep 2017 15:25:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 068c896dc..fb75edbab 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -8,7 +8,6 @@ import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.FormDesigner; import com.fr.design.widget.DataModify; import com.fr.design.widget.Operator;