Browse Source

给设计器->属性面板->绝对布局->移动端->加上手机重布局

master
fanglei 8 years ago
parent
commit
ed3874dc5c
  1. 7
      designer_form/src/com/fr/design/designer/creator/XCreator.java
  2. 15
      designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java
  3. 9
      designer_form/src/com/fr/design/designer/creator/XWFitLayout.java
  4. 4
      designer_form/src/com/fr/design/designer/properties/BodyAppRelayoutTable.java
  5. 5
      designer_form/src/com/fr/design/designer/properties/mobile/BodyMobilePropertyUI.java

7
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;
}
}

15
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");
}
}

9
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");
}
}

4
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) {

5
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);

Loading…
Cancel
Save