From 92e1b01f5f0f03e74c54d8da7e25bedc0662b8bd Mon Sep 17 00:00:00 2001 From: zhouping Date: Tue, 8 Nov 2016 14:59:16 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-750=20=E8=A1=A8=E5=8D=95=E5=85=B1?= =?UTF-8?q?=E5=88=9B=E5=86=85=E6=B5=8B=E9=97=AE=E9=A2=98=20bugfix3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../creator/XWAbsoluteBodyLayout.java | 39 +++++++++++++++++++ .../src/com/fr/design/mainframe/JForm.java | 3 +- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java index e4008df6f1..e41ac8cba5 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java @@ -2,9 +2,19 @@ package com.fr.design.designer.creator; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRAbsoluteBodyLayoutAdapter; +import com.fr.design.form.util.XCreatorConstants; +import com.fr.design.mainframe.widget.editors.PaddingMarginEditor; +import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor; +import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer; +import com.fr.design.mainframe.widget.renderer.PaddingMarginCellRenderer; +import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.container.WAbsoluteBodyLayout; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; +import com.fr.stable.core.PropertyChangeAdapter; import java.awt.*; +import java.beans.IntrospectionException; /** * Created by zhouping on 2016/10/14. @@ -52,4 +62,33 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout { public boolean isSupportDrag() { return false; } + + /** + * 得到属性名 + * + * @return 属性名 + * @throws java.beans.IntrospectionException + */ + @Override + public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { + return new CRPropertyDescriptor[] { + new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter + .getLocText("FR-Designer_Form-Widget_Name")), + new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass( + WLayoutBorderStyleEditor.class).setRendererClass(LayoutBorderStyleRenderer.class).setI18NName( + Inter.getLocText("FR-Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") + .setPropertyChangeListener(new PropertyChangeAdapter() { + + @Override + public void propertyChange() { + initStyle(); + } + }) + }; + } + + @Override + protected void initStyle() { + initBorderStyle(); + } } diff --git a/designer_form/src/com/fr/design/mainframe/JForm.java b/designer_form/src/com/fr/design/mainframe/JForm.java index c88ebe012b..bbc1706d9b 100644 --- a/designer_form/src/com/fr/design/mainframe/JForm.java +++ b/designer_form/src/com/fr/design/mainframe/JForm.java @@ -657,7 +657,8 @@ public class JForm extends JTemplate implements BaseJForm { * @return 是则返回true */ public boolean isSelectRootPane() { - return formDesign.getRootComponent() == formDesign.getSelectionModel().getSelection().getSelectedCreator(); + return (formDesign.getRootComponent() == formDesign.getSelectionModel().getSelection().getSelectedCreator()) + || (formDesign.getSelectionModel().getSelection().getSelectedCreator().acceptType(XWAbsoluteBodyLayout.class)); }