Browse Source

REPORT-65449 在组件包详情页拖拽组件并修改后,再点到在线组件,标签和内容显示不一致

【问题原因】
在线组件库页面刷新为所有在线组件列表时,Tab标题没有作出对应改变,出现了Tab投显示组件包,而列表页
显示所有在线组件的情况

【改动思路】
刷新时修改标题头"组件"
bugfix/11.0
Starryi 3 years ago
parent
commit
da9398eead
  1. 6
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java

6
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);
}

Loading…
Cancel
Save