@Override protected MediaSource createMediaSource(LibraryFilesTableDataLine line) { if (MediaPlayer.isPlayableFile(line.getInitializeObject())) { return new MediaSource(line.getInitializeObject()); } else { return null; } }
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; }