Browse Source

Merge pull request #112 in DESIGN/design from ~PLOUGH/10-design:feature/10.0 to feature/10.0

* commit 'e527a1149a05cd337d1c10b26adb810578e85847':
  REPORT-8355 9.0之前开发的功能与bug patch到10.0(feature部分)
master
superman 7 years ago
parent
commit
3d528d9045
  1. 24
      designer-form/src/com/fr/design/form/mobile/FormMobileAttrPane.java
  2. 65
      designer-form/src/com/fr/design/form/mobile/FormMobileOthersPane.java
  3. 1
      designer-form/src/com/fr/design/mainframe/actions/FormMobileAttrAction.java
  4. 60
      designer-realize/src/com/fr/design/report/mobile/MobileOthersPane.java
  5. 5
      designer-realize/src/com/fr/design/report/mobile/ReportMobileAttrPane.java

24
designer-form/src/com/fr/design/form/mobile/FormMobileAttrPane.java

@ -17,6 +17,8 @@ public class FormMobileAttrPane extends BasicBeanPane<FormMobileAttr>{
private MobileToolBarPane mobileToolBarPane; private MobileToolBarPane mobileToolBarPane;
// 模版设置面板 // 模版设置面板
private FormMobileTemplateSettingsPane formMobileTemplateSettingsPane; private FormMobileTemplateSettingsPane formMobileTemplateSettingsPane;
// 其他
private FormMobileOthersPane formMobileOthersPane;
private static final int PADDING = 10; private static final int PADDING = 10;
@ -26,18 +28,18 @@ public class FormMobileAttrPane extends BasicBeanPane<FormMobileAttr>{
private void initComponents() { private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel mobileToolBarPaneWrapper = new JPanel(new BorderLayout()); JPanel panel = new JPanel();
mobileToolBarPaneWrapper.setBorder(BorderFactory.createEmptyBorder(PADDING, PADDING, 0, PADDING)); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
this.mobileToolBarPane = new MobileToolBarPane(); panel.setBorder(BorderFactory.createEmptyBorder(PADDING, PADDING, PADDING, PADDING));
mobileToolBarPaneWrapper.add(this.mobileToolBarPane, BorderLayout.NORTH);
JPanel formMobileTemplateSettingsPaneWrapper = new JPanel(new BorderLayout()); panel.add(formMobileTemplateSettingsPane = new FormMobileTemplateSettingsPane());
formMobileTemplateSettingsPaneWrapper.setBorder(BorderFactory.createEmptyBorder(PADDING, PADDING, PADDING, PADDING)); panel.add(mobileToolBarPane = new MobileToolBarPane());
this.formMobileTemplateSettingsPane = new FormMobileTemplateSettingsPane(); panel.add(formMobileOthersPane = new FormMobileOthersPane());
formMobileTemplateSettingsPaneWrapper.add(this.formMobileTemplateSettingsPane, BorderLayout.NORTH);
this.add(formMobileTemplateSettingsPaneWrapper, BorderLayout.NORTH); JPanel panelWrapper = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(mobileToolBarPaneWrapper, BorderLayout.CENTER); panelWrapper.add(panel, BorderLayout.NORTH);
UIScrollPane scrollPane = new UIScrollPane(panelWrapper);
this.add(scrollPane);
} }
@Override @Override
@ -47,6 +49,7 @@ public class FormMobileAttrPane extends BasicBeanPane<FormMobileAttr>{
} }
this.mobileToolBarPane.populateBean(ob); this.mobileToolBarPane.populateBean(ob);
this.formMobileTemplateSettingsPane.populateBean(ob); this.formMobileTemplateSettingsPane.populateBean(ob);
this.formMobileOthersPane.populateBean(ob);
} }
@Override @Override
@ -54,6 +57,7 @@ public class FormMobileAttrPane extends BasicBeanPane<FormMobileAttr>{
FormMobileAttr formMobileAttr = new FormMobileAttr(); FormMobileAttr formMobileAttr = new FormMobileAttr();
this.mobileToolBarPane.updateBean(formMobileAttr); this.mobileToolBarPane.updateBean(formMobileAttr);
this.formMobileTemplateSettingsPane.updateBean(formMobileAttr); this.formMobileTemplateSettingsPane.updateBean(formMobileAttr);
this.formMobileOthersPane.updateBean(formMobileAttr);
return formMobileAttr; return formMobileAttr;
} }

65
designer-form/src/com/fr/design/form/mobile/FormMobileOthersPane.java

@ -0,0 +1,65 @@
package com.fr.design.form.mobile;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.mobile.MobileRadioCheckPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.main.mobile.FormMobileAttr;
import com.fr.general.Inter;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
/**
* Created by plough on 2018/5/31.
*/
public class FormMobileOthersPane extends BasicBeanPane<FormMobileAttr> {
private MobileRadioCheckPane appearRefreshCheckPane; // 页面再现时刷新
private MobileRadioCheckPane promptWhenLeaveWithoutSubmitCheckPane; // 数据未提交离开提示
public FormMobileOthersPane() {
this.initComponents();
}
private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel borderPane = FRGUIPaneFactory.createTitledBorderPane(this.title4PopupWindow());
JPanel contentPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
contentPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L1, 0, 0));
appearRefreshCheckPane = new MobileRadioCheckPane(Inter.getLocText("FR-Designer_Appear_Refresh"));
contentPane.add(appearRefreshCheckPane, BorderLayout.WEST);
promptWhenLeaveWithoutSubmitCheckPane = new MobileRadioCheckPane(Inter.getLocText("FR-Designer_Prompt_When_Leave_Without_Submit"));
contentPane.add(promptWhenLeaveWithoutSubmitCheckPane, BorderLayout.CENTER);
borderPane.add(contentPane);
this.add(borderPane);
}
@Override
public void populateBean(FormMobileAttr ob) {
if (ob == null) {
ob = new FormMobileAttr();
}
this.appearRefreshCheckPane.populateBean(ob.isAppearRefresh());
this.promptWhenLeaveWithoutSubmitCheckPane.populateBean(ob.isPromptWhenLeaveWithoutSubmit());
}
@Override
public FormMobileAttr updateBean() {
return null;
}
@Override
public void updateBean(FormMobileAttr mobileAttr) {
if(mobileAttr != null) {
mobileAttr.setAppearRefresh(this.appearRefreshCheckPane.updateBean());
mobileAttr.setPromptWhenLeaveWithoutSubmit(this.promptWhenLeaveWithoutSubmitCheckPane.updateBean());
}
}
@Override
protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Other");
}
}

1
designer-form/src/com/fr/design/mainframe/actions/FormMobileAttrAction.java

@ -76,6 +76,7 @@ public class FormMobileAttrAction extends JTemplateAction<JForm> {
formTpl.setFormMobileAttr(formMobileAttr); // 会调整 body 的自适应布局,放到最后 formTpl.setFormMobileAttr(formMobileAttr); // 会调整 body 的自适应布局,放到最后
((FormArea)jf.getFormDesign().getParent()).onMobileAttrModified(); ((FormArea)jf.getFormDesign().getParent()).onMobileAttrModified();
WidgetPropertyPane.getInstance().refreshDockingView(); WidgetPropertyPane.getInstance().refreshDockingView();
jf.fireTargetModified();
} }
}); });
dialog.setVisible(true); dialog.setVisible(true);

60
designer-realize/src/com/fr/design/report/mobile/MobileOthersPane.java

@ -0,0 +1,60 @@
package com.fr.design.report.mobile;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.mobile.MobileRadioCheckPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.report.mobile.ElementCaseMobileAttr;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
/**
* Created by plough on 2018/5/31.
*/
public class MobileOthersPane extends BasicBeanPane<ElementCaseMobileAttr> {
private MobileRadioCheckPane appearRefreshCheckPane; // 页面再现时刷新
public MobileOthersPane() {
this.initComponents();
}
private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel borderPane = FRGUIPaneFactory.createTitledBorderPane(this.title4PopupWindow());
JPanel contentPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
contentPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L1, 0, 0));
appearRefreshCheckPane = new MobileRadioCheckPane(Inter.getLocText("FR-Designer_Appear_Refresh"));
contentPane.add(appearRefreshCheckPane, BorderLayout.WEST);
borderPane.add(contentPane);
this.add(borderPane);
}
@Override
public void populateBean(ElementCaseMobileAttr ob) {
if (ob == null) {
ob = new ElementCaseMobileAttr();
}
this.appearRefreshCheckPane.populateBean(ob.isAppearRefresh());
}
@Override
public ElementCaseMobileAttr updateBean() {
return null;
}
@Override
public void updateBean(ElementCaseMobileAttr mobileAttr) {
if(mobileAttr != null) {
mobileAttr.setAppearRefresh(this.appearRefreshCheckPane.updateBean());
}
}
@Override
protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Other");
}
}

5
designer-realize/src/com/fr/design/report/mobile/ReportMobileAttrPane.java

@ -17,6 +17,8 @@ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
private AppFitBrowserPane appFitBrowserPane; private AppFitBrowserPane appFitBrowserPane;
//工具栏容器 //工具栏容器
private MobileToolBarPane mobileToolBarPane; private MobileToolBarPane mobileToolBarPane;
// 其他
private MobileOthersPane mobileOthersPane;
public ReportMobileAttrPane() { public ReportMobileAttrPane() {
initComponents(); initComponents();
@ -37,6 +39,7 @@ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
jPanel.add(appFitBrowserPane); jPanel.add(appFitBrowserPane);
jPanel.add(mobileToolBarPane = new MobileToolBarPane()); jPanel.add(mobileToolBarPane = new MobileToolBarPane());
jPanel.add(mobileOthersPane = new MobileOthersPane());
jPanel.add(appFitPreviewPane); jPanel.add(appFitPreviewPane);
UIScrollPane scrollPane = new UIScrollPane(jPanel); UIScrollPane scrollPane = new UIScrollPane(jPanel);
@ -50,6 +53,7 @@ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
} }
appFitBrowserPane.populateBean(ob); appFitBrowserPane.populateBean(ob);
mobileToolBarPane.populateBean(ob); mobileToolBarPane.populateBean(ob);
mobileOthersPane.populateBean(ob);
reportMobileTemplateSettingsPane.populateBean(ob); reportMobileTemplateSettingsPane.populateBean(ob);
} }
@ -57,6 +61,7 @@ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
public ElementCaseMobileAttr updateBean() { public ElementCaseMobileAttr updateBean() {
ElementCaseMobileAttr caseMobileAttr = appFitBrowserPane.updateBean(); ElementCaseMobileAttr caseMobileAttr = appFitBrowserPane.updateBean();
mobileToolBarPane.updateBean(caseMobileAttr); mobileToolBarPane.updateBean(caseMobileAttr);
mobileOthersPane.updateBean(caseMobileAttr);
reportMobileTemplateSettingsPane.updateBean(caseMobileAttr); reportMobileTemplateSettingsPane.updateBean(caseMobileAttr);
return caseMobileAttr; return caseMobileAttr;

Loading…
Cancel
Save