From a71518cb65f68440a50800ab75587f06971d5d6b Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 16 Jan 2019 09:22:04 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-14057=2010.0=E6=97=A5=E6=96=87=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86=3D>69=20?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=3D>label=E6=8E=A7=E4=BB=B6=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=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 --- .../com/fr/design/designer/IntervalConstants.java | 2 ++ .../fr/design/widget/WidgetBoundsPaneFactory.java | 8 ++++---- .../design/widget/ui/designer/LabelDefinePane.java | 12 +++++++----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/designer/IntervalConstants.java b/designer-base/src/main/java/com/fr/design/designer/IntervalConstants.java index a2a2ee669e..3983bbe046 100644 --- a/designer-base/src/main/java/com/fr/design/designer/IntervalConstants.java +++ b/designer-base/src/main/java/com/fr/design/designer/IntervalConstants.java @@ -29,4 +29,6 @@ public class IntervalConstants { public static final int INTERVAL_W4 = 22; + public static final int INTERVAL_W5 = 10; + } diff --git a/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java b/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java index 4bbbcecfbc..dfa74e3b93 100644 --- a/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java +++ b/designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java @@ -8,7 +8,6 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; - import javax.swing.BorderFactory; import javax.swing.JPanel; import javax.swing.SwingConstants; @@ -19,19 +18,20 @@ import java.awt.Component; * Created by plough on 2017/8/7. */ public class WidgetBoundsPaneFactory { + private static final int RIGHT_PANE_WIDTH = 145; public static UIExpandablePane createBoundsPane(UISpinner width, UISpinner height) { JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); double f = TableLayout.FILL; double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ - new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Size")), createRightPane(width, height)}, + new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Size")), createRightPane(width, height)}, new Component[]{null, createRightPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))}, }; double[] rowSize = {p, p}; - double[] columnSize = {p, f}; + double[] columnSize = {f, RIGHT_PANE_WIDTH}; int[][] rowCount = {{1, 1}, {1, 1}}; - final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L6); + final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W5, IntervalConstants.INTERVAL_L6); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); boundsPane.add(panel); return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java index b983118651..cf435c1d0d 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java @@ -11,6 +11,7 @@ import com.fr.design.gui.style.FRFontPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.widget.FRWidgetFactory; import com.fr.design.widget.ui.designer.component.FormWidgetValuePane; import com.fr.form.ui.Label; @@ -24,6 +25,7 @@ import java.awt.*; * Created by ibm on 2017/8/3. */ public class LabelDefinePane extends AbstractDataModify