From a8583b97c78b1ac4763f8c49477ed8fecf7e9015 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 26 May 2021 15:55:18 +0800 Subject: [PATCH] =?UTF-8?q?=20REPORT-51678=20=20=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/FormWidgetDetailPane.java | 6 +++--- .../share/ui/online/AbstractOnlineWidgetShowPane.java | 6 +++++- .../mainframe/share/ui/online/OnlineWidgetShowPane.java | 8 ++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java index f77e68e15..170704aa6 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java @@ -89,7 +89,7 @@ public class FormWidgetDetailPane extends FormDockView{ cardLayout.show(centerPane, paneList.get(newSelectedIndex).getTitle()); } }; - headGroup.setSelectedIndex(0); + headGroup.setSelectedIndex(ONLINE_TAB); this.add(headGroup, BorderLayout.NORTH); this.add(centerPane, BorderLayout.CENTER); } @@ -105,12 +105,12 @@ public class FormWidgetDetailPane extends FormDockView{ } - public void enterWidgetLib() { + public void enterWidgetLib() { EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_LIB); - headGroup.setSelectedIndex(ONLINE_TAB); ComponentReuseNotifyUtil.enterWidgetLibExtraAction(false); } + /** * 定位 * diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java index fc2390d61..7c090cac3 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/AbstractOnlineWidgetShowPane.java @@ -145,7 +145,7 @@ public abstract class AbstractOnlineWidgetShowPane extends JPanel { centerPane.remove(componentSelectPane); componentSelectPane = createOnlineWidgetSelectPane(() -> { sharableWidgetProviders = new OnlineShareWidget[0]; - sharableWidgetProviders = ShareUtils.getFilterWidgets(filterStr); + sharableWidgetProviders = getSharableWidgetArr(filterStr); return sharableWidgetProviders; }); centerPane.add(componentSelectPane, BorderLayout.CENTER); @@ -155,6 +155,10 @@ public abstract class AbstractOnlineWidgetShowPane extends JPanel { }); } + protected OnlineShareWidget[] getSharableWidgetArr( String filterStr){ + return ShareUtils.getFilterWidgets(filterStr); + } + public void initSearchTextFieldPaneListener(FlexSearchFieldPane searchFieldPane) { searchFieldPane.registerChangeListener(event -> { Object object = event.getSource(); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetShowPane.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetShowPane.java index 2325fb130..a599980ce 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetShowPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetShowPane.java @@ -2,9 +2,11 @@ package com.fr.design.mainframe.share.ui.online; import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.share.collect.ComponentCollector; +import com.fr.design.mainframe.share.sort.OnlineWidgetSortType; import com.fr.design.mainframe.share.ui.base.FlexSearchFieldPane; import com.fr.design.mainframe.share.ui.widgetfilter.FilterPane; import com.fr.form.share.bean.OnlineShareWidget; +import com.fr.form.share.utils.ShareUtils; import com.fr.stable.StringUtils; import javax.swing.event.ChangeEvent; @@ -106,6 +108,12 @@ public class OnlineWidgetShowPane extends AbstractOnlineWidgetShowPane { }); } + protected OnlineShareWidget[] getSharableWidgetArr( String filterStr){ + OnlineShareWidget[] onlineShareWidgets = ShareUtils.getFilterWidgets(filterStr); + OnlineWidgetSortType.values()[lastSortTabSelectedIndex].sort(onlineShareWidgets); + return onlineShareWidgets; + } + @Override public void initSortTabPane(SortTabPane sortTabPane) { super.initSortTabPane(sortTabPane);