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