- alignFrame.alignPanel.fontChanged();
- alignFrame.alignPanel.setScrollValues(0, 0);
-
+ tcf = new TCoffeeScoreFile(textarea.getText(),
+ jalview.io.AppletFormatAdapter.PASTE);
+ if (tcf.isValid())
+ {
+ if (tcf.annotateAlignment(alignFrame.viewport.getAlignment(),
+ true))
+ {
+ alignFrame.tcoffeeColour.setEnabled(true);
+ alignFrame.alignPanel.fontChanged();
+ alignFrame.changeColour(new TCoffeeColourScheme(
+ alignFrame.viewport.getAlignment()));
+ alignFrame.statusBar
+ .setText("Successfully pasted T-Coffee scores to alignment.");
+ }
+ else
+ {
+ // file valid but didn't get added to alignment for some reason
+ alignFrame.statusBar.setText("Failed to add T-Coffee scores: "
+ + (tcf.getWarningMessage() != null ? tcf
+ .getWarningMessage() : ""));
+ }
+ }
+ else
+ {
+ tcf = null;
+ }
+ } catch (Exception x)
+ {
+ tcf = null;