Browse Source

REPORT-745 designer_base和form依赖关系内容修改

master
PanLi320 8 years ago
parent
commit
b638168388
  1. 6
      designer_base/src/com/fr/design/fun/FormElementCaseEditorProvider.java
  2. 7
      designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProvider.java
  3. 14
      designer_form/src/com/fr/design/designer/creator/XElementCase.java

6
designer_base/src/com/fr/design/fun/FormElementCaseEditorProvider.java

@ -1,11 +1,11 @@
package com.fr.design.fun; package com.fr.design.fun;
import com.fr.stable.fun.IOFileAttrMark; import com.fr.form.FormProvider;
import com.fr.form.ui.ElementCaseEditorProvider;
import com.fr.stable.fun.ReportFitAttrProvider; import com.fr.stable.fun.ReportFitAttrProvider;
import com.fr.stable.fun.mark.Mutable; import com.fr.stable.fun.mark.Mutable;
import java.beans.PropertyDescriptor; import java.beans.PropertyDescriptor;
import java.util.Map;
/** /**
* Created by zhouping on 2015/9/10. * Created by zhouping on 2015/9/10.
@ -16,7 +16,7 @@ public interface FormElementCaseEditorProvider extends Mutable {
int CURRENT_LEVEL = 1; int CURRENT_LEVEL = 1;
PropertyDescriptor[] createPropertyDescriptor (Class<?> temp, Map<String, IOFileAttrMark> attrMarkMap, ReportFitAttrProvider reportFitAttr); PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, FormProvider formProvider, ElementCaseEditorProvider editor);
/** /**
* 生成属性表 * 生成属性表

7
designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProvider.java

@ -1,12 +1,12 @@
package com.fr.design.fun.impl; package com.fr.design.fun.impl;
import com.fr.design.fun.FormElementCaseEditorProvider; import com.fr.design.fun.FormElementCaseEditorProvider;
import com.fr.stable.fun.IOFileAttrMark; import com.fr.form.FormProvider;
import com.fr.form.ui.ElementCaseEditorProvider;
import com.fr.stable.fun.ReportFitAttrProvider; import com.fr.stable.fun.ReportFitAttrProvider;
import com.fr.stable.fun.mark.API; import com.fr.stable.fun.mark.API;
import java.beans.PropertyDescriptor; import java.beans.PropertyDescriptor;
import java.util.Map;
/** /**
* Created by zhouping on 2015/9/10. * Created by zhouping on 2015/9/10.
@ -23,8 +23,7 @@ public abstract class AbstractFormElementCaseEditorProvider implements FormEleme
return this.getClass().getName(); return this.getClass().getName();
} }
@Override public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, FormProvider reportAttr, ElementCaseEditorProvider editor) {
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, Map<String, IOFileAttrMark> attrMarkMap, ReportFitAttrProvider reportFitAttr) {
return new PropertyDescriptor[0]; return new PropertyDescriptor[0];
} }

14
designer_form/src/com/fr/design/designer/creator/XElementCase.java

@ -20,7 +20,9 @@ import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer;
import com.fr.design.mainframe.widget.renderer.PaddingMarginCellRenderer; import com.fr.design.mainframe.widget.renderer.PaddingMarginCellRenderer;
import com.fr.form.FormElementCaseContainerProvider; import com.fr.form.FormElementCaseContainerProvider;
import com.fr.form.FormElementCaseProvider; import com.fr.form.FormElementCaseProvider;
import com.fr.form.FormProvider;
import com.fr.form.ui.ElementCaseEditor; import com.fr.form.ui.ElementCaseEditor;
import com.fr.form.ui.ElementCaseEditorProvider;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.CoreGraphHelper; import com.fr.stable.CoreGraphHelper;
@ -109,15 +111,9 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
continue; continue;
} }
this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner();
ElementCaseEditor editor = this.toData(); FormProvider formProvider = designer.getTarget();
FitProvider fitProvider = (FitProvider) designer.getTarget(); ElementCaseEditorProvider elementCaseEditorProvider = this.toData();
ReportFitAttrProvider fitAttr = fitProvider.getFitAttr(); PropertyDescriptor[] extraEditor = provider.createPropertyDescriptor(this.data.getClass(), formProvider, elementCaseEditorProvider);
//兼容之前报表块(之前三个选项为:默认 横向 双向 现在是:横向 双向 不自适应)
if (editor.getFitStateInPC() == 0) {
editor.setReportFitAttr(null);
}
ReportFitAttrProvider reportFitAttr = editor.getReportFitAttr() == null ? fitAttr : editor.getReportFitAttr();
PropertyDescriptor[] extraEditor = provider.createPropertyDescriptor(this.data.getClass(), editor.getAttrMarkMap(), reportFitAttr);
propertyTableEditor = (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor); propertyTableEditor = (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor);
} }

Loading…
Cancel
Save