{
if (getUI() instanceof javax.swing.plaf.basic.BasicFileChooserUI)
{
- final javax.swing.plaf.basic.BasicFileChooserUI ui = (javax.swing.plaf.basic.BasicFileChooserUI) getUI();
- final String name = ui.getFileName().trim();
+ final javax.swing.plaf.basic.BasicFileChooserUI myui = (javax.swing.plaf.basic.BasicFileChooserUI) getUI();
+ final String name = myui.getFileName().trim();
if ((name == null) || (name.length() == 0))
{
@Override
public void run()
{
- String currentName = ui.getFileName();
+ String currentName = myui.getFileName();
if ((currentName == null) || (currentName.length() == 0))
{
- ui.setFileName(name);
+ myui.setFileName(name);
}
}
});
{
format = "PFAM";
}
+ else if (format.toUpperCase().startsWith("MEGA"))
+ {
+ format = "MEGA";
+ }
else if (format.toUpperCase().startsWith(PhylipFile.FILE_DESC))
{
format = PhylipFile.FILE_DESC;
class RecentlyOpened extends JPanel
{
- JList list;
+ JList<String> list;
public RecentlyOpened()
{
String historyItems = jalview.bin.Cache.getProperty("RECENT_FILE");
StringTokenizer st;
- Vector recent = new Vector();
+ Vector<String> recent = new Vector<String>();
if (historyItems != null)
{
while (st.hasMoreTokens())
{
- recent.addElement(st.nextElement());
+ recent.addElement(st.nextToken());
}
}
- list = new JList(recent);
+ list = new JList<String>(recent);
DefaultListCellRenderer dlcr = new DefaultListCellRenderer();
dlcr.setHorizontalAlignment(DefaultListCellRenderer.RIGHT);
layout.putConstraint(SpringLayout.NORTH, scroller, 5,
SpringLayout.NORTH, this);
- if (new Platform().isAMac())
+ if (Platform.isAMac())
{
scroller.setPreferredSize(new Dimension(500, 100));
}