From da9398eead40e011cfabfd388fe1d157e92c626e Mon Sep 17 00:00:00 2001 From: Starryi Date: Wed, 5 Jan 2022 17:04:09 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-65449=20=E5=9C=A8=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=8C=85=E8=AF=A6=E6=83=85=E9=A1=B5=E6=8B=96=E6=8B=BD=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=B9=B6=E4=BF=AE=E6=94=B9=E5=90=8E=EF=BC=8C=E5=86=8D?= =?UTF-8?q?=E7=82=B9=E5=88=B0=E5=9C=A8=E7=BA=BF=E7=BB=84=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=92=8C=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 在线组件库页面刷新为所有在线组件列表时,Tab标题没有作出对应改变,出现了Tab投显示组件包,而列表页 显示所有在线组件的情况 【改动思路】 刷新时修改标题头"组件" --- .../mainframe/share/ui/online/OnlineWidgetTabPane.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java index b48b74e67..52ea26bc2 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java @@ -24,6 +24,7 @@ public class OnlineWidgetTabPane extends JPanel { private static final String COMPONENT = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Share"); private static final String COMPONENT_PACKAGE = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Share_Package"); private static final String COMPONENT_EMBED = "COMPONENT_EMBED"; + private UITabGroup headGroup; private CardLayout cardLayout; private JPanel centerPane; private boolean packagePaneCreated = false; @@ -43,7 +44,7 @@ public class OnlineWidgetTabPane extends JPanel { this.centerPane.add(new OnlineWidgetShowPane(sharableWidgets), COMPONENT); this.centerPane.add( embedFilterShowPane = new OnlineEmbedFilterShowPane(new OnlineWidgetShowPane(sharableWidgets, OnlineWidgetSortType.SALES)), COMPONENT_EMBED); //延迟组件包面板的初始化,防止组件面板里组件的缩略图和组件包面板里组件的缩略图一起加载 - UITabGroup headGroup = new UITabGroup(new String[]{COMPONENT, COMPONENT_PACKAGE}) { + this.headGroup = new UITabGroup(new String[]{COMPONENT, COMPONENT_PACKAGE}) { public void tabChanged(int newSelectedIndex) { for (TabChangeListener changeListener : tabChangeListeners) { changeListener.tabChange(newSelectedIndex); @@ -63,7 +64,7 @@ public class OnlineWidgetTabPane extends JPanel { } }; - headGroup.setSelectedIndex(0); + this.headGroup.setSelectedIndex(0); this.centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); jPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); @@ -84,6 +85,7 @@ public class OnlineWidgetTabPane extends JPanel { } } public void refreshPane() { + this.headGroup.setSelectedIndex(0); this.cardLayout.show(centerPane, ComponentShareUtil.needShowEmbedFilterPane() ? COMPONENT_EMBED : COMPONENT); }