Browse Source

自定义控件插件

remotes/1611766341912730171/master
richie 5 years ago
parent
commit
b93860d213
  1. 3
      src/main/java/com/fanruan/api/report/form/BaseWidget.java
  2. 32
      src/main/java/com/fanruan/api/report/form/value/InitializerKit.java

3
src/main/java/com/fanruan/api/report/form/BaseWidget.java

@ -1,6 +1,7 @@
package com.fanruan.api.report.form; package com.fanruan.api.report.form;
import com.fr.data.act.Describer; import com.fr.data.act.Describer;
import com.fr.data.act.Producer;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.json.JSONException; import com.fr.json.JSONException;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
@ -14,7 +15,7 @@ import com.fr.stable.web.Repository;
* Created by richie on 2019-09-10 * Created by richie on 2019-09-10
* 控件的插件接口 * 控件的插件接口
*/ */
public abstract class BaseWidget extends Widget implements Describer { public abstract class BaseWidget extends Widget implements Describer, Producer {
@Override @Override
public boolean isEditor() { public boolean isEditor() {

32
src/main/java/com/fanruan/api/report/form/value/InitializerKit.java

@ -0,0 +1,32 @@
package com.fanruan.api.report.form.value;
import com.fr.form.ui.WidgetValue;
import com.fr.form.ui.concept.data.ValueInitializer;
/**
* @author richie
* @version 10.0
* Created by richie on 2019/9/17
* 初始化工具类
*/
public class InitializerKit {
/**
* 初始化化一个控件值对象
*
* @return 控件值
*/
public static ValueInitializer newValue() {
return new WidgetValue();
}
/**
* 初始化一个控件值对象
*
* @param value 控件值的值
* @return 控件值
*/
public static ValueInitializer newValue(Object value) {
return new WidgetValue(value);
}
}
Loading…
Cancel
Save