From 2ff1636f0740b56d6f082b9ada5cd156d3c23bf5 Mon Sep 17 00:00:00 2001 From: Hades Date: Tue, 15 Jan 2019 18:27:19 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-14268=2010.0=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E6=97=A5=E6=96=87=E5=9B=BD=E9=99=85=E5=8C=96=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=8D=8F=E5=8A=A9=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/data/datapane/VerticalChoosePane.java | 4 +++- .../java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java index bd5f8ed51f..9129889ece 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java @@ -9,6 +9,7 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerBean; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.design.utils.gui.UIComponentUtils; import javax.swing.*; @@ -16,6 +17,7 @@ import java.awt.*; public class VerticalChoosePane extends ChoosePane implements DesignerBean { private static final int RIGHTBORDER = 5; + private static final int MAX_WIDTH = 60; public VerticalChoosePane(Previewable previewable) { this(previewable, -1); @@ -41,7 +43,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean { UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database"), UILabel.LEFT); UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model"), UILabel.LEFT); UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Select_Table"), UILabel.LEFT); - + UIComponentUtils.setLineWrap(l3, MAX_WIDTH); if (labelSize > 0) { Dimension pSize = new Dimension(labelSize, 20); l1.setPreferredSize(pSize); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index b46719efe4..806274af46 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -496,8 +496,8 @@ public abstract class ToolBarMenuDock { if (WorkContext.getCurrent().isLocal()) { shortCuts.add(new SoftwareUpdateAction()); } - - if (AlphaFineConfigManager.isALPHALicAvailable()) { + // 日文不显示AlphaFine + if (AlphaFineConfigManager.isALPHALicAvailable() && !GeneralContext.getLocale().equals(Locale.JAPAN)) { shortCuts.add(new AlphaFineAction()); } shortCuts.add(SeparatorDef.DEFAULT); From e0ee1ec08b1a34dd2e6e6a53a47ef060d45c0de3 Mon Sep 17 00:00:00 2001 From: Hades Date: Wed, 16 Jan 2019 09:31:14 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 806274af46..3885ff71d5 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -496,8 +496,7 @@ public abstract class ToolBarMenuDock { if (WorkContext.getCurrent().isLocal()) { shortCuts.add(new SoftwareUpdateAction()); } - // 日文不显示AlphaFine - if (AlphaFineConfigManager.isALPHALicAvailable() && !GeneralContext.getLocale().equals(Locale.JAPAN)) { + if (AlphaFineConfigManager.isALPHALicAvailable()) { shortCuts.add(new AlphaFineAction()); } shortCuts.add(SeparatorDef.DEFAULT); From 3c24bee271b01517343e8b676ee9bb3807a4f244 Mon Sep 17 00:00:00 2001 From: Hades Date: Wed, 16 Jan 2019 11:21:46 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=B7=A5=E5=85=B7=E7=B1=BB=E5=8C=85?= =?UTF-8?q?=E8=A3=85=E4=B8=8B=20=E9=81=BF=E5=85=8D=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/data/datapane/VerticalChoosePane.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java index 9129889ece..028f6b3b4e 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java @@ -10,6 +10,7 @@ import com.fr.design.mainframe.DesignerBean; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.UIComponentUtils; +import com.fr.design.widget.FRWidgetFactory; import javax.swing.*; @@ -42,8 +43,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean { rs.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, -RIGHTBORDER)); UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database"), UILabel.LEFT); UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model"), UILabel.LEFT); - UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Select_Table"), UILabel.LEFT); - UIComponentUtils.setLineWrap(l3, MAX_WIDTH); + UILabel l3 = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Select_Table"), MAX_WIDTH); if (labelSize > 0) { Dimension pSize = new Dimension(labelSize, 20); l1.setPreferredSize(pSize); @@ -54,7 +54,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean { Component[][] components = new Component[][]{ new Component[]{l1, dsNameComboBox}, new Component[]{l2, schemaBox}, - new Component[]{l3, rs} + new Component[]{l3, UIComponentUtils.wrapWithBorderLayoutPane(rs)} }; JPanel content = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_HUGER, LayoutConstants.VGAP_LARGE); From cadf2dbefea4f8006520c79350b77f14737112ab Mon Sep 17 00:00:00 2001 From: Hades Date: Wed, 16 Jan 2019 11:30:18 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=B7=A5=E5=85=B7=E7=B1=BB=E5=8C=85?= =?UTF-8?q?=E8=A3=85=E4=B8=8B=20=E9=81=BF=E5=85=8D=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/data/datapane/VerticalChoosePane.java | 2 +- .../java/com/fr/design/widget/FRWidgetFactory.java | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java index 028f6b3b4e..374efb1121 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/VerticalChoosePane.java @@ -43,7 +43,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean { rs.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, -RIGHTBORDER)); UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database"), UILabel.LEFT); UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model"), UILabel.LEFT); - UILabel l3 = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Select_Table"), MAX_WIDTH); + UILabel l3 = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Select_Table"), MAX_WIDTH, UILabel.LEFT); if (labelSize > 0) { Dimension pSize = new Dimension(labelSize, 20); l1.setPreferredSize(pSize); diff --git a/designer-base/src/main/java/com/fr/design/widget/FRWidgetFactory.java b/designer-base/src/main/java/com/fr/design/widget/FRWidgetFactory.java index 5770ed5e8a..6823b7b88f 100644 --- a/designer-base/src/main/java/com/fr/design/widget/FRWidgetFactory.java +++ b/designer-base/src/main/java/com/fr/design/widget/FRWidgetFactory.java @@ -35,4 +35,17 @@ public class FRWidgetFactory { UIComponentUtils.setLineWrap(label, lineWidth); return label; } + + /** + * 创建一个可换行可调整水平对齐的 UILabel + * @param text + * @param lineWidth + * @param horizontalAlignment + * @return com.fr.design.gui.ilable.UILabel + */ + public static UILabel createLineWrapLabel(String text, int lineWidth, int horizontalAlignment) { + UILabel label = new UILabel(text, horizontalAlignment); + UIComponentUtils.setLineWrap(label, lineWidth); + return label; + } } From 86bb638de4408f2b68113801bf58ffce24d5aea2 Mon Sep 17 00:00:00 2001 From: Hades Date: Wed, 16 Jan 2019 11:35:03 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/widget/FRWidgetFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/widget/FRWidgetFactory.java b/designer-base/src/main/java/com/fr/design/widget/FRWidgetFactory.java index 6823b7b88f..4db368bc3f 100644 --- a/designer-base/src/main/java/com/fr/design/widget/FRWidgetFactory.java +++ b/designer-base/src/main/java/com/fr/design/widget/FRWidgetFactory.java @@ -44,8 +44,8 @@ public class FRWidgetFactory { * @return com.fr.design.gui.ilable.UILabel */ public static UILabel createLineWrapLabel(String text, int lineWidth, int horizontalAlignment) { - UILabel label = new UILabel(text, horizontalAlignment); - UIComponentUtils.setLineWrap(label, lineWidth); + UILabel label = createLineWrapLabel(text, lineWidth); + label.setHorizontalAlignment(horizontalAlignment); return label; } }