|
|
|
@ -47,14 +47,11 @@ public abstract class AbstractOnlineWidgetShowPane extends JPanel {
|
|
|
|
|
|
|
|
|
|
private OnlineShareWidget[] sharableWidgetProviders; |
|
|
|
|
|
|
|
|
|
//缓存一份用于搜索
|
|
|
|
|
private final OnlineShareWidget[] sharableWidgetCache; |
|
|
|
|
//主面板和搜索面板的cardLayout
|
|
|
|
|
private CardLayout mainCardLayout; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public AbstractOnlineWidgetShowPane(OnlineShareWidget[] sharableWidgetProviders) { |
|
|
|
|
this.sharableWidgetCache = sharableWidgetProviders; |
|
|
|
|
this.sharableWidgetProviders = sharableWidgetProviders; |
|
|
|
|
this.setLayout(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
JPanel contentPane = initContentPane(); |
|
|
|
@ -119,7 +116,7 @@ public abstract class AbstractOnlineWidgetShowPane extends JPanel {
|
|
|
|
|
} |
|
|
|
|
List<OnlineShareWidget> widgets = new ArrayList<>(); |
|
|
|
|
if (StringUtils.isNotEmpty(text)) { |
|
|
|
|
for (OnlineShareWidget provider : sharableWidgetCache) { |
|
|
|
|
for (OnlineShareWidget provider : sharableWidgetProviders) { |
|
|
|
|
if (provider.getName().toLowerCase().contains(text)) { |
|
|
|
|
widgets.add(provider); |
|
|
|
|
} |
|
|
|
|