|
|
|
@ -10,9 +10,10 @@ import javax.swing.event.ChangeListener;
|
|
|
|
|
|
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
|
import com.fr.design.dialog.UIDialog; |
|
|
|
|
import com.fr.design.extra.PluginManagerPane; |
|
|
|
|
import com.fr.design.extra.PluginShopDialog; |
|
|
|
|
import com.fr.design.extra.ShopManagerPane; |
|
|
|
|
import com.fr.design.extra.ShopDialog; |
|
|
|
|
import com.fr.design.extra.PluginWebBridge; |
|
|
|
|
import com.fr.design.extra.WebManagerPaneFactory; |
|
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
|
import com.fr.design.gui.ilable.ActionLabel; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
@ -65,7 +66,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
/** |
|
|
|
|
* 重复标题行 |
|
|
|
|
*/ |
|
|
|
|
private JPanel initRowStartPane(){ |
|
|
|
|
private JPanel initRowStartPane() { |
|
|
|
|
JPanel soverlapRowStartPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
useRepeatTitleRCheckBox = new UICheckBox(); |
|
|
|
|
soverlapRowStartPane.add(useRepeatTitleRCheckBox); |
|
|
|
@ -79,7 +80,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
/** |
|
|
|
|
* 重复标题列 |
|
|
|
|
*/ |
|
|
|
|
private JPanel initColStartPane(){ |
|
|
|
|
private JPanel initColStartPane() { |
|
|
|
|
// 重复打印标题的起始列
|
|
|
|
|
JPanel soverlapColStartPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
useRepeatTitleCCheckBox = new UICheckBox(); |
|
|
|
@ -95,7 +96,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
/** |
|
|
|
|
* 重复结尾行 |
|
|
|
|
*/ |
|
|
|
|
private JPanel initFootRowStarPane(){ |
|
|
|
|
private JPanel initFootRowStarPane() { |
|
|
|
|
// 重复打印结尾的起始行
|
|
|
|
|
JPanel foverlapRowStartPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
useRepeatFinisRCheckBox = new UICheckBox(); |
|
|
|
@ -110,7 +111,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
/** |
|
|
|
|
* 重复结尾列 |
|
|
|
|
*/ |
|
|
|
|
private JPanel initFootColStartPane(){ |
|
|
|
|
private JPanel initFootColStartPane() { |
|
|
|
|
// 重复打印结尾的起始列
|
|
|
|
|
JPanel foverlapColStartPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
|
useRepeatFinisCCheckBox = new UICheckBox(); |
|
|
|
@ -126,19 +127,16 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
* 获取分页冻结的标题(表单中不需要写分页二字) |
|
|
|
|
* |
|
|
|
|
* @return 分页冻结的标题 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* @date 2014-11-14-下午1:32:08 |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
protected String getPageFrozenTitle(){ |
|
|
|
|
protected String getPageFrozenTitle() { |
|
|
|
|
return Inter.getLocText("FR-Engine_Page-Frozen"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页冻结Pane |
|
|
|
|
*/ |
|
|
|
|
private JPanel initPageFrozenPane(){ |
|
|
|
|
private JPanel initPageFrozenPane() { |
|
|
|
|
JPanel pagePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
// 分页冻结
|
|
|
|
|
UILabel pageLabel = new UILabel(getPageFrozenTitle()); |
|
|
|
@ -166,7 +164,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
/** |
|
|
|
|
* 分页冻结列 |
|
|
|
|
*/ |
|
|
|
|
private void addPageFrozenCol(JPanel pagecon){ |
|
|
|
|
private void addPageFrozenCol(JPanel pagecon) { |
|
|
|
|
// 显示列冻结信息的panel
|
|
|
|
|
freezePageColPane = new FreezePagePane(false); |
|
|
|
|
JPanel pageColGridPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); |
|
|
|
@ -178,7 +176,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
/** |
|
|
|
|
* 填报冻结Pane |
|
|
|
|
*/ |
|
|
|
|
private JPanel initWriteFrozenPane(){ |
|
|
|
|
private JPanel initWriteFrozenPane() { |
|
|
|
|
JPanel writePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
// 填报冻结
|
|
|
|
|
UILabel writeLabel = new UILabel(Inter.getLocText(new String[]{"Face_Write", "Frozen"}) + ":"); |
|
|
|
@ -248,14 +246,14 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
initWriteListener(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void initWriteListener(){ |
|
|
|
|
protected void initWriteListener() { |
|
|
|
|
// 填报重复冻结行
|
|
|
|
|
useWriteFrozenCCheckBox.addChangeListener(useWriteFrozenCListener); |
|
|
|
|
// 填报重复冻结列
|
|
|
|
|
useWriteFrozenRCheckBox.addChangeListener(useWriteFrozenRListener); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initPageRwoListener(){ |
|
|
|
|
private void initPageRwoListener() { |
|
|
|
|
repeatTitleRowPane.addListener(freezePageRowListener); |
|
|
|
|
// 分页重复冻结行
|
|
|
|
|
usePageFrozenRCheckBox.addChangeListener(usePageFrozenRListener); |
|
|
|
@ -265,7 +263,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
useRepeatFinisRCheckBox.addChangeListener(useRepeatFinisRListener); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void initPageColListener(){ |
|
|
|
|
protected void initPageColListener() { |
|
|
|
|
repeatTitleColPane.addListener(freezePageColListener); |
|
|
|
|
// 分页重复冻结列
|
|
|
|
|
usePageFrozenCCheckBox.addChangeListener(usePageFrozenCListener); |
|
|
|
@ -279,11 +277,11 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
freezePanel.add(initWriteFrozenPane(), BorderLayout.CENTER); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void addFootColStart(JPanel repeatPanel){ |
|
|
|
|
protected void addFootColStart(JPanel repeatPanel) { |
|
|
|
|
repeatPanel.add(initFootColStartPane()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void addColStart(JPanel repeatPanel){ |
|
|
|
|
protected void addColStart(JPanel repeatPanel) { |
|
|
|
|
repeatPanel.add(initColStartPane()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -390,9 +388,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
/** |
|
|
|
|
* 窗口标题 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* @date 2014-11-14-下午2:30:58 |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
protected String title4PopupWindow() { |
|
|
|
|
return Inter.getLocText("FR-Engine_Repeat-Freeze"); |
|
|
|
@ -408,7 +404,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
populateRowPane(attribute, defaultFT); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void populateRowPane(ReportPageAttrProvider attribute, FT defaultFT){ |
|
|
|
|
protected void populateRowPane(ReportPageAttrProvider attribute, FT defaultFT) { |
|
|
|
|
FT ft = new FT(new Integer(attribute.getRepeatHeaderRowFrom()), new Integer(attribute.getRepeatHeaderRowTo())); |
|
|
|
|
if (isDefalut(ft)) { |
|
|
|
|
this.repeatTitleRowPane.populateBean(defaultFT); |
|
|
|
@ -433,7 +429,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
this.freezePageRowPane.setEnabled(attribute.isUsePageFrozenRow()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void populatColPane(ReportPageAttrProvider attribute, FT defaultFT){ |
|
|
|
|
protected void populatColPane(ReportPageAttrProvider attribute, FT defaultFT) { |
|
|
|
|
FT ft = new FT(new Integer(attribute.getRepeatHeaderColumnFrom()), new Integer(attribute.getRepeatHeaderColumnTo())); |
|
|
|
|
if (isDefalut(ft)) { |
|
|
|
|
this.repeatTitleColPane.populateBean(defaultFT); |
|
|
|
@ -466,10 +462,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
* 初始化填报冻结pane |
|
|
|
|
* |
|
|
|
|
* @param writeFrozenColumnRow 填报冻结格子 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* @date 2014-11-14-下午2:30:15 |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public void populateWriteFrozenColumnRow(ColumnRow writeFrozenColumnRow) { |
|
|
|
|
if (writeFrozenColumnRow != null) { |
|
|
|
@ -503,7 +496,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
return attribute; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void updateRowPane(ReportPageAttrProvider attribute){ |
|
|
|
|
protected void updateRowPane(ReportPageAttrProvider attribute) { |
|
|
|
|
// 重复标题行
|
|
|
|
|
int titleFrom = valid(useRepeatTitleRCheckBox, this.repeatTitleRowPane.updateBean().getFrom()); |
|
|
|
|
int titleTo = valid(useRepeatTitleRCheckBox, this.repeatTitleRowPane.updateBean().getTo()); |
|
|
|
@ -518,11 +511,11 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
attribute.setUsePageFrozenRow(this.usePageFrozenRCheckBox.isSelected()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private int valid(UICheckBox checkBox, int num){ |
|
|
|
|
private int valid(UICheckBox checkBox, int num) { |
|
|
|
|
return checkBox.isSelected() ? num : -1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void updateColPane(ReportPageAttrProvider attribute){ |
|
|
|
|
protected void updateColPane(ReportPageAttrProvider attribute) { |
|
|
|
|
int titleFrom = valid(useRepeatTitleCCheckBox, this.repeatTitleColPane.updateBean().getFrom()); |
|
|
|
|
int titleTo = valid(useRepeatTitleCCheckBox, this.repeatTitleColPane.updateBean().getTo()); |
|
|
|
|
attribute.setRepeatHeaderColumnFrom(titleFrom); |
|
|
|
@ -540,10 +533,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
* 更新WriteFrozenColumnRow |
|
|
|
|
* |
|
|
|
|
* @return 行列 |
|
|
|
|
* |
|
|
|
|
* |
|
|
|
|
* @date 2014-11-14-下午2:29:45 |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public ColumnRow updateWriteFrozenColumnRow() { |
|
|
|
|
if (useWriteFrozenCCheckBox.isSelected() || useWriteFrozenRCheckBox.isSelected()) { |
|
|
|
@ -562,8 +552,8 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
|
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
try { |
|
|
|
|
//Desktop.getDesktop().browse(new URI(url));
|
|
|
|
|
final PluginManagerPane managerPane = new PluginManagerPane(); |
|
|
|
|
UIDialog dlg = new PluginShopDialog(DesignerContext.getDesignerFrame(),managerPane); |
|
|
|
|
BasicPane managerPane = new WebManagerPaneFactory().createPluginPane(); |
|
|
|
|
UIDialog dlg = new ShopDialog(DesignerContext.getDesignerFrame(), managerPane); |
|
|
|
|
PluginWebBridge.getHelper().setDialogHandle(dlg); |
|
|
|
|
dlg.setVisible(true); |
|
|
|
|
RepeatAndFreezeSettingPane.this.getTopLevelAncestor().setVisible(false); |
|
|
|
|