帆软报表设计器源代码。
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.
 
 
 
 

46 lines
1.8 KiB

package com.fr.design.mainframe;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;
import com.fr.general.ComparatorUtils;
import com.fr.js.FormHyperlinkProvider;
import com.fr.stable.bridge.StableFactory;
/**
* Created by plough on 2017/7/21.
*/
public class ReportHyperlinkGroupPane extends HyperlinkGroupPane {
private static ReportHyperlinkGroupPane singleton;
// 仅供继承使用,外部通过 getInstance 获取实例
protected ReportHyperlinkGroupPane(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) {
super(hyperlinkGroupPaneActionProvider);
}
public synchronized static ReportHyperlinkGroupPane getInstance(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) {
if (singleton == null) {
singleton = new ReportHyperlinkGroupPane(hyperlinkGroupPaneActionProvider);
}
singleton.refreshPane();
return singleton;
}
protected void refreshPane() {
ElementCasePane reportPane = ((JWorkBook) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()).getEditingElementCasePane();
if (reportPane == null) {
return;
}
populate(reportPane);
}
@Override
protected void initCreatorsFilter() {
this.creatorsFilter = nameableCreator -> {
// 如果是普通报表单元格,那么没有 FormHyperlink 选项
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
return !ComparatorUtils.equals(nameableCreator.getHyperlink(), formHyperlink.getClass());
};
}
}