}
/**
- * start thread and wait until finished, then return the alignFrame that's
- * (hopefully) been read.
+ * runs the 'run' method (in this thread), then return the alignFrame that's
+ * (hopefully) been read
*
* @return
*/
protected AlignFrame _LoadFileWaitTillLoaded()
{
-
- /**
- * @j2sNative
- *
- * this.run();
- *
- */
- {
- Thread loader = new Thread(this);
- loader.start();
-
- while (loader.isAlive())
- {
- try
- {
- Thread.sleep(500);
- } catch (Exception ex)
- {
- }
- }
- }
+ this.run();
return alignFrame;
}
public void updateRecentlyOpened()
{
- Vector recent = new Vector();
+ Vector<String> recent = new Vector<>();
if (protocol == DataSourceType.PASTE)
{
// do nothing if the file was pasted in as text... there is no filename to
String type = protocol == DataSourceType.FILE ? "RECENT_FILE"
: "RECENT_URL";
- String historyItems = jalview.bin.Cache.getProperty(type);
+ String historyItems = Cache.getProperty(type);
StringTokenizer st;
while (st.hasMoreTokens())
{
- recent.addElement(st.nextElement().toString().trim());
+ recent.addElement(st.nextToken().trim());
}
}