validate();
}
- public static int getViewCount(String viewId)
+ public static int getViewCount(String alignmentId)
{
- AlignViewport[] aps = getViewports(viewId);
+ AlignViewport[] aps = getViewports(alignmentId);
return (aps == null) ? 0 : aps.length;
}
/**
*
- * @param viewId
- * @return all AlignmentPanels concerning the viewId sequence set
+ * @param alignmentId
+ * @return all AlignmentPanels concerning the alignmentId sequence set
*/
- public static AlignmentPanel[] getAlignmentPanels(String viewId)
+ public static AlignmentPanel[] getAlignmentPanels(String alignmentId)
{
int count = 0;
if (Desktop.desktop == null)
AlignFrame af = (AlignFrame) frames[t];
for (int a = 0; a < af.alignPanels.size(); a++)
{
- if (viewId
+ if (alignmentId
.equals(((AlignmentPanel) af.alignPanels.elementAt(a)).av
.getSequenceSetId()))
{
changeSupport);
}
+ Thread t3=null;
+ {
+ // TODO: do rest service discovery
+ }
if (blocking)
{
while (alive)
}
alive = (t1 != null && t1.isAlive())
|| (t2 != null && t2.isAlive())
+ || (t3 != null && t3.isAlive())
|| (t0 != null && t0.isAlive());
}
}
*/
public static void showUrl(final String url)
{
+ showUrl(url, Desktop.instance);
+ }
+ /**
+ * Like showUrl but allows progress handler to be specified
+ * @param url
+ * @param progress (null) or object implementing IProgressIndicator
+ */
+ public static void showUrl(final String url, final IProgressIndicator progress)
+ {
new Thread(new Runnable()
{
public void run()
{
try
{
+ if (progress!=null) {
+ progress.setProgressBar("Opening "+url, this.hashCode());
+ }
jalview.util.BrowserLauncher.openURL(url);
} catch (Exception ex)
{
ex.printStackTrace();
}
+ if (progress!=null) {
+ progress.setProgressBar(null, this.hashCode());
+ }
}
}).start();
}