xiaxiang 9 years ago
parent
commit
b79724e729
  1. 6
      designer_base/src/com/fr/design/fun/FormElementCaseEditorProcessor.java
  2. 9
      designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProcessor.java
  3. 11
      designer_form/src/com/fr/design/designer/creator/XElementCase.java

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

@ -1,6 +1,7 @@
package com.fr.design.fun;
import com.fr.stable.fun.Level;
import com.fr.stable.fun.ReportFitAttrProvider;
import java.beans.PropertyDescriptor;
@ -19,6 +20,9 @@ public interface FormElementCaseEditorProcessor extends Level{
* @param temp 传入当前操作的class
* @return 返回属性表
*/
PropertyDescriptor[] createPropertyDescriptor(Class<?> temp);
PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider formFitAttr, ReportFitAttrProvider elementcaseFitAttr);
int getFitStateInPC(ReportFitAttrProvider fitAttrProvider);
}

9
designer_base/src/com/fr/design/fun/impl/AbstractFormElementCaseEditorProcessor.java

@ -1,6 +1,7 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.FormElementCaseEditorProcessor;
import com.fr.stable.fun.ReportFitAttrProvider;
import java.beans.PropertyDescriptor;
@ -19,7 +20,13 @@ public abstract class AbstractFormElementCaseEditorProcessor implements FormElem
* @param temp 传入当前操作的class
* @return 返回属性表
*/
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp){
@Override
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider formFitAttr, ReportFitAttrProvider elementcaseFitAttr) {
return new PropertyDescriptor[0];
}
@Override
public int getFitStateInPC(ReportFitAttrProvider fitAttrProvider) {
return 0;
}
}

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

@ -91,10 +91,13 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner();
FitProvider wbTpl = (FitProvider) designer.getTarget();
ReportFitAttrProvider fitAttr = wbTpl.getFitAttr();
PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass(), fitAttr, this.toData());
PropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass(), fitAttr, this.toData().getReportFitAttr());
if (processor == null) {
return propertyTableEditor;
}
if (toData().getReportFitAttr() == null && processor.getFitStateInPC(fitAttr) != 0) {
toData().setFormFitAttr(getFitAttrProvider(fitAttr));
}
return (CRPropertyDescriptor[]) ArrayUtils.addAll(propertyTableEditor, extraEditor);
}
@ -102,16 +105,12 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
* 获取表单保存的自适应属性如果没有就用全局保存的自适应属性
* @return 返回自适应属性
*/
private ReportFitAttrProvider getFitAttrProvider () {
FitProvider wbTpl = (FitProvider) designer.getTarget();
private ReportFitAttrProvider getFitAttrProvider (ReportFitAttrProvider fitAttr) {
ReportFitAttrProvider globalFitAttr = ConfigManager.getProviderInstance().getFitAttrProvider();
ReportFitAttrProvider fitAttr = wbTpl.getFitAttr();
if (fitAttr != null) {
return fitAttr;
}
return globalFitAttr;
}
@Override

Loading…
Cancel
Save