diff --git a/designer_form/src/com/fr/design/designer/creator/XCreator.java b/designer_form/src/com/fr/design/designer/creator/XCreator.java index ed692cd428..e362a91678 100644 --- a/designer_form/src/com/fr/design/designer/creator/XCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XCreator.java @@ -617,4 +617,11 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo public void adjustCompHeight(double percent) { return; } + + /** + * 给子类XWFitLayout和XWAbsoluteBodyLayout提供一个获取标题的方法 + */ + public String getTitle() { + return null; + } } \ No newline at end of file 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 291a0f88d5..4681400d07 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java @@ -2,7 +2,9 @@ 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.designer.properties.mobile.BodyMobilePropertyUI; import com.fr.design.form.util.XCreatorConstants; +import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.mainframe.widget.editors.PaddingMarginEditor; import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor; import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer; @@ -87,8 +89,21 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout { }; } + @Override + public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { + return new WidgetPropertyUIProvider[]{ new BodyMobilePropertyUI(this)}; + } + @Override protected void initStyle() { initBorderStyle(); } + + /** + * 返回一个“绝对布局”字符串 + * @return + */ + public String getTitle() { + return Inter.getLocText("FR-Designer_AbsoluteLayout"); + } } diff --git a/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java b/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java index 682a195907..c58fe8560d 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWFitLayout.java @@ -25,6 +25,7 @@ import com.fr.form.ui.container.WBodyLayoutType; import com.fr.form.ui.container.WFitLayout; import com.fr.form.ui.container.WLayout; import com.fr.general.FRScreen; +import com.fr.general.Inter; import com.fr.stable.ArrayUtils; /** @@ -1178,5 +1179,13 @@ public class XWFitLayout extends XLayoutContainer { public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() { return new WidgetPropertyUIProvider[]{ new BodyMobilePropertyUI(this)}; } + + /** + * 返回一个“自适应布局”字符串 + * @return + */ + public String getTitle() { + return Inter.getLocText("FR-Designer-Layout_Adaptive_Layout"); + } } \ No newline at end of file diff --git a/designer_form/src/com/fr/design/designer/properties/BodyAppRelayoutTable.java b/designer_form/src/com/fr/design/designer/properties/BodyAppRelayoutTable.java index 6c10884a4c..a2c0a142ac 100644 --- a/designer_form/src/com/fr/design/designer/properties/BodyAppRelayoutTable.java +++ b/designer_form/src/com/fr/design/designer/properties/BodyAppRelayoutTable.java @@ -53,7 +53,7 @@ public class BodyAppRelayoutTable extends AbstractPropertyTable { FRContext.getLogger().error(e.getMessage()); } - groups.add(new PropertyGroup(new ReportAppPropertyGroupModel(Inter.getLocText("FR-Designer-Layout_Adaptive_Layout"), xCreator, propertyTableEditor, designer))); + groups.add(new PropertyGroup(new ReportAppPropertyGroupModel(xCreator.getTitle(), xCreator, propertyTableEditor, designer))); TableModel model = new BeanTableModel(); setModel(model); @@ -65,7 +65,7 @@ public class BodyAppRelayoutTable extends AbstractPropertyTable { * 单元格tooltip * 属性名悬浮提示 * - * @param 鼠标点击事件 + * @param event 鼠标点击事件 * @return 单元格tooltip */ public String getToolTipText(MouseEvent event) { diff --git a/designer_form/src/com/fr/design/designer/properties/mobile/BodyMobilePropertyUI.java b/designer_form/src/com/fr/design/designer/properties/mobile/BodyMobilePropertyUI.java index a64de41584..70b80bc990 100644 --- a/designer_form/src/com/fr/design/designer/properties/mobile/BodyMobilePropertyUI.java +++ b/designer_form/src/com/fr/design/designer/properties/mobile/BodyMobilePropertyUI.java @@ -1,6 +1,7 @@ package com.fr.design.designer.properties.mobile; import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.XWAbsoluteBodyLayout; import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.properties.BodyAppRelayoutTable; import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider; @@ -18,6 +19,10 @@ public class BodyMobilePropertyUI extends AbstractWidgetPropertyUIProvider { this.xCreator = xwFitLayout; } + public BodyMobilePropertyUI(XWAbsoluteBodyLayout xwAbsoluteBodyLayout) { + this.xCreator = xwAbsoluteBodyLayout; + } + @Override public AbstractPropertyTable createWidgetAttrTable() { return new BodyAppRelayoutTable(xCreator);