use of com.limegroup.gnutella.gui.actions.SearchAction in project frostwire by frostwire.
the class LibraryPlaylistsTableMediator method createSearchSubMenu.
private JMenu createSearchSubMenu(LibraryPlaylistsTableDataLine dl) {
JMenu menu = new SkinMenu(I18n.tr("Search"));
if (dl != null) {
File f = dl.getFile();
String keywords = QueryUtils.createQueryString(f.getName());
if (keywords.length() > 0)
menu.add(new SkinMenuItem(new SearchAction(keywords)));
}
if (menu.getItemCount() == 0)
menu.setEnabled(false);
return menu;
}
use of com.limegroup.gnutella.gui.actions.SearchAction in project frostwire by frostwire.
the class LibraryFilesTableMediator method createSearchSubMenu.
private JMenu createSearchSubMenu(LibraryFilesTableDataLine dl) {
SkinMenu menu = new SkinMenu(I18n.tr("Search"));
if (dl != null) {
File f = dl.getInitializeObject();
String keywords = QueryUtils.createQueryString(f.getName());
if (keywords.length() > 0)
menu.add(new SkinMenuItem(new SearchAction(keywords)));
}
if (menu.getItemCount() == 0)
menu.setEnabled(false);
return menu;
}
use of com.limegroup.gnutella.gui.actions.SearchAction in project frostwire by frostwire.
the class SearchResultMediator method createSearchAgainMenu.
/**
* Returns a menu with a 'repeat search' and 'repeat search no clear' action.
*/
private JMenu createSearchAgainMenu(SearchResultDataLine line) {
JMenu menu = new SkinMenu(tr("Search More"));
menu.add(new SkinMenuItem(new RepeatSearchAction()));
if (line == null) {
menu.setEnabled(isRepeatSearchEnabled());
return menu;
}
menu.addSeparator();
String keywords = QueryUtils.createQueryString(line.getFilename());
SearchInformation info = SearchInformation.createKeywordSearch(keywords, null, MediaType.getAnyTypeMediaType());
if (SearchMediator.validateInfo(info) == SearchMediator.QUERY_VALID) {
SeasonalContentSearchSuggestion.attemptToAddSeasonalContentSearchSuggestion(menu, null, searchTokens);
menu.add(new SkinMenuItem(new SearchAction(info, tr("Search for Keywords: {0}"))));
}
return menu;
}
Aggregations