/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
* Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
import jalview.io.*;
import jalview.schemes.*;
import jalview.util.GroupUrlLink;
+import jalview.util.GroupUrlLink.UrlStringTooLongException;
import jalview.util.UrlLink;
/**
{
conservationMenuItem.setSelected(true);
}
- displayNonconserved.setSelected(sg.getShowunconserved());
+ displayNonconserved.setSelected(sg.getShowNonconserved());
showText.setSelected(sg.getDisplayText());
showColourText.setSelected(sg.getColourText());
showBoxes.setSelected(sg.getDisplayBoxes());
}
// and try and make the groupURL!
- Object[] urlset = urlLink.makeUrlStubs(ids, seqstr, "FromJalview"
- + System.currentTimeMillis(), false);
+ Object[] urlset = null;
+ try
+ {
+ urlset = urlLink.makeUrlStubs(ids, seqstr, "FromJalview"
+ + System.currentTimeMillis(), false);
+ } catch (UrlStringTooLongException e)
+ {
+ }
if (urlset != null)
{
int type = urlLink.getGroupURLType() & 3;
public void run()
{
- showLink(urlgenerator.constructFrom(urlstub));
+ try
+ {
+ showLink(urlgenerator.constructFrom(urlstub));
+ } catch (UrlStringTooLongException e)
+ {
+ }
}
}).start();
protected void showNonconserved_actionPerformed()
{
- getGroup().setShowunconserved(displayNonconserved.isSelected());
+ getGroup().setShowNonconserved(displayNonconserved.isSelected());
refresh();
}
SequenceGroup sg = getGroup();
EditNameDialog dialog = new EditNameDialog(sg.getName(), sg
.getDescription(), " Group Name ", "Group Description ",
- "Edit Group Name/Description");
+ "Edit Group Name/Description", ap.alignFrame);
if (!dialog.accept)
{
{
EditNameDialog dialog = new EditNameDialog(sequence.getName(), sequence
.getDescription(), " Sequence Name ",
- "Sequence Description ", "Edit Sequence Name/Description");
+ "Sequence Description ", "Edit Sequence Name/Description", ap.alignFrame);
if (!dialog.accept)
{
omitHidden = ap.av.getViewAsString(true);
Alignment oal = new Alignment(ap.av.getSequenceSelection());
AlignmentAnnotation[] nala = ap.av.alignment.getAlignmentAnnotation();
- for (int i = 0; i < nala.length; i++)
- {
- AlignmentAnnotation na = nala[i];
- oal.addAnnotation(na);
+ if (nala!=null) {
+ for (int i = 0; i < nala.length; i++)
+ {
+ AlignmentAnnotation na = nala[i];
+ oal.addAnnotation(na);
+ }
}
cap.setText(new FormatAdapter().formatSequences(e.getActionCommand(),
oal, omitHidden, csel, sg));
EditNameDialog dialog = new EditNameDialog(sequence
.getSequenceAsString(sg.getStartRes(), sg.getEndRes() + 1),
- null, "Edit Sequence ", null, "Edit Sequence");
+ null, "Edit Sequence ", null, "Edit Sequence", ap.alignFrame);
if (dialog.accept)
{