Browse Source

Pull request #11067: REPORT-82895 单元格重复冻结优化 抽取判断逻辑

Merge in DESIGN/design from ~DESTINY.LIN/design:release/11.0 to release/11.0

* commit '187e9170416f32ac094f0f58a74675e0501fe3e8':
  REPORT-82895 单元格重复冻结优化 抽取判断逻辑
newui
Destiny.Lin-林锦龙 2 years ago
parent
commit
40534abe58
  1. 48
      designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java

48
designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java

@ -583,9 +583,53 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
updateRowPane(attribute);
updateColPane(attribute);
//单独将重复、分页、填报处理一下,原先的判断逻辑比较混乱,抽出来方便判断
updateUseAttr(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();
}
/**
* 给内部的重复与冻结选项添加指定的边框
*
@ -609,7 +653,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
attribute.setRepeatFooterRowFrom(finishFrom);
attribute.setRepeatFooterRowTo(finishTo);
attribute.setUsePageFrozenRow(this.usePageHeadFrozenRCheckBox.isSelected() || this.usePageFootFrozenRCheckBox.isSelected());
attribute.setUsePageFrozenRow(this.usePageHeadFrozenRCheckBox.isSelected());
attribute.setUsePageFootFrozen(this.usePageFootFrozenRCheckBox.isSelected() || this.usePageFootFrozenCCheckBox.isSelected());
attribute.setUsePageFootRowFrozen(this.usePageFootFrozenRCheckBox.isSelected());
@ -630,7 +674,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
attribute.setRepeatFooterColumnFrom(finishFrom);
attribute.setRepeatFooterColumnTo(finishTo);
attribute.setUsePageFrozenColumn(this.usePageHeadFrozenCCheckBox.isSelected() || this.usePageFootFrozenCCheckBox.isSelected());
attribute.setUsePageFrozenColumn(this.usePageHeadFrozenCCheckBox.isSelected());
attribute.setUsePageFootFrozen(this.usePageFootFrozenRCheckBox.isSelected() || this.usePageFootFrozenCCheckBox.isSelected());
attribute.setUsePageFootColFrozen(this.usePageFootFrozenCCheckBox.isSelected());

Loading…
Cancel
Save