return ret;
}
- void recentListSelectionChanged(String selection)
+ void recentListSelectionChanged(Object selection)
{
setSelectedFile(null);
-
- File file = new File(selection);
- if (getFileFilter() instanceof JalviewFileFilter)
+ if (selection != null)
{
- JalviewFileFilter jvf = (JalviewFileFilter) this.getFileFilter();
-
- if (!jvf.accept(file))
+ File file = new File((String) selection);
+ if (getFileFilter() instanceof JalviewFileFilter)
{
- setFileFilter(getChoosableFileFilters()[0]);
+ JalviewFileFilter jvf = (JalviewFileFilter) this.getFileFilter();
+
+ if (!jvf.accept(file))
+ {
+ setFileFilter(getChoosableFileFilters()[0]);
+ }
}
- }
- setSelectedFile(file);
+ setSelectedFile(file);
+ }
}
class RecentlyOpened extends JPanel
{
public void mousePressed(MouseEvent evt)
{
- recentListSelectionChanged(list.getSelectedValue().toString());
+ recentListSelectionChanged(list.getSelectedValue());
}
});