From: gmungoc Date: Thu, 4 Oct 2018 11:29:08 +0000 (+0100) Subject: JAL-1244 status message while dragging a stretch group X-Git-Tag: Release_2_11_0~17^2~84^2~5 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8fc5b290e89e90de7ddbf89b92349829f52f8aff;p=jalview.git JAL-1244 status message while dragging a stretch group --- diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 8b2e7bc..e50e65d 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -2012,6 +2012,32 @@ public class SeqPanel extends JPanel { scrollThread.setEvent(evt); } + + /* + * construct a status message showing the range of the selection + */ + StringBuilder status = new StringBuilder(64); + List seqs = stretchGroup.getSequences(); + String name = seqs.get(0).getName(); + if (name.length() > 20) + { + name = name.substring(0, 20); + } + status.append(name).append(" - "); + name = seqs.get(seqs.size() - 1).getName(); + if (name.length() > 20) + { + name = name.substring(0, 20); + } + status.append(name).append(" "); + int startRes = stretchGroup.getStartRes(); + status.append(" cols ").append(String.valueOf(startRes + 1)) + .append("-"); + int endRes = stretchGroup.getEndRes(); + status.append(String.valueOf(endRes + 1)); + status.append(" (").append(String.valueOf(seqs.size())).append(" x ") + .append(String.valueOf(endRes - startRes + 1)).append(")"); + ap.alignFrame.setStatus(status.toString()); } void scrollCanvas(MouseEvent evt)