You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.5 KiB
41 lines
1.5 KiB
package com.fanruan.api.design.work.form.creator; |
|
|
|
import com.fanruan.api.design.DesignKit; |
|
import com.fr.design.form.util.XCreatorConstants; |
|
import com.fr.design.mainframe.widget.editors.InChangeBooleanEditor; |
|
import com.fr.form.ui.Widget; |
|
|
|
import java.awt.*; |
|
|
|
/** |
|
* @author richie |
|
* @version 10.0 |
|
* Created by richie on 2019-09-10 |
|
* 控件的UI展示和设计类 |
|
*/ |
|
public abstract class XFieldEditor extends XOpenCreator { |
|
|
|
public XFieldEditor(Widget fieldEditor, Dimension dimension) { |
|
super(fieldEditor, dimension); |
|
} |
|
|
|
@Override |
|
public Attribute[] attributes() { |
|
|
|
Attribute allowBlank = Attribute.newAttribute("allowBlank", this.data.getClass()).i18n( |
|
DesignKit.i18nText("Fine-Design_Form_Allow_Blank")) |
|
.editorClass(InChangeBooleanEditor.class).keyValue( |
|
XCreatorConstants.PROPERTY_VALIDATE, "Fine-Design_Basic_Validate"); |
|
Attribute blankErrorMsg = Attribute.newAttribute("errorMessage", this.data.getClass()).i18n( |
|
DesignKit.i18nText("Fine-Design_Report_Engine_Verify_Message")) |
|
.keyValue(XCreatorConstants.PROPERTY_VALIDATE, "Fine-Design_Basic_Validate"); |
|
Attribute fontSize = Attribute.newAttribute("fontSize", this.data.getClass(), "getFontSize", "setFontSize") |
|
.i18n(DesignKit.i18nText("Fine-Design_Form_Font_Size")) |
|
.keyValue(XCreatorConstants.PROPERTY_CATEGORY, "Fine-Design_Report_Advanced"); |
|
|
|
return new Attribute[]{ |
|
allowBlank, blankErrorMsg, fontSize |
|
}; |
|
} |
|
|
|
}
|
|
|