From 7bd6cf3db7eb1f62d8a57b42879cf64b3db44b5a Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 16 Jan 2018 09:17:26 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-6512=20=E6=96=B0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E9=81=97=E7=95=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/style/FRFontPane.java | 4 ++-- .../cardlayout/XWCardMainBorderLayout.java | 6 ++++-- .../layout/WCardTagLayoutDefinePane.java | 17 ++++++++++++++++- 3 files changed, 22 insertions(+), 5 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 d7d445ddc8..76c9ab36df 100644 --- a/designer_base/src/com/fr/design/gui/style/FRFontPane.java +++ b/designer_base/src/com/fr/design/gui/style/FRFontPane.java @@ -49,7 +49,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse private JPanel isSuperOrSubPane; private UIComboBox fontNameComboBox; private UIComboBox fontSizeStyleComboBox; - private UIComboBox fontSizeComboBox; + protected UIComboBox fontSizeComboBox; private UIToggleButton bold; private UIToggleButton italic; private UIToggleButton underline; @@ -327,7 +327,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); } - private JPanel createRightPane() { + protected JPanel createRightPane() { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize = {f}; diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java index fb9510d1a6..dd9a85c78f 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java @@ -138,7 +138,7 @@ public class XWCardMainBorderLayout extends XWBorderLayout{ } private void dealCompatibility(WBorderLayout wb){ - WCardMainBorderLayout ob = (WCardMainBorderLayout)wb; + WCardMainBorderLayout ob = (WCardMainBorderLayout)wb; WCardLayout cardLayout = ob.getCardPart(); //tab结构改变需要兼容以前的tab,重新命名tabpane WCardTitleLayout wCardTitleLayout = ob.getTitlePart(); @@ -158,7 +158,9 @@ public class XWCardMainBorderLayout extends XWBorderLayout{ wCardTitleLayout.setCardName(cardLayout.getWidgetName()); wCardTagLayout.setNewTab(true); //这边需要设置成默认值兼容之前的title高度(不知道为啥之前的title的高度会改变) - ob.setNorthSize(WTitleLayout.TITLE_HEIGHT); + if(this.toData().getNorthSize() != 0){ + ob.setNorthSize(WTitleLayout.TITLE_HEIGHT); + } for(int i = 0 ;i < cardLayout.getListenerSize(); i ++){ Listener listener = cardLayout.getListener(i); if(listener != null){ diff --git a/designer_form/src/com/fr/design/widget/ui/designer/layout/WCardTagLayoutDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/layout/WCardTagLayoutDefinePane.java index 153d159c05..7fc6ea8a52 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/layout/WCardTagLayoutDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/layout/WCardTagLayoutDefinePane.java @@ -1,5 +1,6 @@ package com.fr.design.widget.ui.designer.layout; +import com.fr.design.constants.LayoutConstants; import com.fr.general.ComparatorUtils; import com.fr.general.cardtag.TemplateStyle; import com.fr.design.designer.IntervalConstants; @@ -58,7 +59,21 @@ public class WCardTagLayoutDefinePane extends AbstractDataModify UILabel fontLabel = new UILabel(Inter.getLocText("FR-Designer_Font")); fontLabel.setVerticalAlignment(SwingConstants.TOP); - frFontPane = new FRFontPane(); + frFontPane = new FRFontPane(){ + + protected JPanel createRightPane() { + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {f}; + double[] rowSize = {p}; + int[][] rowCount = {{1, 1}}; + Component[][] components = new Component[][]{ + new Component[]{fontSizeComboBox}, + }; + return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_MEDIUM); + } + + }; displayPositionGroup = new UIButtonGroup(WTabDisplayPosition.getStringArray()){ @Override public boolean shouldResponseNameListener() {