Browse Source

REPORT-82895 单元格重复冻结优化 决策报表相关结尾冻结实现,界面优化

release/11.0
Destiny.Lin 2 years ago
parent
commit
8bac6c7db4
  1. 10
      designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java
  2. 18
      designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java
  3. 10
      designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java

10
designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java

@ -321,6 +321,16 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver
textField.setMaxValue(maxValue);
}
/**
* 设置最小值
*
* @param minValue 最小值
*/
public void setMinValue(double minValue) {
this.minValue = minValue;
textField.setMinValue(minValue);
}
private void componentInitListeners() {
preButton.addActionListener(new ActionListener() {
@Override

18
designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java

@ -32,14 +32,18 @@ public abstract class FreezeAndRepeatPane extends BasicBeanPane<FT> {
((UISpinner) start).addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
if (end instanceof UISpinner) {
((UISpinner) end).setValue(Math.max(((UISpinner) start).getValue(), ((UISpinner) end).getValue()));
}
updateEndValue();
}
});
}
if (end instanceof UISpinner) {
end.setPreferredSize(size);
((UISpinner) end).addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
updateEndValue();
}
});
}
this.setLayout(FRGUIPaneFactory.createBoxFlowLayout());
this.add(start);
@ -81,4 +85,12 @@ public abstract class FreezeAndRepeatPane extends BasicBeanPane<FT> {
}
}
private void updateEndValue() {
if (end instanceof UISpinner) {
((UISpinner) end).setMinValue(((UISpinner) start).getValue());
((UISpinner) end).setValue(((UISpinner) end).getValue());
}
}
}

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

@ -242,6 +242,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
JPanel pagePanel = new JPanel(FRGUIPaneFactory.createBorderLayout());
JPanel repeatHeadPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
JPanel repeatFootPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
tabbedPane = new UITabbedPane();
//添加上方的边界线
addBorder(repeatHeadPanel, REPEAT_AND_FROZEN_HEAD);
@ -268,14 +269,12 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
outfreezePanel.add(initPageFrozenPane(), BorderLayout.NORTH);
outfreezePanel.add(initPageFrozenFootPane(),BorderLayout.CENTER);
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Page_Preview"), pagePanel);
JPanel writePanel = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Frozen"));
addWriteFrozen(writePanel);
tabbedPane = new UITabbedPane();
//去除对应的焦点虚线边框
tabbedPane.setFocusable(false);
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Page_Preview"), pagePanel);
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Write_Preview"), writePanel);
this.add(tabbedPane);
initPageRwoListener();
initPageColListener();
@ -322,6 +321,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
protected void addWriteFrozen(JPanel freezePanel) {
freezePanel.add(initWriteFrozenPane(), BorderLayout.CENTER);
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Write_Preview"), freezePanel);
}
protected void addFootColStart(JPanel repeatPanel) {
@ -509,7 +509,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
}
this.usePageHeadFrozenRCheckBox.setSelected(attribute.isUsePageFrozenRow());
this.usePageFootFrozenRCheckBox.setSelected(attribute.isUsePageFrozenRow());
this.usePageFootFrozenRCheckBox.setSelected(attribute.isUsePageFootRowFrozen());
this.freezePageRowPane.setEnabled(attribute.isUsePageFrozenRow());
}
@ -536,7 +536,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane {
}
this.usePageHeadFrozenCCheckBox.setSelected(attribute.isUsePageFrozenColumn());
this.usePageFootFrozenCCheckBox.setSelected(attribute.isUsePageFrozenColumn());
this.usePageFootFrozenCCheckBox.setSelected(attribute.isUsePageFootColFrozen());
this.freezePageColPane.setEnabled(attribute.isUsePageFrozenColumn());
}

Loading…
Cancel
Save