Browse Source

增加了formMobileAttr保存表单属性

master
fanglei 8 years ago
parent
commit
f08d615bb3
  1. 12
      designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java
  2. 12
      designer_form/src/com/fr/design/form/mobile/MobileToolBarPane.java
  3. 36
      designer_form/src/com/fr/design/mainframe/actions/FormMobileAttrAction.java

12
designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java

@ -2,8 +2,8 @@ package com.fr.design.form.mobile;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.main.mobile.FormMobileAttr;
import com.fr.general.Inter;
import com.fr.report.mobile.ElementCaseMobileAttr;
import javax.swing.*;
import java.awt.*;
@ -11,7 +11,7 @@ import java.awt.*;
/**
* Created by fanglei on 2016/11/17.
*/
public class FormMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
public class FormMobileAttrPane extends BasicBeanPane<FormMobileAttr>{
//工具栏容器
private MobileToolBarPane mobileToolBarPane;
@ -33,16 +33,16 @@ public class FormMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
}
@Override
public void populateBean(ElementCaseMobileAttr ob) {
public void populateBean(FormMobileAttr ob) {
if (ob == null) {
ob = new ElementCaseMobileAttr();
ob = new FormMobileAttr();
}
this.mobileToolBarPane.populateBean(ob);
}
@Override
public ElementCaseMobileAttr updateBean() {
ElementCaseMobileAttr caseMobileAttr = new ElementCaseMobileAttr();
public FormMobileAttr updateBean() {
FormMobileAttr caseMobileAttr = new FormMobileAttr();
this.mobileToolBarPane.updateBean(caseMobileAttr);
return caseMobileAttr;
}

12
designer_form/src/com/fr/design/form/mobile/MobileToolBarPane.java

@ -4,8 +4,8 @@ import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.mobile.MobileRadioCheckPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.main.mobile.FormMobileAttr;
import com.fr.general.Inter;
import com.fr.report.mobile.ElementCaseMobileAttr;
import javax.swing.*;
import java.awt.*;
@ -13,7 +13,7 @@ import java.awt.*;
/**
* Created by 方磊 on 2016/11/8.
*/
public class MobileToolBarPane extends BasicBeanPane<ElementCaseMobileAttr> {
public class MobileToolBarPane extends BasicBeanPane<FormMobileAttr> {
//刷新选项面板
private MobileRadioCheckPane refreshCheckPane;
@ -37,20 +37,20 @@ public class MobileToolBarPane extends BasicBeanPane<ElementCaseMobileAttr> {
}
@Override
public void populateBean(ElementCaseMobileAttr ob) {
public void populateBean(FormMobileAttr ob) {
if (ob == null) {
ob = new ElementCaseMobileAttr();
ob = new FormMobileAttr();
}
this.refreshCheckPane.populateBean(ob.isRefresh());
}
@Override
public ElementCaseMobileAttr updateBean() {
public FormMobileAttr updateBean() {
return null;
}
@Override
public void updateBean(ElementCaseMobileAttr mobileAttr) {
public void updateBean(FormMobileAttr mobileAttr) {
if(mobileAttr != null) {
mobileAttr.setRefresh(this.refreshCheckPane.updateBean());
}

36
designer_form/src/com/fr/design/mainframe/actions/FormMobileAttrAction.java

@ -9,8 +9,8 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JForm;
import com.fr.design.menu.MenuKeySet;
import com.fr.form.main.Form;
import com.fr.form.main.mobile.FormMobileAttr;
import com.fr.general.Inter;
import com.fr.report.mobile.ElementCaseMobileAttr;
import javax.swing.*;
import java.awt.event.ActionEvent;
@ -35,23 +35,23 @@ public class FormMobileAttrAction extends JTemplateAction<JForm> {
*/
@Override
public void actionPerformed(ActionEvent e) {
// final JForm jf = getEditingComponent();
// if (jf == null) {
// return;
// }
// final Form formTpl = jf.getTarget();
// ElementCaseMobileAttr mobileAttr = formTpl.getReportMobileAttr();
//
// final FormMobileAttrPane mobileAttrPane = new FormMobileAttrPane();
// mobileAttrPane.populateBean(mobileAttr);
// BasicDialog dialog = mobileAttrPane.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
// @Override
// public void doOk() {
// formTpl.setReportMobileAttr(mobileAttrPane.updateBean());
// jf.fireTargetModified();
// }
// });
// dialog.setVisible(true);
final JForm jf = getEditingComponent();
if (jf == null) {
return;
}
final Form formTpl = jf.getTarget();
FormMobileAttr mobileAttr = formTpl.getReportMobileAttr();
final FormMobileAttrPane mobileAttrPane = new FormMobileAttrPane();
mobileAttrPane.populateBean(mobileAttr);
BasicDialog dialog = mobileAttrPane.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override
public void doOk() {
formTpl.setReportMobileAttr(mobileAttrPane.updateBean());
jf.fireTargetModified();
}
});
dialog.setVisible(true);
}
private static final MenuKeySet REPORT_APP_ATTR = new MenuKeySet() {

Loading…
Cancel
Save