Browse Source
* commit '57630b24512d7e2d42e24fbe4d4c18143696fa4e': PFC-607 插件安装删除更新不重启支持 fix BI启动用了UIButton,导致FRCoreContext提前加载了 修改代码检查错误 修改代码检查错误 修改一直触发查询bug 修改一直触发查询bug 修改一直触发查询bug,整理chartEditPane加载代码。 REPORT-4345 设置了过滤的单元格下拉复制后,在右侧面板给其中一个单元格更改过滤设置,则所有单元格的过滤都会更改 REPORT-4296 frm控件栏无法正常显示图标 去掉ChartEditPane对Prepare4DataSourceChange接口的实现。 解决 设计器切换模板时一直触发查询 客户bug 无JIAR任务 bug REPORT-2975 9.0更新升级 UILabel加个默认不可用的构造方法 无JIRA任务,不影响模板正常保存 打包 revert build change jdk diamond roll back 接口更新master
superman
7 years ago
17 changed files with 196 additions and 106 deletions
@ -1 +1,100 @@ |
|||||||
package com.fr.design.report;
import com.fr.data.Verifier;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.fun.VerifyDefineProvider;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.ObjectJControlPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.general.Inter;
import com.fr.general.NameObject;
import com.fr.report.write.ReportWriteAttr;
import com.fr.report.write.ValueVerifier;
import com.fr.report.write.WClassVerifier;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable;
import java.util.ArrayList;
import java.util.Set;
/**
* 校验列表
*/
public class VerifierListPane extends ObjectJControlPane {
public VerifierListPane(ElementCasePane ePane) {
super(ePane);
}
/**
* 创建选项
*
* @return 选项
*/
public NameableCreator[] createNameableCreators() {
NameableCreator[] creators = new NameableCreator[]{
new NameObjectCreator(Inter.getLocText(new String[]{"BuildIn", "Verify"}),
"/com/fr/web/images/reportlet.png",
ValueVerifier.class,
BuildInVerifierPane.class)
};
Set<VerifyDefineProvider> set = ExtraDesignClassManager.getInstance().getArray(VerifyDefineProvider.MARK_STRING);
for (VerifyDefineProvider provider : set) {
creators = ArrayUtils.add(creators, new NameObjectCreator(
provider.nameForVerifier(),
provider.iconPath(),
provider.classForVerifier(),
provider.appearanceForVerifier()
) {
});
}
creators = ArrayUtils.add(creators, new NameObjectCreator(
Inter.getLocText(new String[]{"Custom", "Verify"}),
"/com/fr/web/images/reportlet.png",
WClassVerifier.class,
CustomVerifierPane.class));
return creators;
}
@Override
protected String title4PopupWindow() {
return "Verify Collections";
}
public void populate(ReportWriteAttr reportWriteAttr) {
if (reportWriteAttr == null) {
return;
}
java.util.List<NameObject> nameObjectList = new ArrayList<>();
int verifierCount = reportWriteAttr.getVerifierCount();
for (int i = 0; i < verifierCount; i++) {
Verifier verifier = reportWriteAttr.getVerifier(i);
nameObjectList.add(new NameObject(verifier.getName(), verifier));
}
this.populate(nameObjectList.toArray(new NameObject[nameObjectList.size()]));
}
public void updateReportWriteAttr(ReportWriteAttr reportWriteAttr) {
// Nameable[]居然不能强转成NameObject[],一定要这么写...
Nameable[] res = this.update();
NameObject[] res_array = new NameObject[res.length];
java.util.Arrays.asList(res).toArray(res_array);
reportWriteAttr.clearVerifiers();
for (int i = 0; i < res_array.length; i++) {
NameObject nameObject = res_array[i];
if (nameObject.getObject() instanceof Verifier) {
Verifier verifier = (Verifier) nameObject.getObject();
verifier.setName(nameObject.getName());
reportWriteAttr.addVerifier(verifier);
}
}
}
} |
package com.fr.design.report; |
||||||
|
|
||||||
|
import com.fr.data.Verifier; |
||||||
|
import com.fr.design.ExtraDesignClassManager; |
||||||
|
import com.fr.design.fun.VerifyDefineProvider; |
||||||
|
import com.fr.design.gui.controlpane.NameObjectCreator; |
||||||
|
import com.fr.design.gui.controlpane.NameableCreator; |
||||||
|
import com.fr.design.gui.controlpane.ObjectJControlPane; |
||||||
|
import com.fr.design.mainframe.ElementCasePane; |
||||||
|
import com.fr.general.Inter; |
||||||
|
import com.fr.general.NameObject; |
||||||
|
import com.fr.report.write.ReportWriteAttr; |
||||||
|
import com.fr.report.write.ValueVerifier; |
||||||
|
import com.fr.report.write.WClassVerifier; |
||||||
|
import com.fr.stable.ArrayUtils; |
||||||
|
import com.fr.stable.Nameable; |
||||||
|
|
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.Set; |
||||||
|
|
||||||
|
/** |
||||||
|
* 校验列表 |
||||||
|
*/ |
||||||
|
public class VerifierListPane extends ObjectJControlPane { |
||||||
|
|
||||||
|
public VerifierListPane(ElementCasePane ePane) { |
||||||
|
super(ePane); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建选项 |
||||||
|
* |
||||||
|
* @return 选项 |
||||||
|
*/ |
||||||
|
public NameableCreator[] createNameableCreators() { |
||||||
|
NameableCreator[] creators = new NameableCreator[]{ |
||||||
|
new NameObjectCreator(Inter.getLocText(new String[]{"BuildIn", "Verify"}), |
||||||
|
"/com/fr/web/images/reportlet.png", |
||||||
|
ValueVerifier.class, |
||||||
|
BuildInVerifierPane.class) |
||||||
|
}; |
||||||
|
Set<VerifyDefineProvider> set = ExtraDesignClassManager.getInstance().getArray(VerifyDefineProvider.MARK_STRING); |
||||||
|
for (VerifyDefineProvider provider : set) { |
||||||
|
creators = ArrayUtils.add(creators, new NameObjectCreator( |
||||||
|
provider.nameForVerifier(), |
||||||
|
provider.iconPath(), |
||||||
|
provider.classForVerifier(), |
||||||
|
provider.appearanceForVerifier() |
||||||
|
) { |
||||||
|
}); |
||||||
|
} |
||||||
|
creators = ArrayUtils.add(creators, new NameObjectCreator( |
||||||
|
Inter.getLocText(new String[]{"Custom", "Verify"}), |
||||||
|
"/com/fr/web/images/reportlet.png", |
||||||
|
WClassVerifier.class, |
||||||
|
CustomVerifierPane.class)); |
||||||
|
return creators; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected String title4PopupWindow() { |
||||||
|
return "Verify Collections"; |
||||||
|
} |
||||||
|
|
||||||
|
public void populate(ReportWriteAttr reportWriteAttr) { |
||||||
|
if (reportWriteAttr == null) { |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
java.util.List<NameObject> nameObjectList = new ArrayList<NameObject>(); |
||||||
|
|
||||||
|
int verifierCount = reportWriteAttr.getVerifierCount(); |
||||||
|
for (int i = 0; i < verifierCount; i++) { |
||||||
|
Verifier verifier = reportWriteAttr.getVerifier(i); |
||||||
|
nameObjectList.add(new NameObject(verifier.getName(), verifier)); |
||||||
|
} |
||||||
|
|
||||||
|
this.populate(nameObjectList.toArray(new NameObject[nameObjectList.size()])); |
||||||
|
} |
||||||
|
|
||||||
|
public void updateReportWriteAttr(ReportWriteAttr reportWriteAttr) { |
||||||
|
// Nameable[]居然不能强转成NameObject[],一定要这么写...
|
||||||
|
Nameable[] res = this.update(); |
||||||
|
NameObject[] res_array = new NameObject[res.length]; |
||||||
|
java.util.Arrays.asList(res).toArray(res_array); |
||||||
|
|
||||||
|
reportWriteAttr.clearVerifiers(); |
||||||
|
|
||||||
|
for (int i = 0; i < res_array.length; i++) { |
||||||
|
NameObject nameObject = res_array[i]; |
||||||
|
if (nameObject.getObject() instanceof Verifier) { |
||||||
|
Verifier verifier = (Verifier) nameObject.getObject(); |
||||||
|
verifier.setName(nameObject.getName()); |
||||||
|
reportWriteAttr.addVerifier(verifier); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue