Browse Source

Merge pull request #2479 in DESIGN/design from release/10.0 to bugfix/10.0

* commit '86c16b618cdc8895c385428b895cbdc3d4367fd4':
  REPORT-40606 【回归测试】表单模板如果未选择组件进行多次拖动,再切换模板就不行了,报错
  REPORT-40606 【回归测试】表单模板如果未选择组件进行多次拖动,再切换模板就不行了,报错
  REPORT-40606 【回归测试】表单模板如果未选择组件进行多次拖动,再切换模板就不行了,报错
  MOBILE-29590【设计器】不勾选手机重布局,tabpane移动端属性中没有tab手势设置项 通用配置项为长存配置项 不受约束 直接显示
bugfix/10.0
superman 4 years ago
parent
commit
a951679a3c
  1. 11
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java
  2. 17
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java
  3. 9
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java

11
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -619,8 +619,9 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
if (paraComponent != null && paraComponent.acceptType(XWParameterLayout.class)) { if (paraComponent != null && paraComponent.acceptType(XWParameterLayout.class)) {
return true; return true;
} else { } else {
if (this.getSelectionModel().getSelection().getSelectedCreator().getParent() != null XCreator creator = this.getSelectionModel().getSelection().getSelectedCreator();
&& ((XLayoutContainer) this.getSelectionModel().getSelection().getSelectedCreator().getParent()).acceptType(XWAbsoluteLayout.class)) { if (creator != null && creator.getParent() != null
&& ((XLayoutContainer) creator.getParent()).acceptType(XWAbsoluteLayout.class)) {
return true; return true;
} }
} }
@ -1337,6 +1338,9 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
// 当前选中控件可以上移一层吗? // 当前选中控件可以上移一层吗?
public boolean isCurrentComponentMovableUp() { public boolean isCurrentComponentMovableUp() {
XCreator creator = getSelectionModel().getSelection().getSelectedCreator(); XCreator creator = getSelectionModel().getSelection().getSelectedCreator();
if (null == creator) {
return false;
}
XLayoutContainer container = (XLayoutContainer) creator.getParent(); XLayoutContainer container = (XLayoutContainer) creator.getParent();
if (container == null || !container.supportInnerOrderChangeActions()) { if (container == null || !container.supportInnerOrderChangeActions()) {
return false; return false;
@ -1347,6 +1351,9 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
// 当前选中控件可以下移一层吗? // 当前选中控件可以下移一层吗?
public boolean isCurrentComponentMovableDown() { public boolean isCurrentComponentMovableDown() {
XCreator creator = getSelectionModel().getSelection().getSelectedCreator(); XCreator creator = getSelectionModel().getSelection().getSelectedCreator();
if (null == creator) {
return false;
}
XLayoutContainer container = (XLayoutContainer) creator.getParent(); XLayoutContainer container = (XLayoutContainer) creator.getParent();
if (container == null || !container.supportInnerOrderChangeActions()) { if (container == null || !container.supportInnerOrderChangeActions()) {
return false; return false;

17
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java

@ -67,25 +67,28 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{label, templateStyleEditor}, {new UILabel()}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_LARGE); JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{label, templateStyleEditor}, {new UILabel()}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_LARGE);
JPanel holder = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel holder = FRGUIPaneFactory.createBorderLayout_S_Pane();
holder.add(jPanel, BorderLayout.NORTH); holder.add(jPanel, BorderLayout.NORTH);
JPanel innerAdvancePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
if (!shouldHidePadding(designer)) { if (!shouldHidePadding(designer)) {
JPanel innerAdvancePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
marginPane = new MobileComponentMarginPane(FormTabPaddingAttrMark.XML_TAG); marginPane = new MobileComponentMarginPane(FormTabPaddingAttrMark.XML_TAG);
intervalPane = new MobileComponentLayoutIntervalPane(FormTabPaddingAttrMark.XML_TAG); intervalPane = new MobileComponentLayoutIntervalPane(FormTabPaddingAttrMark.XML_TAG);
if (FormDesignerUtils.isAppRelayout(designer)) { if (FormDesignerUtils.isAppRelayout(designer)) {
mobileBookMarkUsePane = new MobileBookMarkUsePane(); mobileBookMarkUsePane = new MobileBookMarkUsePane();
innerAdvancePane.add(mobileBookMarkUsePane, BorderLayout.CENTER); innerAdvancePane.add(mobileBookMarkUsePane, BorderLayout.CENTER);
} }
mobileTabCommonSettingPane = new MobileTabCommonSettingPane(); mobileTabCommonSettingPane = new MobileTabCommonSettingPane(false);
innerAdvancePane.add(mobileTabCommonSettingPane, BorderLayout.SOUTH);
innerAdvancePane.add(marginPane, BorderLayout.NORTH);
UIExpandablePane advancePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, innerAdvancePane);
UIExpandablePane layoutPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout"), 280, 20, intervalPane); UIExpandablePane layoutPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout"), 280, 20, intervalPane);
//高级 innerAdvancePane.add(marginPane, BorderLayout.NORTH);
holder.add(advancePane, BorderLayout.CENTER);
//布局 //布局
holder.add(layoutPane, BorderLayout.SOUTH); holder.add(layoutPane, BorderLayout.SOUTH);
} else {
mobileTabCommonSettingPane = new MobileTabCommonSettingPane(true);
} }
innerAdvancePane.add(mobileTabCommonSettingPane, BorderLayout.SOUTH);
UIExpandablePane advancePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, innerAdvancePane);
//高级
holder.add(advancePane, BorderLayout.CENTER);
this.add(holder, BorderLayout.NORTH); this.add(holder, BorderLayout.NORTH);
} }

9
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java

@ -36,11 +36,11 @@ public class MobileTabCommonSettingPane extends BasicPane {
private NewColorSelectBox initDotColorBox; private NewColorSelectBox initDotColorBox;
private NewColorSelectBox selectDotColorBox; private NewColorSelectBox selectDotColorBox;
public MobileTabCommonSettingPane() { public MobileTabCommonSettingPane(boolean isTopComponent) {
initComponent(); initComponent(isTopComponent);
} }
private void initComponent() { private void initComponent(boolean isTopComponent) {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.showTabTitleCheck = new UICheckBox( this.showTabTitleCheck = new UICheckBox(
@ -126,6 +126,9 @@ public class MobileTabCommonSettingPane extends BasicPane {
); );
final JPanel tableConfigJPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); final JPanel tableConfigJPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
if (isTopComponent) {
tableConfigJPanel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, 0, 0));
}
tableConfigJPanel.add(tabBaseConfigPanel, BorderLayout.NORTH); tableConfigJPanel.add(tabBaseConfigPanel, BorderLayout.NORTH);
tableConfigJPanel.add(dotIndicatorSettingPanel, BorderLayout.CENTER); tableConfigJPanel.add(dotIndicatorSettingPanel, BorderLayout.CENTER);
this.add(tableConfigJPanel, BorderLayout.CENTER); this.add(tableConfigJPanel, BorderLayout.CENTER);

Loading…
Cancel
Save