private UIRefPane generateRef(String reftype){
UIRefPane ref = new UIRefPane();
((UIRefPaneTextField) (ref.getUITextField())).setIsAutoAdjustLength(true);
if (reftype!= null) {
if (reftype.startsWith("<")) {
String type = reftype;
type = type.replace('<', ' ').trim();
type = type.replace('>', ' ').trim();
try {
ref.setIsCustomDefined(true);
AbstractRefModel refModel = (AbstractRefModel) Class.forName(type).newInstance();
ref.setRefNodeName("自定义参照");
ref.setRefModel(refModel);
} catch (Exception e) {
Logger.error(e.getMessage());
}
} else
ref.setRefNodeName(reftype);
} else {
ref.setIsCustomDefined(true);
ref.setRefNodeName("自定义参照");
}
ref.setTextType(UITextType.TextStr);
ref.setReturnCode(false);
ref.setMaxLength(100);
return ref;
}
根据参照名称生成参照面板_支持自定义参照和系统参照
最新推荐文章于 2024-04-29 09:23:40 发布