Browse Source

控件设计界面接口

master
richie 5 years ago
parent
commit
fe1260db0f
  1. 12
      src/main/java/com/fanruan/api/design/work/form/creator/XFieldCreator.java

12
src/main/java/com/fanruan/api/design/work/form/creator/XFieldEditor.java → src/main/java/com/fanruan/api/design/work/form/creator/XFieldCreator.java

@ -4,6 +4,7 @@ import com.fanruan.api.design.DesignKit;
import com.fr.design.form.util.XCreatorConstants; import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.mainframe.widget.editors.InChangeBooleanEditor; import com.fr.design.mainframe.widget.editors.InChangeBooleanEditor;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.concept.Blankable;
import java.awt.*; import java.awt.*;
@ -13,9 +14,9 @@ import java.awt.*;
* Created by richie on 2019-09-10 * Created by richie on 2019-09-10
* 控件的UI展示和设计类 * 控件的UI展示和设计类
*/ */
public abstract class XFieldEditor extends XOpenCreator { public abstract class XFieldCreator extends XOpenCreator {
public XFieldEditor(Widget fieldEditor, Dimension dimension) { public XFieldCreator(Widget fieldEditor, Dimension dimension) {
super(fieldEditor, dimension); super(fieldEditor, dimension);
} }
@ -33,9 +34,16 @@ public abstract class XFieldEditor extends XOpenCreator {
.i18n(DesignKit.i18nText("Fine-Design_Form_Font_Size")) .i18n(DesignKit.i18nText("Fine-Design_Form_Font_Size"))
.keyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Report_Advanced"); .keyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Report_Advanced");
Widget widget = toData();
if (widget instanceof Blankable && ((Blankable) widget).isAllowBlank()) {
return new Attribute[]{ return new Attribute[]{
allowBlank, blankErrorMsg, fontSize allowBlank, blankErrorMsg, fontSize
}; };
} }
return new Attribute[]{
allowBlank, fontSize
};
}
} }
Loading…
Cancel
Save