|
|
@ -1,11 +1,14 @@ |
|
|
|
package com.fr.design.report.freeze; |
|
|
|
package com.fr.design.report.freeze; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.FRContext; |
|
|
|
import com.fr.base.FRContext; |
|
|
|
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.extra.WebViewDlgHelper; |
|
|
|
import com.fr.design.extra.WebViewDlgHelper; |
|
|
|
|
|
|
|
import com.fr.design.gui.frpane.UITabbedPane; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.ilable.ActionLabel; |
|
|
|
import com.fr.design.gui.ilable.ActionLabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.page.ReportPageAttrProvider; |
|
|
|
import com.fr.page.ReportPageAttrProvider; |
|
|
@ -29,6 +32,9 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
//边框高度
|
|
|
|
//边框高度
|
|
|
|
private static final int LABEL_HEIGHT = 45; |
|
|
|
private static final int LABEL_HEIGHT = 45; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//tab
|
|
|
|
|
|
|
|
private UITabbedPane tabbedPane; |
|
|
|
|
|
|
|
|
|
|
|
// 重复标题行
|
|
|
|
// 重复标题行
|
|
|
|
private RepeatRowPane repeatTitleRowPane; |
|
|
|
private RepeatRowPane repeatTitleRowPane; |
|
|
|
// 重复标题列
|
|
|
|
// 重复标题列
|
|
|
@ -41,6 +47,10 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
private FreezePagePane freezePageRowPane; |
|
|
|
private FreezePagePane freezePageRowPane; |
|
|
|
// 分页冻结列
|
|
|
|
// 分页冻结列
|
|
|
|
private FreezePagePane freezePageColPane; |
|
|
|
private FreezePagePane freezePageColPane; |
|
|
|
|
|
|
|
//分页冻结结尾行
|
|
|
|
|
|
|
|
private FreezePagePane freezeFootRowPane; |
|
|
|
|
|
|
|
//分页冻结结尾列
|
|
|
|
|
|
|
|
private FreezePagePane freezeFootColPane; |
|
|
|
// 填报冻结行
|
|
|
|
// 填报冻结行
|
|
|
|
private FreezeWriteRowPane freezeWriteRowPane; |
|
|
|
private FreezeWriteRowPane freezeWriteRowPane; |
|
|
|
// 填报冻结列
|
|
|
|
// 填报冻结列
|
|
|
@ -53,12 +63,21 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
private UICheckBox useRepeatFinisCCheckBox; |
|
|
|
private UICheckBox useRepeatFinisCCheckBox; |
|
|
|
|
|
|
|
|
|
|
|
// 分页冻结
|
|
|
|
// 分页冻结
|
|
|
|
private UICheckBox usePageFrozenCCheckBox; |
|
|
|
private UICheckBox usePageHeadFrozenCCheckBox; |
|
|
|
private UICheckBox usePageFrozenRCheckBox; |
|
|
|
private UICheckBox usePageHeadFrozenRCheckBox; |
|
|
|
|
|
|
|
private UICheckBox usePageFootFrozenCCheckBox; |
|
|
|
|
|
|
|
private UICheckBox usePageFootFrozenRCheckBox; |
|
|
|
// 填报冻结
|
|
|
|
// 填报冻结
|
|
|
|
private UICheckBox useWriteFrozenCCheckBox; |
|
|
|
private UICheckBox useWriteFrozenCCheckBox; |
|
|
|
private UICheckBox useWriteFrozenRCheckBox; |
|
|
|
private UICheckBox useWriteFrozenRCheckBox; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final int REPEAT_AND_FROZEN_WIDTH = 600, REPEAT_AND_FROZEN_HEIGHT = 100; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//标题区域
|
|
|
|
|
|
|
|
private static final String REPEAT_AND_FROZEN_HEAD = Toolkit.i18nText("Fine-Design_Report_Repeat_Head"); |
|
|
|
|
|
|
|
//结尾区域
|
|
|
|
|
|
|
|
private static final String REPEAT_AND_FROZEN_FOOT = Toolkit.i18nText("Fine-Design_Report_Repeat_Foot"); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 重复标题行 |
|
|
|
* 重复标题行 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -137,30 +156,41 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
* 分页冻结Pane |
|
|
|
* 分页冻结Pane |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private JPanel initPageFrozenPane() { |
|
|
|
private JPanel initPageFrozenPane() { |
|
|
|
JPanel pagePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
|
|
|
// 分页冻结
|
|
|
|
// 分页冻结
|
|
|
|
UILabel pageLabel = new UILabel(getPageFrozenTitle()); |
|
|
|
|
|
|
|
JPanel pageLabelPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
|
|
|
pageLabelPanel.add(pageLabel); |
|
|
|
|
|
|
|
pagePanel.add(pageLabelPanel, BorderLayout.NORTH); |
|
|
|
|
|
|
|
JPanel pagecon = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); |
|
|
|
JPanel pagecon = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); |
|
|
|
pagecon.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); |
|
|
|
pagecon.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); |
|
|
|
pagePanel.add(pagecon, BorderLayout.CENTER); |
|
|
|
|
|
|
|
UILabel warningx = new UILabel("(" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Please_Set_Repeat_First") + ")"); |
|
|
|
|
|
|
|
warningx.setForeground(Color.red); |
|
|
|
|
|
|
|
pageLabelPanel.add(warningx); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JPanel pageRowGridPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
JPanel pageRowGridPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
pageRowGridPane.add(this.usePageFrozenRCheckBox = new UICheckBox()); |
|
|
|
pageRowGridPane.add(this.usePageHeadFrozenRCheckBox = new UICheckBox()); |
|
|
|
pagecon.add(pageRowGridPane); |
|
|
|
|
|
|
|
// 显示行冻结信息的panel
|
|
|
|
// 显示行冻结信息的panel
|
|
|
|
freezePageRowPane = new FreezePagePane(true); |
|
|
|
freezePageRowPane = new FreezePagePane(true); |
|
|
|
pageRowGridPane.add(freezePageRowPane); |
|
|
|
pageRowGridPane.add(freezePageRowPane); |
|
|
|
|
|
|
|
pagecon.add(pageRowGridPane); |
|
|
|
addPageFrozenCol(pagecon); |
|
|
|
addPageFrozenCol(pagecon); |
|
|
|
|
|
|
|
addBorder(pagecon, REPEAT_AND_FROZEN_HEAD); |
|
|
|
|
|
|
|
return pagecon; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return pagePanel; |
|
|
|
private JPanel initPageFrozenFootPane() { |
|
|
|
|
|
|
|
JPanel pageContentPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); |
|
|
|
|
|
|
|
pageContentPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); |
|
|
|
|
|
|
|
// 行冻结
|
|
|
|
|
|
|
|
JPanel pageRowPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
|
|
|
pageRowPane.add(this.usePageFootFrozenRCheckBox = new UICheckBox()); |
|
|
|
|
|
|
|
// 列冻结
|
|
|
|
|
|
|
|
JPanel pageColPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
|
|
|
pageColPane.add(this.usePageFootFrozenCCheckBox = new UICheckBox()); |
|
|
|
|
|
|
|
pageContentPanel.add(pageRowPane); |
|
|
|
|
|
|
|
freezeFootRowPane = new FreezePagePane(true, true); |
|
|
|
|
|
|
|
pageRowPane.add(freezeFootRowPane); |
|
|
|
|
|
|
|
pageContentPanel.add(pageColPane); |
|
|
|
|
|
|
|
freezeFootColPane = new FreezePagePane(false, true); |
|
|
|
|
|
|
|
pageColPane.add(freezeFootColPane); |
|
|
|
|
|
|
|
addBorder(pageContentPanel, REPEAT_AND_FROZEN_FOOT); |
|
|
|
|
|
|
|
return pageContentPanel; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 分页冻结列 |
|
|
|
* 分页冻结列 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -168,7 +198,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
// 显示列冻结信息的panel
|
|
|
|
// 显示列冻结信息的panel
|
|
|
|
freezePageColPane = new FreezePagePane(false); |
|
|
|
freezePageColPane = new FreezePagePane(false); |
|
|
|
JPanel pageColGridPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
JPanel pageColGridPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
pageColGridPane.add(this.usePageFrozenCCheckBox = new UICheckBox()); |
|
|
|
pageColGridPane.add(this.usePageHeadFrozenCCheckBox = new UICheckBox()); |
|
|
|
pagecon.add(pageColGridPane); |
|
|
|
pagecon.add(pageColGridPane); |
|
|
|
pageColGridPane.add(freezePageColPane); |
|
|
|
pageColGridPane.add(freezePageColPane); |
|
|
|
} |
|
|
|
} |
|
|
@ -176,7 +206,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 填报冻结Pane |
|
|
|
* 填报冻结Pane |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private JPanel initWriteFrozenPane() { |
|
|
|
protected JPanel initWriteFrozenPane() { |
|
|
|
JPanel writePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
JPanel writePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
// 填报冻结
|
|
|
|
// 填报冻结
|
|
|
|
UILabel writeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Face_Write_Frozen") + ":"); |
|
|
|
UILabel writeLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Face_Write_Frozen") + ":"); |
|
|
@ -209,13 +239,18 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
JPanel cenrepeatPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
JPanel cenrepeatPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
outrepeatPanel.add(cenrepeatPanel); |
|
|
|
outrepeatPanel.add(cenrepeatPanel); |
|
|
|
JPanel outfreezePanel = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Frozen")); |
|
|
|
JPanel outfreezePanel = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Frozen")); |
|
|
|
this.add(outrepeatPanel, BorderLayout.NORTH); |
|
|
|
JPanel pagePanel = new JPanel(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
this.add(outfreezePanel, BorderLayout.CENTER); |
|
|
|
JPanel repeatHeadPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); |
|
|
|
JPanel repeatPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); |
|
|
|
JPanel repeatFootPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); |
|
|
|
repeatPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); |
|
|
|
tabbedPane = new UITabbedPane(); |
|
|
|
JPanel freezePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
|
|
|
|
|
|
|
//添加上方的边界线
|
|
|
|
outfreezePanel.add(freezePanel); |
|
|
|
addBorder(repeatHeadPanel, REPEAT_AND_FROZEN_HEAD); |
|
|
|
|
|
|
|
addBorder(repeatFootPanel, REPEAT_AND_FROZEN_FOOT); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pagePanel.add(outrepeatPanel, BorderLayout.NORTH); |
|
|
|
|
|
|
|
pagePanel.add(outfreezePanel, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
// 重复打印部分
|
|
|
|
// 重复打印部分
|
|
|
|
// 重复打印标题的起始行
|
|
|
|
// 重复打印标题的起始行
|
|
|
|
JPanel labelPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
JPanel labelPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
@ -223,17 +258,24 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
UILabel warning = new UILabel("(" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_FreezeWarning") + ")"); |
|
|
|
UILabel warning = new UILabel("(" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_FreezeWarning") + ")"); |
|
|
|
warning.setForeground(Color.red); |
|
|
|
warning.setForeground(Color.red); |
|
|
|
labelPanel.add(warning); |
|
|
|
labelPanel.add(warning); |
|
|
|
cenrepeatPanel.add(labelPanel, BorderLayout.NORTH); |
|
|
|
cenrepeatPanel.add(repeatHeadPanel, BorderLayout.NORTH); |
|
|
|
cenrepeatPanel.add(repeatPanel, BorderLayout.CENTER); |
|
|
|
cenrepeatPanel.add(repeatFootPanel, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
repeatPanel.add(initRowStartPane()); |
|
|
|
repeatHeadPanel.add(initRowStartPane()); |
|
|
|
addColStart(repeatPanel); |
|
|
|
addColStart(repeatHeadPanel); |
|
|
|
repeatPanel.add(initFootRowStarPane()); |
|
|
|
repeatFootPanel.add(initFootRowStarPane()); |
|
|
|
addFootColStart(repeatPanel); |
|
|
|
addFootColStart(repeatFootPanel); |
|
|
|
|
|
|
|
|
|
|
|
freezePanel.add(initPageFrozenPane(), BorderLayout.NORTH); |
|
|
|
|
|
|
|
addWriteFrozen(freezePanel); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
outfreezePanel.add(initPageFrozenPane(), BorderLayout.NORTH); |
|
|
|
|
|
|
|
outfreezePanel.add(initPageFrozenFootPane(),BorderLayout.CENTER); |
|
|
|
|
|
|
|
outfreezePanel.add(new UILabel("<html><font color=gray> "+ Toolkit.i18nText("Fine-Design_Report_Engine_Freeze_Tip") + "</font></html>"),BorderLayout.SOUTH); |
|
|
|
|
|
|
|
JPanel writePanel = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Frozen")); |
|
|
|
|
|
|
|
addWriteFrozen(writePanel, pagePanel); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (tabbedPane.getTabSize() == 0) { |
|
|
|
|
|
|
|
this.add(pagePanel); |
|
|
|
|
|
|
|
} |
|
|
|
initPageRwoListener(); |
|
|
|
initPageRwoListener(); |
|
|
|
initPageColListener(); |
|
|
|
initPageColListener(); |
|
|
|
initWriteListener(); |
|
|
|
initWriteListener(); |
|
|
@ -253,8 +295,11 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
private void initPageRwoListener() { |
|
|
|
private void initPageRwoListener() { |
|
|
|
repeatTitleRowPane.addListener(freezePageRowListener); |
|
|
|
repeatTitleRowPane.addListener(freezePageRowListener); |
|
|
|
// 分页重复冻结行
|
|
|
|
repeatFinisRowPane.addListener(freezePageFootRowListener); |
|
|
|
usePageFrozenRCheckBox.addChangeListener(usePageFrozenRListener); |
|
|
|
// 分页重复冻结标题行
|
|
|
|
|
|
|
|
usePageHeadFrozenRCheckBox.addChangeListener(usePageFrozenRListener); |
|
|
|
|
|
|
|
//分页重复冻结结尾行
|
|
|
|
|
|
|
|
usePageFootFrozenRCheckBox.addChangeListener(freezePageFootRowListener); |
|
|
|
//重复标题行
|
|
|
|
//重复标题行
|
|
|
|
useRepeatTitleRCheckBox.addChangeListener(useRepeatTitleRListener); |
|
|
|
useRepeatTitleRCheckBox.addChangeListener(useRepeatTitleRListener); |
|
|
|
//重复结尾行
|
|
|
|
//重复结尾行
|
|
|
@ -263,16 +308,24 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
protected void initPageColListener() { |
|
|
|
protected void initPageColListener() { |
|
|
|
repeatTitleColPane.addListener(freezePageColListener); |
|
|
|
repeatTitleColPane.addListener(freezePageColListener); |
|
|
|
// 分页重复冻结列
|
|
|
|
repeatFinisColPane.addListener(freezePageFootColListener); |
|
|
|
usePageFrozenCCheckBox.addChangeListener(usePageFrozenCListener); |
|
|
|
// 分页重复冻结标题列
|
|
|
|
|
|
|
|
usePageHeadFrozenCCheckBox.addChangeListener(usePageFrozenCListener); |
|
|
|
|
|
|
|
//分页重复冻结结尾列
|
|
|
|
|
|
|
|
usePageFootFrozenCCheckBox.addChangeListener(freezePageFootColListener); |
|
|
|
//重复标题列
|
|
|
|
//重复标题列
|
|
|
|
useRepeatTitleCCheckBox.addChangeListener(useRepeatTitleCListener); |
|
|
|
useRepeatTitleCCheckBox.addChangeListener(useRepeatTitleCListener); |
|
|
|
//重复结尾列
|
|
|
|
//重复结尾列
|
|
|
|
useRepeatFinisCCheckBox.addChangeListener(useRepeatFinisCListener); |
|
|
|
useRepeatFinisCCheckBox.addChangeListener(useRepeatFinisCListener); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void addWriteFrozen(JPanel freezePanel) { |
|
|
|
protected void addWriteFrozen(JPanel freezePanel, JPanel pagePanel) { |
|
|
|
freezePanel.add(initWriteFrozenPane(), BorderLayout.CENTER); |
|
|
|
freezePanel.add(initWriteFrozenPane(), BorderLayout.CENTER); |
|
|
|
|
|
|
|
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Page_Preview"), pagePanel); |
|
|
|
|
|
|
|
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Write_Preview"), freezePanel); |
|
|
|
|
|
|
|
//去除对应的焦点虚线边框
|
|
|
|
|
|
|
|
tabbedPane.setFocusable(false); |
|
|
|
|
|
|
|
this.add(tabbedPane); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void addFootColStart(JPanel repeatPanel) { |
|
|
|
protected void addFootColStart(JPanel repeatPanel) { |
|
|
@ -287,7 +340,14 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
repeatFinisColPane.setEnabled(useRepeatFinisCCheckBox.isSelected()); |
|
|
|
boolean flag = useRepeatFinisCCheckBox.isSelected(); |
|
|
|
|
|
|
|
repeatFinisColPane.setEnabled(flag); |
|
|
|
|
|
|
|
if (!flag) { |
|
|
|
|
|
|
|
usePageFootFrozenCCheckBox.setSelected(false); |
|
|
|
|
|
|
|
usePageFootFrozenCCheckBox.setEnabled(false); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
usePageFootFrozenCCheckBox.setEnabled(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
@ -296,8 +356,14 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
repeatFinisRowPane.setEnabled(useRepeatFinisRCheckBox.isSelected()); |
|
|
|
boolean flag = useRepeatFinisRCheckBox.isSelected(); |
|
|
|
|
|
|
|
repeatFinisRowPane.setEnabled(flag); |
|
|
|
|
|
|
|
if (!flag) { |
|
|
|
|
|
|
|
usePageFootFrozenRCheckBox.setSelected(false); |
|
|
|
|
|
|
|
usePageFootFrozenRCheckBox.setEnabled(false); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
usePageFootFrozenRCheckBox.setEnabled(true); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -308,10 +374,10 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
boolean flag = useRepeatTitleCCheckBox.isSelected(); |
|
|
|
boolean flag = useRepeatTitleCCheckBox.isSelected(); |
|
|
|
repeatTitleColPane.setEnabled(flag); |
|
|
|
repeatTitleColPane.setEnabled(flag); |
|
|
|
if (!flag) { |
|
|
|
if (!flag) { |
|
|
|
usePageFrozenCCheckBox.setSelected(false); |
|
|
|
usePageHeadFrozenCCheckBox.setSelected(false); |
|
|
|
usePageFrozenCCheckBox.setEnabled(false); |
|
|
|
usePageHeadFrozenCCheckBox.setEnabled(false); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
usePageFrozenCCheckBox.setEnabled(true); |
|
|
|
usePageHeadFrozenCCheckBox.setEnabled(true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
@ -323,10 +389,10 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
boolean flag = useRepeatTitleRCheckBox.isSelected(); |
|
|
|
boolean flag = useRepeatTitleRCheckBox.isSelected(); |
|
|
|
repeatTitleRowPane.setEnabled(flag); |
|
|
|
repeatTitleRowPane.setEnabled(flag); |
|
|
|
if (!flag) { |
|
|
|
if (!flag) { |
|
|
|
usePageFrozenRCheckBox.setSelected(false); |
|
|
|
usePageHeadFrozenRCheckBox.setSelected(false); |
|
|
|
usePageFrozenRCheckBox.setEnabled(false); |
|
|
|
usePageHeadFrozenRCheckBox.setEnabled(false); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
usePageFrozenRCheckBox.setEnabled(true); |
|
|
|
usePageHeadFrozenRCheckBox.setEnabled(true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
@ -352,14 +418,14 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
ChangeListener usePageFrozenCListener = new ChangeListener() { |
|
|
|
ChangeListener usePageFrozenCListener = new ChangeListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
freezePageColPane.setEnabled(usePageFrozenCCheckBox.isSelected()); |
|
|
|
freezePageColPane.setEnabled(usePageHeadFrozenCCheckBox.isSelected()); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
ChangeListener usePageFrozenRListener = new ChangeListener() { |
|
|
|
ChangeListener usePageFrozenRListener = new ChangeListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
freezePageRowPane.setEnabled(usePageFrozenRCheckBox.isSelected()); |
|
|
|
freezePageRowPane.setEnabled(usePageHeadFrozenRCheckBox.isSelected()); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -383,6 +449,28 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 分页重复冻结列数据联动(结尾行)
|
|
|
|
|
|
|
|
ChangeListener freezePageFootRowListener = new ChangeListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
|
|
|
|
FT ft = repeatFinisRowPane.updateBean(); |
|
|
|
|
|
|
|
int to = ft.getTo(); |
|
|
|
|
|
|
|
int maxFrom = Math.max(ft.getFrom(), -1); |
|
|
|
|
|
|
|
freezeFootRowPane.populateBean(new FT(maxFrom, Math.max(maxFrom, to))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 分页重复冻结列数据联动(结尾列)
|
|
|
|
|
|
|
|
ChangeListener freezePageFootColListener = new ChangeListener() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
|
|
|
|
FT ft = repeatFinisColPane.updateBean(); |
|
|
|
|
|
|
|
int to = ft.getTo(); |
|
|
|
|
|
|
|
int maxFrom = Math.max(ft.getFrom(), -1); |
|
|
|
|
|
|
|
freezeFootColPane.populateBean(new FT(maxFrom, Math.max(maxFrom, to))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 窗口标题 |
|
|
|
* 窗口标题 |
|
|
|
* |
|
|
|
* |
|
|
@ -407,7 +495,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
if (isDefalut(ft)) { |
|
|
|
if (isDefalut(ft)) { |
|
|
|
this.repeatTitleRowPane.populateBean(defaultFT); |
|
|
|
this.repeatTitleRowPane.populateBean(defaultFT); |
|
|
|
this.repeatTitleRowPane.setEnabled(false); |
|
|
|
this.repeatTitleRowPane.setEnabled(false); |
|
|
|
usePageFrozenRCheckBox.setEnabled(false); |
|
|
|
usePageHeadFrozenRCheckBox.setEnabled(false); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.repeatTitleRowPane.populateBean(ft); |
|
|
|
this.repeatTitleRowPane.populateBean(ft); |
|
|
|
useRepeatTitleRCheckBox.setSelected(true); |
|
|
|
useRepeatTitleRCheckBox.setSelected(true); |
|
|
@ -418,12 +506,14 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
this.repeatFinisRowPane.populateBean(defaultFT); |
|
|
|
this.repeatFinisRowPane.populateBean(defaultFT); |
|
|
|
this.repeatFinisRowPane.setEnabled(false); |
|
|
|
this.repeatFinisRowPane.setEnabled(false); |
|
|
|
useRepeatFinisRCheckBox.setSelected(false); |
|
|
|
useRepeatFinisRCheckBox.setSelected(false); |
|
|
|
|
|
|
|
usePageFootFrozenRCheckBox.setEnabled(false); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.repeatFinisRowPane.populateBean(ft); |
|
|
|
this.repeatFinisRowPane.populateBean(ft); |
|
|
|
useRepeatFinisRCheckBox.setSelected(true); |
|
|
|
useRepeatFinisRCheckBox.setSelected(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.usePageFrozenRCheckBox.setSelected(attribute.isUsePageFrozenRow()); |
|
|
|
this.usePageHeadFrozenRCheckBox.setSelected(attribute.isUsePageFrozenRow()); |
|
|
|
|
|
|
|
this.usePageFootFrozenRCheckBox.setSelected(attribute.isUsePageFootRowFrozen()); |
|
|
|
this.freezePageRowPane.setEnabled(attribute.isUsePageFrozenRow()); |
|
|
|
this.freezePageRowPane.setEnabled(attribute.isUsePageFrozenRow()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -432,7 +522,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
if (isDefalut(ft)) { |
|
|
|
if (isDefalut(ft)) { |
|
|
|
this.repeatTitleColPane.populateBean(defaultFT); |
|
|
|
this.repeatTitleColPane.populateBean(defaultFT); |
|
|
|
this.repeatTitleColPane.setEnabled(false); |
|
|
|
this.repeatTitleColPane.setEnabled(false); |
|
|
|
usePageFrozenCCheckBox.setEnabled(false); |
|
|
|
usePageHeadFrozenCCheckBox.setEnabled(false); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.repeatTitleColPane.populateBean(ft); |
|
|
|
this.repeatTitleColPane.populateBean(ft); |
|
|
|
useRepeatTitleCCheckBox.setSelected(true); |
|
|
|
useRepeatTitleCCheckBox.setSelected(true); |
|
|
@ -443,12 +533,14 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
this.repeatFinisColPane.populateBean(defaultFT); |
|
|
|
this.repeatFinisColPane.populateBean(defaultFT); |
|
|
|
this.repeatFinisColPane.setEnabled(false); |
|
|
|
this.repeatFinisColPane.setEnabled(false); |
|
|
|
useRepeatFinisCCheckBox.setSelected(false); |
|
|
|
useRepeatFinisCCheckBox.setSelected(false); |
|
|
|
|
|
|
|
usePageFootFrozenCCheckBox.setEnabled(false); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.repeatFinisColPane.populateBean(ft); |
|
|
|
this.repeatFinisColPane.populateBean(ft); |
|
|
|
useRepeatFinisCCheckBox.setSelected(true); |
|
|
|
useRepeatFinisCCheckBox.setSelected(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.usePageFrozenCCheckBox.setSelected(attribute.isUsePageFrozenColumn()); |
|
|
|
this.usePageHeadFrozenCCheckBox.setSelected(attribute.isUsePageFrozenColumn()); |
|
|
|
|
|
|
|
this.usePageFootFrozenCCheckBox.setSelected(attribute.isUsePageFootColFrozen()); |
|
|
|
this.freezePageColPane.setEnabled(attribute.isUsePageFrozenColumn()); |
|
|
|
this.freezePageColPane.setEnabled(attribute.isUsePageFrozenColumn()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -491,9 +583,64 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
updateRowPane(attribute); |
|
|
|
updateRowPane(attribute); |
|
|
|
updateColPane(attribute); |
|
|
|
updateColPane(attribute); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//单独将重复、分页、填报处理一下,原先的判断逻辑比较混乱,抽出来方便判断
|
|
|
|
|
|
|
|
updateUseAttr(attribute); |
|
|
|
|
|
|
|
|
|
|
|
return attribute; |
|
|
|
return attribute; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void updateUseAttr(ReportPageAttrProvider attribute) { |
|
|
|
|
|
|
|
attribute.setUseRepeat(isUseRepeat()); |
|
|
|
|
|
|
|
attribute.setUsePageFrozen(isUsePageFrozen()); |
|
|
|
|
|
|
|
attribute.setUseWriteFrozen(isUseWriteFrozen()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 是否使用填报冻结 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return 使用则返回true |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private boolean isUseWriteFrozen() { |
|
|
|
|
|
|
|
return this.useWriteFrozenCCheckBox.isSelected() |
|
|
|
|
|
|
|
|| this.useWriteFrozenRCheckBox.isSelected(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 是否使用分页冻结 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return 使用则返回true |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private boolean isUsePageFrozen() { |
|
|
|
|
|
|
|
return this.usePageHeadFrozenRCheckBox.isSelected() |
|
|
|
|
|
|
|
|| this.usePageHeadFrozenCCheckBox.isSelected() |
|
|
|
|
|
|
|
|| this.usePageFootFrozenRCheckBox.isSelected() |
|
|
|
|
|
|
|
|| this.usePageFootFrozenCCheckBox.isSelected(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 是否使用重复 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @return 使用返回true |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private boolean isUseRepeat() { |
|
|
|
|
|
|
|
return this.useRepeatTitleRCheckBox.isSelected() |
|
|
|
|
|
|
|
|| this.useRepeatFinisRCheckBox.isSelected() |
|
|
|
|
|
|
|
|| this.useRepeatTitleCCheckBox.isSelected() |
|
|
|
|
|
|
|
|| this.useRepeatFinisCCheckBox.isSelected(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 给内部的重复与冻结选项添加指定的边框 |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param jPanel 重复或冻结对应的界面 |
|
|
|
|
|
|
|
* @param title 边框的文字 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public static void addBorder(JPanel jPanel, String title) { |
|
|
|
|
|
|
|
jPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createMatteBorder(1,0,0,0, UIConstants.TITLED_BORDER_COLOR), title)); |
|
|
|
|
|
|
|
jPanel.setPreferredSize(new Dimension(REPEAT_AND_FROZEN_WIDTH,REPEAT_AND_FROZEN_HEIGHT)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void updateRowPane(ReportPageAttrProvider attribute) { |
|
|
|
protected void updateRowPane(ReportPageAttrProvider attribute) { |
|
|
|
// 重复标题行
|
|
|
|
// 重复标题行
|
|
|
|
int titleFrom = valid(useRepeatTitleRCheckBox, this.repeatTitleRowPane.updateBean().getFrom()); |
|
|
|
int titleFrom = valid(useRepeatTitleRCheckBox, this.repeatTitleRowPane.updateBean().getFrom()); |
|
|
@ -506,7 +653,10 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
attribute.setRepeatFooterRowFrom(finishFrom); |
|
|
|
attribute.setRepeatFooterRowFrom(finishFrom); |
|
|
|
attribute.setRepeatFooterRowTo(finishTo); |
|
|
|
attribute.setRepeatFooterRowTo(finishTo); |
|
|
|
|
|
|
|
|
|
|
|
attribute.setUsePageFrozenRow(this.usePageFrozenRCheckBox.isSelected()); |
|
|
|
attribute.setUsePageFrozenRow(this.usePageHeadFrozenRCheckBox.isSelected()); |
|
|
|
|
|
|
|
attribute.setUsePageFootFrozen(this.usePageFootFrozenRCheckBox.isSelected() || this.usePageFootFrozenCCheckBox.isSelected()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
attribute.setUsePageFootRowFrozen(this.usePageFootFrozenRCheckBox.isSelected()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private int valid(UICheckBox checkBox, int num) { |
|
|
|
private int valid(UICheckBox checkBox, int num) { |
|
|
@ -524,7 +674,10 @@ public class RepeatAndFreezeSettingPane extends BasicPane { |
|
|
|
attribute.setRepeatFooterColumnFrom(finishFrom); |
|
|
|
attribute.setRepeatFooterColumnFrom(finishFrom); |
|
|
|
attribute.setRepeatFooterColumnTo(finishTo); |
|
|
|
attribute.setRepeatFooterColumnTo(finishTo); |
|
|
|
|
|
|
|
|
|
|
|
attribute.setUsePageFrozenColumn(this.usePageFrozenCCheckBox.isSelected()); |
|
|
|
attribute.setUsePageFrozenColumn(this.usePageHeadFrozenCCheckBox.isSelected()); |
|
|
|
|
|
|
|
attribute.setUsePageFootFrozen(this.usePageFootFrozenRCheckBox.isSelected() || this.usePageFootFrozenCCheckBox.isSelected()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
attribute.setUsePageFootColFrozen(this.usePageFootFrozenCCheckBox.isSelected()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|