forked from fanruan/design
Browse Source
* commit '70d83b52aaf24c1c2dd6c734d0461f988d414d1b': (96 commits) 1 1 1 1 修改代码检查错误 修改代码检查错误 修改一直触发查询bug 修改一直触发查询bug 修改一直触发查询bug,整理chartEditPane加载代码。 REPORT-4345 设置了过滤的单元格下拉复制后,在右侧面板给其中一个单元格更改过滤设置,则所有单元格的过滤都会更改 REPORT-4296 frm控件栏无法正常显示图标 去掉ChartEditPane对Prepare4DataSourceChange接口的实现。 解决 设计器切换模板时一直触发查询 客户bug 添加echarts使用的类,解决echart插件不能使用问题 DEC-8 设计器远程误删服务器缓存 无JIRA任务, 国际化冲突修正. DEC-8 设计器远程干涉服务器缓存问题 1 1 1 DEC-8 设计器远程干涉服务器缓存问题 ...master
superman
7 years ago
32 changed files with 591 additions and 386 deletions
@ -1,47 +1,55 @@ |
|||||||
package com.fr.design.report; |
package com.fr.design.report; |
||||||
|
|
||||||
import java.awt.BorderLayout; |
import java.awt.BorderLayout; |
||||||
|
|
||||||
import com.fr.page.ReportSettingsProvider; |
import javax.swing.JPanel; |
||||||
import com.fr.design.gui.icheckbox.UICheckBox; |
|
||||||
import com.fr.design.layout.FRGUIPaneFactory; |
import com.fr.page.ReportSettingsProvider; |
||||||
import com.fr.design.dialog.BasicPane; |
import com.fr.design.gui.icheckbox.UICheckBox; |
||||||
import com.fr.general.Inter; |
import com.fr.design.layout.FRGUIPaneFactory; |
||||||
import com.fr.design.style.background.BackgroundPane; |
import com.fr.design.dialog.BasicPane; |
||||||
|
import com.fr.general.Inter; |
||||||
public class ReportBackgroundPane extends BasicPane { |
import com.fr.design.style.background.BackgroundPane; |
||||||
private UICheckBox isPrintBackgroundCheckBox; |
|
||||||
private BackgroundPane backgroundPane; |
public class ReportBackgroundPane extends BasicPane { |
||||||
|
private UICheckBox isPrintBackgroundCheckBox; |
||||||
public ReportBackgroundPane() { |
private UICheckBox isExportBackgroundCheckBox; |
||||||
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
private BackgroundPane backgroundPane; |
||||||
|
|
||||||
backgroundPane = new BackgroundPane(); |
public ReportBackgroundPane() { |
||||||
this.add(backgroundPane, BorderLayout.CENTER); |
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
||||||
|
|
||||||
isPrintBackgroundCheckBox = new UICheckBox( |
backgroundPane = new BackgroundPane(); |
||||||
Inter.getLocText("ReportGUI-Print_Background")); |
this.add(backgroundPane, BorderLayout.CENTER); |
||||||
this.add(isPrintBackgroundCheckBox, BorderLayout.SOUTH); |
|
||||||
} |
isPrintBackgroundCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Print_Background")); |
||||||
|
isExportBackgroundCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Export_Background")); |
||||||
@Override |
JPanel sourth = new JPanel(); |
||||||
protected String title4PopupWindow() { |
sourth.add(isExportBackgroundCheckBox); |
||||||
return Inter.getLocText(new String[]{"paper", "Background"}); |
sourth.add(isPrintBackgroundCheckBox); |
||||||
} |
this.add(sourth, BorderLayout.SOUTH); |
||||||
|
} |
||||||
/** |
|
||||||
* Populate |
@Override |
||||||
*/ |
protected String title4PopupWindow() { |
||||||
public void populate(ReportSettingsProvider reportSettings) { |
return Inter.getLocText(new String[]{"paper", "Background"}); |
||||||
this.backgroundPane.populate(reportSettings.getBackground()); |
} |
||||||
this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground()); |
|
||||||
} |
/** |
||||||
|
* Populate |
||||||
/** |
*/ |
||||||
* update |
public void populate(ReportSettingsProvider reportSettings) { |
||||||
*/ |
this.backgroundPane.populate(reportSettings.getBackground()); |
||||||
public void update(ReportSettingsProvider reportSettings) { |
this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground()); |
||||||
reportSettings.setBackground(this.backgroundPane.update()); |
this.isExportBackgroundCheckBox.setSelected(reportSettings.isExportBackground()); |
||||||
reportSettings.setPrintBackground(this.isPrintBackgroundCheckBox.isSelected()); |
} |
||||||
} |
|
||||||
|
/** |
||||||
|
* update |
||||||
|
*/ |
||||||
|
public void update(ReportSettingsProvider reportSettings) { |
||||||
|
reportSettings.setBackground(this.backgroundPane.update()); |
||||||
|
reportSettings.setPrintBackground(this.isPrintBackgroundCheckBox.isSelected()); |
||||||
|
reportSettings.setExportBackground(this.isExportBackgroundCheckBox.isSelected()); |
||||||
|
} |
||||||
} |
} |
@ -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); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
@ -0,0 +1,42 @@ |
|||||||
|
package com.fr.design.mainframe.chart.gui.type; |
||||||
|
|
||||||
|
import com.fr.chart.chartattr.Chart; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by mengao on 2017/8/30. |
||||||
|
* 不能删掉这个类,echarts插件中用到 |
||||||
|
*/ |
||||||
|
public abstract class UserDefinedChartTypePane extends AbstractChartTypePane { |
||||||
|
protected String[] getTypeLayoutPath() { |
||||||
|
return new String[0]; |
||||||
|
} |
||||||
|
|
||||||
|
protected String[] getTypeLayoutTipName(){ |
||||||
|
return new String[0]; |
||||||
|
} |
||||||
|
|
||||||
|
protected String[] getTypeIconPath(){ |
||||||
|
return new String[]{"/com/fr/design/images/chart/default.png"}; |
||||||
|
} |
||||||
|
|
||||||
|
protected String[] getTypeTipName() { |
||||||
|
return new String[]{title4PopupWindow()}; |
||||||
|
} |
||||||
|
|
||||||
|
public void updateBean(Chart chart) { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
public void populateBean(Chart chart){ |
||||||
|
typeDemo.get(0).isPressing = true; |
||||||
|
checkDemosBackground(); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 弹出界面的标题 |
||||||
|
* @return 标题 |
||||||
|
*/ |
||||||
|
public String title4PopupWindow(){ |
||||||
|
return ""; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue