From 67e2846e79bd3fe29934703bc04881e812392cfa Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Mon, 9 Sep 2019 14:32:08 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-21689=20REPORT-20981=20=E6=B0=B4?= =?UTF-8?q?=E5=8D=B0=E5=AF=86=E5=BA=A6=E5=A2=9E=E5=8A=A0=E4=B8=AA=E6=9C=80?= =?UTF-8?q?=E5=B0=8F=E5=80=BC=E9=99=90=E5=88=B6=EF=BC=8C=E5=AF=86=E5=BA=A6?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=8D=E8=83=BD=E5=B0=8F=E4=BA=8E100/50;?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E7=89=88=E6=9C=AC=E7=AE=A1=E7=90=86=E5=87=8F?= =?UTF-8?q?=E5=B0=91=E7=A3=81=E7=9B=98=E5=8D=A0=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/vcs/common/VcsHelper.java | 2 +- .../src/main/java/com/fr/design/report/WatermarkPane.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java index 7dea041554..97b572a11c 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java @@ -147,7 +147,7 @@ public class VcsHelper implements JTemplateActionListener { if (needDeleteVersion(oldEntity)) { operator.deleteVersion(oldEntity.getFilename(), oldEntity.getVersion()); } - operator.gc(true); + operator.gc(); } }).start(); diff --git a/designer-base/src/main/java/com/fr/design/report/WatermarkPane.java b/designer-base/src/main/java/com/fr/design/report/WatermarkPane.java index 40fe942d23..a7f78e1170 100644 --- a/designer-base/src/main/java/com/fr/design/report/WatermarkPane.java +++ b/designer-base/src/main/java/com/fr/design/report/WatermarkPane.java @@ -113,8 +113,8 @@ public class WatermarkPane extends BasicPane { formulaPane = new TinyFormulaPane(); fontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES); fontSizeComboBox.setEditable(true); - horizontalGapSpinner = new UnsignedIntUISpinner(0, Integer.MAX_VALUE, 1, 200); - verticalGapSpinner = new UnsignedIntUISpinner(0, Integer.MAX_VALUE, 1, 100); + horizontalGapSpinner = new UnsignedIntUISpinner(100, Integer.MAX_VALUE, 1, 200); + verticalGapSpinner = new UnsignedIntUISpinner(50, Integer.MAX_VALUE, 1, 100); horizontalGapSpinner.setPreferredSize(SPINNER_DIMENSION); verticalGapSpinner.setPreferredSize(SPINNER_DIMENSION); JPanel fontSizeTypePane = new JPanel(new BorderLayout(10,0)); From 2312a7d05f66964d2afb5d4eda5288a504312b5f Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Mon, 9 Sep 2019 14:45:04 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-20981=20=E6=A8=A1=E6=9D=BF=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=AE=A1=E7=90=86=E5=87=8F=E5=B0=91=E7=A3=81=E7=9B=98?= =?UTF-8?q?=E5=8D=A0=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/vcs/common/VcsHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java index 97b572a11c..4f447eaef0 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java @@ -147,7 +147,9 @@ public class VcsHelper implements JTemplateActionListener { if (needDeleteVersion(oldEntity)) { operator.deleteVersion(oldEntity.getFilename(), oldEntity.getVersion()); } - operator.gc(); + if (GcConfig.getInstance().isGcEnable()) { + operator.gc(); + } } }).start(); From abafae544c43762cf6d02cf5034f1ca2b71e570b Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Mon, 9 Sep 2019 14:51:12 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-20981=20=E6=A8=A1=E6=9D=BF=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=AE=A1=E7=90=86=E5=87=8F=E5=B0=91=E7=A3=81=E7=9B=98?= =?UTF-8?q?=E5=8D=A0=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/actions/file/PreferencePane.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 81b66451a8..5fa6c18621 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -325,6 +325,12 @@ public class PreferencePane extends BasicPane { tryGc(); } }); + gcEnableCheckBox.addChangeListener(new ChangeListener() { + @Override + public void stateChanged(ChangeEvent e) { + gcButton.setEnabled(gcEnableCheckBox.isSelected() ? true : false); + } + }); //集群下禁用 if (FineClusterConfig.getInstance().isCluster()) { From a8c1d63c359b0aa575ea4f6802e22783f5fae9cc Mon Sep 17 00:00:00 2001 From: "Hugh.C" Date: Mon, 9 Sep 2019 16:15:55 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-20981=20=E5=8F=96=E6=B6=88=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E4=B8=8D=E8=A6=81=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/file/PreferencePane.java | 26 +++---------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index 5fa6c18621..a994711ebc 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -184,9 +184,6 @@ public class PreferencePane extends BasicPane { private JProgressBar gcProgressBar; private Timer gcProgressTimer; private UIButton gcOkButton = new UIButton(Toolkit.i18nText("Fine-Design_Report_OK")); - private UIButton gcCancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel")); - - public PreferencePane() { this.initComponents(); @@ -328,7 +325,7 @@ public class PreferencePane extends BasicPane { gcEnableCheckBox.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { - gcButton.setEnabled(gcEnableCheckBox.isSelected() ? true : false); + gcButton.setEnabled(gcEnableCheckBox.isSelected()); } }); @@ -706,7 +703,7 @@ public class PreferencePane extends BasicPane { saveCommitCheckBox.setSelected(vcsConfigManager.isSaveCommit()); useIntervalCheckBox.setSelected(vcsConfigManager.isUseInterval()); gcEnableCheckBox.setSelected(GcConfig.getInstance().isGcEnable()); - + gcButton.setEnabled(gcEnableCheckBox.isSelected()); supportCellEditorDefCheckBox.setSelected(designerEnvManager.isSupportCellEditorDef()); isDragPermitedCheckBox.setSelected(designerEnvManager.isDragPermited()); @@ -887,14 +884,12 @@ public class PreferencePane extends BasicPane { } private void tryGc() { - //停止gc线程时使用 - final String uuid = String.valueOf(UUID.randomUUID()); final SwingWorker worker = new SwingWorker() { private long size = 0; @Override protected Boolean doInBackground() { - size = WorkContext.getCurrent().get(VcsOperator.class).immediatelyGc(uuid); + size = WorkContext.getCurrent().get(VcsOperator.class).immediatelyGc(); return true; } @@ -913,7 +908,6 @@ public class PreferencePane extends BasicPane { if (null != gcDialog) { gcDialog.setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Joption_News")); } - gcDialogDownPane.remove(gcCancelButton); gcDialogDownPane.revalidate(); gcDialogDownPane.repaint(); gcDialogDownPane.add(gcOkButton); @@ -927,19 +921,6 @@ public class PreferencePane extends BasicPane { gcDialog.dispose(); } }); - gcCancelButton.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - stopGcProgressTimer(); - - //中断gc 线程 - if (StringUtils.isNotEmpty(uuid)) { - WorkContext.getCurrent().get(VcsOperator.class).cancelImmediatelyGc(uuid); - } - gcDialog.dispose(); - worker.cancel(true); - } - }); gcDialog.addWindowListener(new WindowAdapter() { @Override public void windowClosed(WindowEvent e) { @@ -969,7 +950,6 @@ public class PreferencePane extends BasicPane { //中下 gcDialogDownPane = new JPanel(); gcDialogDownPane.setLayout(new FlowLayout(FlowLayout.CENTER, 6, 0)); - gcDialogDownPane.add(gcCancelButton); jp.setLayout(new BoxLayout(jp, BoxLayout.Y_AXIS)); jp.add(gcUpPane);