From 8bac6c7db46074f099562157a3f56413dd0dfaf4 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Tue, 13 Dec 2022 21:11:11 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-82895=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E5=86=BB=E7=BB=93=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?=E5=86=B3=E7=AD=96=E6=8A=A5=E8=A1=A8=E7=9B=B8=E5=85=B3=E7=BB=93?= =?UTF-8?q?=E5=B0=BE=E5=86=BB=E7=BB=93=E5=AE=9E=E7=8E=B0=EF=BC=8C=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/ispinner/UISpinner.java | 10 ++++++++++ .../report/freeze/FreezeAndRepeatPane.java | 18 +++++++++++++++--- .../freeze/RepeatAndFreezeSettingPane.java | 10 +++++----- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java b/designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java index 18207011fe..a19db05060 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java +++ b/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 diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java index c0af78bf06..cf32a24b65 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java @@ -32,14 +32,18 @@ public abstract class FreezeAndRepeatPane extends BasicBeanPane { ((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 { } } + + private void updateEndValue() { + if (end instanceof UISpinner) { + ((UISpinner) end).setMinValue(((UISpinner) start).getValue()); + ((UISpinner) end).setValue(((UISpinner) end).getValue()); + + } + } } \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java index 11a3aba60c..be7606a22d 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java +++ b/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()); }