Fangjie Hu
8 years ago
5 changed files with 181 additions and 80 deletions
@ -1,34 +1,31 @@ |
|||||||
package com.fr.design.fun; |
package com.fr.design.fun; |
||||||
|
|
||||||
import com.fr.stable.fun.ReportFitAttrProvider; |
import com.fr.stable.fun.ReportFitAttrProvider; |
||||||
import com.fr.stable.fun.mark.Immutable; |
import com.fr.stable.fun.mark.Immutable; |
||||||
|
|
||||||
import java.beans.PropertyDescriptor; |
import java.beans.PropertyDescriptor; |
||||||
|
|
||||||
/** |
/** |
||||||
* Created by zhouping on 2015/9/10. |
* Created by Slpire on 2016/10/28. |
||||||
*/ |
*/ |
||||||
public interface FormElementCaseEditorProcessor extends Immutable { |
public interface FormElementCaseEditorProcessor extends Immutable { |
||||||
|
String MARK_STRING = "PropertyEditor"; |
||||||
String MARK_STRING = "PropertyEditor"; |
|
||||||
|
int CURRENT_LEVEL = 1; |
||||||
int CURRENT_LEVEL = 1; |
|
||||||
|
|
||||||
|
/** |
||||||
/** |
* 生成属性表 |
||||||
* 生成属性表 |
* @param temp 传入当前操作的class |
||||||
* @param temp 传入当前操作的class |
* @param reportFitAttr 传入的自适应属性 |
||||||
* @param reportFitAttr 传入的自适应属性 |
* @return 返回属性表 |
||||||
* @return 返回属性表 |
*/ |
||||||
*/ |
PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider reportFitAttr); |
||||||
PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider reportFitAttr); |
|
||||||
|
/** |
||||||
/** |
* 返回pc自适应属性值 |
||||||
* 返回pc自适应属性值 |
* @param fitAttrProvider 传入的自适应属性 |
||||||
* @param fitAttrProvider 传入的自适应属性 |
* @return 返回pc自适应属性值 |
||||||
* @return 返回pc自适应属性值 |
*/ |
||||||
*/ |
int getFitStateInPC(ReportFitAttrProvider fitAttrProvider); |
||||||
int getFitStateInPC(ReportFitAttrProvider fitAttrProvider); |
} |
||||||
|
|
||||||
|
|
||||||
} |
|
||||||
|
@ -0,0 +1,38 @@ |
|||||||
|
package com.fr.design.fun; |
||||||
|
|
||||||
|
import com.fr.form.ui.ElementCaseEditor; |
||||||
|
import com.fr.stable.fun.ReportFitAttrProvider; |
||||||
|
import com.fr.form.main.Form; |
||||||
|
import com.fr.stable.fun.mark.Mutable; |
||||||
|
|
||||||
|
import java.beans.PropertyDescriptor; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by zhouping on 2015/9/10. |
||||||
|
*/ |
||||||
|
public interface FormElementCaseEditorProvider extends Mutable { |
||||||
|
|
||||||
|
String MARK_STRING = "PropertyEditor"; |
||||||
|
|
||||||
|
int CURRENT_LEVEL = 1; |
||||||
|
|
||||||
|
|
||||||
|
//加个provider返回tab的接口
|
||||||
|
//design_base依赖了form
|
||||||
|
PropertyDescriptor[] createPropertyDescriptor (Class<?> temp, Form form, ElementCaseEditor editor); |
||||||
|
|
||||||
|
/** |
||||||
|
* 生成属性表 |
||||||
|
* @param temp 传入当前操作的class |
||||||
|
* @param reportFitAttr 传入的自适应属性 |
||||||
|
* @return 返回属性表 |
||||||
|
*/ |
||||||
|
PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider reportFitAttr); |
||||||
|
|
||||||
|
/** |
||||||
|
* 返回pc自适应属性值 |
||||||
|
* @param fitAttrProvider 传入的自适应属性 |
||||||
|
* @return 返回pc自适应属性值 |
||||||
|
*/ |
||||||
|
int getFitStateInPC(ReportFitAttrProvider fitAttrProvider); |
||||||
|
} |
@ -1,44 +1,44 @@ |
|||||||
package com.fr.design.fun.impl; |
package com.fr.design.fun.impl; |
||||||
|
|
||||||
import com.fr.design.fun.FormElementCaseEditorProcessor; |
import com.fr.design.fun.FormElementCaseEditorProcessor; |
||||||
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; |
||||||
|
|
||||||
/** |
/** |
||||||
* Created by zhouping on 2015/9/10. |
* Created by zhouping on 2015/9/10. |
||||||
*/ |
*/ |
||||||
@API(level = FormElementCaseEditorProcessor.CURRENT_LEVEL) |
@API(level = FormElementCaseEditorProcessor.CURRENT_LEVEL) |
||||||
public abstract class AbstractFormElementCaseEditorProcessor implements FormElementCaseEditorProcessor { |
public abstract class AbstractFormElementCaseEditorProcessor implements FormElementCaseEditorProcessor { |
||||||
|
|
||||||
public int currentAPILevel() { |
public int currentAPILevel() { |
||||||
return CURRENT_LEVEL; |
return CURRENT_LEVEL; |
||||||
} |
} |
||||||
|
|
||||||
public int layerIndex() { |
public int layerIndex() { |
||||||
return DEFAULT_LAYER_INDEX; |
return DEFAULT_LAYER_INDEX; |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
/** |
/** |
||||||
* 生成属性表 |
* 生成属性表 |
||||||
* @param temp 传入当前操作的class |
* @param temp 传入当前操作的class |
||||||
* @param reportFitAttr 传入的自适应属性 |
* @param reportFitAttr 传入的自适应属性 |
||||||
* @return 返回属性表 |
* @return 返回属性表 |
||||||
*/ |
*/ |
||||||
@Override |
@Override |
||||||
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider reportFitAttr) { |
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider reportFitAttr) { |
||||||
return new PropertyDescriptor[0]; |
return new PropertyDescriptor[0]; |
||||||
} |
} |
||||||
|
|
||||||
/** |
/** |
||||||
* 返回pc自适应属性值 |
* 返回pc自适应属性值 |
||||||
* @param fitAttrProvider 传入的自适应属性 |
* @param fitAttrProvider 传入的自适应属性 |
||||||
* @return 返回pc自适应属性值 |
* @return 返回pc自适应属性值 |
||||||
*/ |
*/ |
||||||
@Override |
@Override |
||||||
public int getFitStateInPC(ReportFitAttrProvider fitAttrProvider) { |
public int getFitStateInPC(ReportFitAttrProvider fitAttrProvider) { |
||||||
return 0; |
return 0; |
||||||
} |
} |
||||||
} |
} |
@ -0,0 +1,51 @@ |
|||||||
|
package com.fr.design.fun.impl; |
||||||
|
|
||||||
|
import com.fr.design.fun.FormElementCaseEditorProvider; |
||||||
|
import com.fr.form.main.Form; |
||||||
|
import com.fr.form.ui.ElementCaseEditor; |
||||||
|
import com.fr.stable.fun.ReportFitAttrProvider; |
||||||
|
import com.fr.stable.fun.mark.API; |
||||||
|
|
||||||
|
import java.beans.PropertyDescriptor; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by zhouping on 2015/9/10. |
||||||
|
*/ |
||||||
|
@API(level = FormElementCaseEditorProvider.CURRENT_LEVEL) |
||||||
|
public abstract class AbstractFormElementCaseEditorProvider implements FormElementCaseEditorProvider { |
||||||
|
|
||||||
|
public int currentAPILevel() { |
||||||
|
return CURRENT_LEVEL; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public String mark4Provider() { |
||||||
|
return this.getClass().getName(); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, Form reportAttr, ElementCaseEditor editor) { |
||||||
|
return new PropertyDescriptor[0]; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 生成属性表 |
||||||
|
* @param temp 传入当前操作的class |
||||||
|
* @param reportFitAttr 传入的自适应属性 |
||||||
|
* @return 返回属性表 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public PropertyDescriptor[] createPropertyDescriptor(Class<?> temp, ReportFitAttrProvider reportFitAttr) { |
||||||
|
return new PropertyDescriptor[0]; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 返回pc自适应属性值 |
||||||
|
* @param fitAttrProvider 传入的自适应属性 |
||||||
|
* @return 返回pc自适应属性值 |
||||||
|
*/ |
||||||
|
@Override |
||||||
|
public int getFitStateInPC(ReportFitAttrProvider fitAttrProvider) { |
||||||
|
return 0; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue