From c6e31aa55093c1fd557fdf21ad12faaabd1f544d Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 13 Nov 2017 14:42:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A8=A1=E6=9D=BF=E6=89=93=E5=BC=80=E9=80=9F?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/mobile/AppFitPreviewPane.java | 21 ++++++++++--------- .../com/fr/design/constants/UIConstants.java | 13 +++++++++++- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/designer/src/com/fr/design/report/mobile/AppFitPreviewPane.java b/designer/src/com/fr/design/report/mobile/AppFitPreviewPane.java index bbb44f612..8ee6ebe93 100644 --- a/designer/src/com/fr/design/report/mobile/AppFitPreviewPane.java +++ b/designer/src/com/fr/design/report/mobile/AppFitPreviewPane.java @@ -1,5 +1,6 @@ package com.fr.design.report.mobile; +import com.fr.design.constants.UIConstants; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; @@ -31,16 +32,16 @@ public class AppFitPreviewPane extends BasicPane{ } private void initCacheImage() { - cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V0.png"))); - cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V1.png"))); - cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V2.png"))); - cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V3.png"))); - cachedVerticalPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/V4.png"))); - cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H0.png"))); - cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H1.png"))); - cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H2.png"))); - cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H3.png"))); - cachedHorizonPreviewImage.add(new ImageIcon(IOUtils.readImage("/com/fr/design/images/dialog/appfit/H4.png"))); + cachedVerticalPreviewImage.add(new ImageIcon(UIConstants.APPFIT_V0)); + cachedVerticalPreviewImage.add(new ImageIcon(UIConstants.APPFIT_V1)); + cachedVerticalPreviewImage.add(new ImageIcon(UIConstants.APPFIT_V2)); + cachedVerticalPreviewImage.add(new ImageIcon(UIConstants.APPFIT_V3)); + cachedVerticalPreviewImage.add(new ImageIcon(UIConstants.APPFIT_V4)); + cachedHorizonPreviewImage.add(new ImageIcon(UIConstants.APPFIT_H0)); + cachedHorizonPreviewImage.add(new ImageIcon(UIConstants.APPFIT_H1)); + cachedHorizonPreviewImage.add(new ImageIcon(UIConstants.APPFIT_H2)); + cachedHorizonPreviewImage.add(new ImageIcon(UIConstants.APPFIT_H3)); + cachedHorizonPreviewImage.add(new ImageIcon(UIConstants.APPFIT_H4)); } private void initComponents() { diff --git a/designer_base/src/com/fr/design/constants/UIConstants.java b/designer_base/src/com/fr/design/constants/UIConstants.java index 3df47f30a..c9ad2c6eb 100644 --- a/designer_base/src/com/fr/design/constants/UIConstants.java +++ b/designer_base/src/com/fr/design/constants/UIConstants.java @@ -18,8 +18,19 @@ import java.awt.image.BufferedImage; public interface UIConstants { public static final Icon CPT_ICON = BaseUtils.readIcon("/com/fr/base/images/oem/cpt.png"); - public static final Icon BLACK_ICON = BaseUtils.readIcon("/com/fr/base/images/cell/blank.gif"); + + public static final Image APPFIT_V0 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/V0.png"); + public static final Image APPFIT_V1 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/V1.png"); + public static final Image APPFIT_V2 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/V2.png"); + public static final Image APPFIT_V3 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/V3.png"); + public static final Image APPFIT_V4 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/V4.png"); + public static final Image APPFIT_H0 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/H0.png"); + public static final Image APPFIT_H1 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/H1.png"); + public static final Image APPFIT_H2 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/H2.png"); + public static final Image APPFIT_H3 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/H3.png"); + public static final Image APPFIT_H4 = BaseUtils.readImage("/com/fr/design/images/dialog/appfit/H4.png"); + public static final Border CELL_ATTR_ZEROBORDER = BorderFactory.createEmptyBorder(0, 0, 0, 0); public static final Border CELL_ATTR_EMPTYBORDER = BorderFactory.createEmptyBorder(0, 10, 0, 0); public static final Border CELL_ATTR_PRESENTBORDER = BorderFactory.createEmptyBorder(0, 5, 0, 0); From 89128da6c2031e23be7f33a74c9de8c50a8e3742 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 13 Nov 2017 15:39:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-5491=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/gui/style/FRFontPane.java | 11 +++++ .../widget/WidgetBoundsPaneFactory.java | 19 +++++--- .../widget/ui/designer/LabelDefinePane.java | 2 +- .../designer/component/PaddingBoundPane.java | 44 +++++++++++-------- 4 files changed, 49 insertions(+), 27 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/style/FRFontPane.java b/designer_base/src/com/fr/design/gui/style/FRFontPane.java index 6aa5338ae..d7d445ddc 100644 --- a/designer_base/src/com/fr/design/gui/style/FRFontPane.java +++ b/designer_base/src/com/fr/design/gui/style/FRFontPane.java @@ -16,6 +16,7 @@ import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.utils.gui.GUICoreUtils; @@ -41,6 +42,8 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse public static Integer[] FONT_SIZES = {new Integer(6), new Integer(8), new Integer(9), new Integer(10), new Integer(11), new Integer(12), new Integer(14), new Integer(16), new Integer(18), new Integer(20), new Integer(22), new Integer(24), new Integer(26), new Integer(28), new Integer(36), new Integer(48), new Integer(72)}; private static final Dimension BUTTON_SIZE = new Dimension(20, 18); + private static final Dimension UNDER_LINE_SIZE = new Dimension(87, 20); + private static final Dimension HIDE_SIZE = new Dimension(0, 0); private final String[] fontSizeStyles = {Inter.getLocText("FR-Designer_FRFont_plain"), Inter.getLocText("FR-Designer_FRFont_bold"), Inter.getLocText("FR-Designer_FRFont_italic"), Inter.getLocText("FR-Designer_FRFont_bolditalic")}; private JPanel buttonPane; private JPanel isSuperOrSubPane; @@ -104,9 +107,11 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse if (line == Constants.LINE_NONE) { underline.setSelected(false); cly.show(linePane, "none"); + linePane.setPreferredSize(HIDE_SIZE); } else { underline.setSelected(true); cly.show(linePane, "combobox"); + linePane.setPreferredSize(UNDER_LINE_SIZE); this.underlineCombo.setSelectedLineStyle(line); } // effects @@ -297,8 +302,14 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse public void stateChanged(ChangeEvent e) { CardLayout cly = (CardLayout) linePane.getLayout(); cly.show(linePane, underline.isSelected() ? "combobox" : "none"); + if(underline.isSelected()){ + linePane.setPreferredSize(UNDER_LINE_SIZE); + }else{ + linePane.setPreferredSize(HIDE_SIZE); + } } }); + return linePane; } diff --git a/designer_base/src/com/fr/design/widget/WidgetBoundsPaneFactory.java b/designer_base/src/com/fr/design/widget/WidgetBoundsPaneFactory.java index bd3612d11..8092fc5e8 100644 --- a/designer_base/src/com/fr/design/widget/WidgetBoundsPaneFactory.java +++ b/designer_base/src/com/fr/design/widget/WidgetBoundsPaneFactory.java @@ -28,7 +28,7 @@ public class WidgetBoundsPaneFactory { double[] rowSize = {p, p}; double[] columnSize = {p, f}; int[][] rowCount = {{1, 1}, {1, 1}}; - final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); + final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L6); panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); boundsPane.add(panel); return new UIExpandablePane(Inter.getLocText("FR-Designer_Coords_And_Size"), 280, 24, boundsPane); @@ -49,19 +49,24 @@ public class WidgetBoundsPaneFactory { double f = TableLayout.FILL; double p = TableLayout.PREFERRED; - Component[][] components = new Component[][]{ + Component[][] northComponents = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("FR-Designer_Widget_Position")), createRightPane(x, y)}, new Component[]{null, createRightPane(new UILabel(Inter.getLocText("FR-Designer_X_Coordinate"), SwingConstants.CENTER), new UILabel(Inter.getLocText("FR-Designer_Y_Coordinate"), SwingConstants.CENTER))}, + }; + Component[][] centerComponents = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("FR-Designer-Widget_Size")), createRightPane(width, height)}, new Component[]{null, createRightPane(new UILabel(Inter.getLocText("FR-Designer-Tree_Width"), SwingConstants.CENTER), new UILabel(Inter.getLocText("FR-Designer-Tree_Height"), SwingConstants.CENTER))}, }; - double[] rowSize = {p, p, p, p}; + double[] rowSize = {p, p}; double[] columnSize = {p, f}; - int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; - final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1); + int[][] rowCount = {{1, 1}, {1, 1}}; + final JPanel northPanel = TableLayoutHelper.createGapTableLayoutPane(northComponents, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L6); + final JPanel centerPanel = TableLayoutHelper.createGapTableLayoutPane(centerComponents, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L6); JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); - boundsPane.add(panel); + northPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + centerPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); + boundsPane.add(northPanel, BorderLayout.NORTH); + boundsPane.add(centerPanel, BorderLayout.CENTER); return new UIExpandablePane(Inter.getLocText("FR-Designer_Coords_And_Size"), 230, 24, boundsPane); } } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java index 549f4266f..02c47c41e 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/LabelDefinePane.java @@ -75,7 +75,7 @@ public class LabelDefinePane extends AbstractDataModify