From f4b521724171381b4dc4a82b92bfa47148abc834 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Wed, 15 Sep 2021 10:52:11 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-59166=20=E9=9F=A9=E6=96=87=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E8=AE=BE=E7=BD=AE=E6=9D=A1=E4=BB=B6=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=20=E6=9D=A1=E4=BB=B6=E5=B1=9E=E6=80=A7=E6=A1=86?= =?UTF-8?q?=E4=BD=93=E6=A0=87=E9=A2=98=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/gui/controlpane/UIControlPane.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java index 648cb03f33..f7229136f5 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java @@ -387,8 +387,6 @@ public abstract class UIControlPane extends JControlPane { contentPane.setBackground(originColor); contentPane.setLayout(new BorderLayout()); titleLabel = new UILabel(title); - Font font = new Font("SimSun", Font.PLAIN, 12); - titleLabel.setFont(font); contentPane.add(titleLabel, BorderLayout.WEST); contentPane.setBorder(new EmptyBorder(5, 14, 6, 0)); From 8eab8d3d1c93373362433781aac575717fe6c5f5 Mon Sep 17 00:00:00 2001 From: hades Date: Mon, 11 Oct 2021 10:27:03 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-60516=2010.0release=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E6=89=93=E5=BC=80cpt=E5=BE=88=E6=85=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/worker/open/OpenWorker.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java b/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java index 1c03c67594..3535078ab9 100644 --- a/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java +++ b/designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java @@ -53,7 +53,6 @@ public class OpenWorker extends SwingWorker { @Override protected T doInBackground() throws Exception { - TimeUnit.SECONDS.sleep(5); return this.callable.call(); } From f62372fd9be56a77c0db6288847e85dd1c4e795f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Mon, 11 Oct 2021 15:51:17 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-60528=20=E5=86=B3=E7=AD=96=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C=E7=BB=99=E4=B8=80=E4=B8=AA=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E8=BE=83=E5=B0=8F=E7=9A=84tab=E5=86=85=E6=8B=96=E5=85=A5?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=EF=BC=8C=E4=BC=9A=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=8F=90=E7=A4=BA=E2=80=9C=E8=B6=85=E5=87=BA?= =?UTF-8?q?=E6=88=96=E8=80=85=E5=B0=8F=E4=BA=8Etablayout=E8=BE=B9=E7=95=8C?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E8=83=BD=E8=B0=83=E6=95=B4=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E2=80=9D=EF=BC=9B=E5=AE=A2=E6=88=B7=E6=A8=A1=E6=9D=BF=E7=9A=84?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E4=B8=8D=E6=96=AD=E8=A7=A6=E5=8F=91=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=97=A0=E6=B3=95=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/FRCardMainBorderLayoutAdapter.java | 49 ++++++++++++++----- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java index 9718d4a6fd..726c397060 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java @@ -4,11 +4,12 @@ import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.cardlayout.XWCardTagLayout; import com.fr.design.dialog.FineJOptionPane; +import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.form.layout.FRBorderLayout; +import com.fr.design.mainframe.JTemplate; +import com.fr.design.ui.util.UIUtil; import com.fr.general.ComparatorUtils; - -import javax.swing.JOptionPane; import java.awt.BorderLayout; import java.awt.Rectangle; @@ -46,18 +47,42 @@ public class FRCardMainBorderLayoutAdapter extends FRBorderLayoutAdapter { Rectangle rectangle = creator.getBounds(); //不能超出控件边界 if (ComparatorUtils.equals(constraints, BorderLayout.NORTH) || ComparatorUtils.equals(constraints, BorderLayout.SOUTH)) { - int containerHeight = container.getHeight(); - if (rectangle.height > containerHeight) { - FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds")); - return true; - } + return isBeyondMinConstraint(rectangle.height, container.getHeight()); } else if (ComparatorUtils.equals(constraints, BorderLayout.EAST) || ComparatorUtils.equals(constraints, BorderLayout.WEST)) { - int containerWidth = container.getWidth(); - if (rectangle.width > containerWidth) { - FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds")); - return true; - } + return isBeyondMinConstraint(rectangle.width, container.getWidth()); } return false; } + + /** + * 是否超出最小限制 + * + * @param minConstraint 最小限制 + * @param value 数值 + * @return 是否超出最小限制 + */ + private boolean isBeyondMinConstraint(int minConstraint, int value) { + if (minConstraint > value) { + FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds")); + if (container.getBackupBound() != null) { + // 手动拖动导致变矮的场景 + container.setSize(container.getBackupBound().getSize()); + } else { + // 自适应布局平分高度导致变矮的场景 + UIUtil.invokeLaterIfNeeded(new Runnable() { + @Override + public void run() { + JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (jt != null) { + jt.undo(); + } + } + }); + + } + return true; + } else { + return false; + } + } } From 2c22b71735b9ec63d40c0a451dce9c486b6322ca Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Mon, 11 Oct 2021 16:53:47 +0800 Subject: [PATCH 4/4] =?UTF-8?q?REPORT-60561=20=E5=85=A8=E5=B1=80=E8=87=AA?= =?UTF-8?q?=E9=80=82=E5=BA=94-=E6=A0=B7=E5=BC=8F=E7=BB=86=E8=8A=82?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/report/fit/BaseFitAttrPane.java | 5 ++-- .../fit/menupane/ReportFitAttrAction.java | 23 +------------------ 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java b/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java index 718ce09bf6..31ea6417b4 100644 --- a/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java +++ b/designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java @@ -41,6 +41,7 @@ public abstract class BaseFitAttrPane extends BasicBeanPane { public JPanel attrJPanel; public FitPreviewPane previewJPanel; public FitAttrModel fitAttrModel; + private static final int BELOW_SET_COMPONENT_HSPACE = 8; protected BaseFitAttrPane() { @@ -179,7 +180,7 @@ public abstract class BaseFitAttrPane extends BasicBeanPane { @Override protected String title4PopupWindow() { - return i18nText("Fine-Designer_PC_Element_Case_Fit_Attr"); + return i18nText("Fine-Designer_PC_Fit_Attr"); } protected abstract String[] getItemNames(); @@ -202,7 +203,7 @@ public abstract class BaseFitAttrPane extends BasicBeanPane { itemChoose.addItemListener(itemListener); UILabel belowSetLabel = new UILabel(i18nText("Fine-Design_Report_Blow_Set")); JPanel buttonPane = GUICoreUtils.createFlowPane(new Component[]{ - belowSetLabel, itemChoose}, FlowLayout.LEFT, 0, 0); + belowSetLabel, itemChoose}, FlowLayout.LEFT, BELOW_SET_COMPONENT_HSPACE); chooseJPanel.add(buttonPane); chooseJPanel.setPreferredSize(new Dimension(500, 50)); JPanel jPanel = new JPanel(); diff --git a/designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java b/designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java index c0e257739a..36328d9bdd 100644 --- a/designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java +++ b/designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java @@ -34,22 +34,6 @@ public class ReportFitAttrAction extends JTemplateAction { return null; } }; - private static final MenuKeySet REPORT_FIT_ATTR_ELEMENTCASE = new MenuKeySet() { - @Override - public char getMnemonic() { - return 'T'; - } - - @Override - public String getMenuName() { - return Toolkit.i18nText("Fine-Designer_PC_Element_Case_Fit_Attr"); - } - - @Override - public KeyStroke getKeyStroke() { - return null; - } - }; public ReportFitAttrAction(JTemplate jTemplate) { super(jTemplate); @@ -57,12 +41,7 @@ public class ReportFitAttrAction extends JTemplateAction { } private void initMenuStyle() { - JTemplate jTemplate = getEditingComponent(); - if (jTemplate.isJWorkBook()) { - this.setMenuKeySet(REPORT_FIT_ATTR); - } else { - this.setMenuKeySet(REPORT_FIT_ATTR_ELEMENTCASE); - } + this.setMenuKeySet(REPORT_FIT_ATTR); this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setMnemonic(getMenuKeySet().getMnemonic()); this.setSmallIcon("/com/fr/design/images/reportfit/fit");