From 46fea4a4b3cc9f8b00977d7534aff44945482bd8 Mon Sep 17 00:00:00 2001 From: zhouping Date: Sat, 4 Feb 2017 17:28:07 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-1814=20=E8=A1=A8=E5=8D=95tab=E5=9D=97?= =?UTF-8?q?=E7=9A=84=E6=94=B9=E8=89=AFbug=201.=E6=94=BE=E5=BC=80=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=B1=8F=E8=94=BD=202.=E4=BF=AE=E6=94=B9=E5=90=8E?= =?UTF-8?q?=E5=8F=B0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/creator/cardlayout/XWCardLayout.java | 2 +- .../designer/creator/cardlayout/XWTabFitLayout.java | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java index 876eaa34ee..3f16860140 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java @@ -277,7 +277,7 @@ public class XWCardLayout extends XLayoutContainer { * @throws IntrospectionException */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - CRPropertyDescriptor[] crp = null; + CRPropertyDescriptor[] crp = ((WCardLayout) data).isCarousel() ? getisCarousel() : getisnotCarousel(); return ArrayUtils.addAll(getDefaultDescriptor(), crp); } diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index db60701785..f4cac3e15c 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -30,6 +30,7 @@ import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.general.Background; import com.fr.general.FRFont; +import com.fr.general.FRLogger; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; import com.fr.stable.core.PropertyChangeAdapter; @@ -118,7 +119,8 @@ public class XWTabFitLayout extends XWFitLayout { * @throws IntrospectionException */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - CRPropertyDescriptor[] crp = null; + checkButonType(); + CRPropertyDescriptor[] crp = ((WTabFitLayout) data).isCustomStyle() ? getisCustomStyle() : getisnotCustomStyle(); return ArrayUtils.addAll(defaultDescriptor(), crp); } @@ -226,6 +228,12 @@ public class XWTabFitLayout extends XWFitLayout { private void checkButonType() { if (this.xCardSwitchButton == null) { + //假如为空,默认获取第一个tab的cardBtn属性 + try { + xCardSwitchButton = (XCardSwitchButton) ((XWCardMainBorderLayout) this.getTopLayout()).getTitlePart().getTagPart().getComponent(0); + }catch (Exception e){ + FRLogger.getLogger().error(e.getMessage()); + } return; } boolean isStyle = ((WTabFitLayout) data).isCustomStyle();