return progressBar.operationInProgress();
}
+ /**
+ * Sets the text of the status bar. Note that setting a null or empty value
+ * will cause the status bar to be hidden, with possibly undesirable flicker
+ * of the screen layout.
+ */
@Override
public void setStatus(String text)
{
AlignFrame newAlignFrame = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH,
AlignFrame.DEFAULT_HEIGHT);
newAlignFrame.setTitle(title);
- newAlignFrame.statusBar.setText(MessageManager
+ newAlignFrame.setStatus(MessageManager
.formatMessage("label.successfully_loaded_file", new Object[]
{ title }));
String desc = getTooltip(aa);
this.setToolTipText(desc);
+ ap.alignFrame.setStatus(aa.label);
}
}
{
setToolTipText(buildToolTip(ann, column, aa));
String msg = getStatusMessage(av.getAlignment(), column, ann);
- ap.alignFrame.statusBar.setText(msg);
+ ap.alignFrame.setStatus(msg);
}
else
{
this.setToolTipText(null);
- ap.alignFrame.statusBar.setText(" ");
+ ap.alignFrame.setStatus(" ");
}
}
af.currentFileFormat = format;
Desktop.addInternalFrame(af, title, AlignFrame.DEFAULT_WIDTH,
AlignFrame.DEFAULT_HEIGHT);
- af.statusBar.setText(MessageManager
+ af.setStatus(MessageManager
.getString("label.successfully_pasted_alignment_file"));
try
}
/**
- * Respond to mouse movement by constructing tooltip text for the sequence id
- * under the mouse.
+ * Responds to mouse movement by setting tooltip text for the sequence id
+ * under the mouse (or possibly annotation label, when in wrapped mode)
*
* @param e
- * DOCUMENT ME!
*/
@Override
public void mouseMoved(MouseEvent e)
AlignmentAnnotation annotation = av.getAlignment()
.getAlignmentAnnotation()[pos.annotationIndex];
setToolTipText(AnnotationLabels.getTooltip(annotation));
+ alignPanel.alignFrame.setStatus(annotation.label);
}
else
{
{
SequenceI sequence = av.getAlignment().getSequenceAt(seq);
StringBuilder tip = new StringBuilder(64);
+ tip.append(sequence.getDisplayId(true)).append(" ");
seqAnnotReport.createTooltipAnnotationReport(tip, sequence,
av.isShowDBRefs(), av.isShowNPFeats(), sp.seqCanvas.fr);
- setToolTipText(JvSwingUtils.wrapTooltip(true,
- sequence.getDisplayId(true) + " " + tip.toString()));
+ setToolTipText(JvSwingUtils.wrapTooltip(true, tip.toString()));
+
+ StringBuilder text = new StringBuilder();
+ text.append("Sequence ").append(String.valueOf(seq + 1))
+ .append(" ID: ")
+ .append(sequence.getName());
+ alignPanel.alignFrame.setStatus(text.toString());
}
}
}
}
MousePos pos = alignPanel.getSeqPanel().findMousePosition(e);
- if (pos.isOverAnnotation())
+ int seq = pos.seqIndex;
+ if (pos.isOverAnnotation() || seq < 0)
{
- // mouse is over annotation label in wrapped mode
return;
}
- int seq = pos.seqIndex;
String id = av.getAlignment().getSequenceAt(seq).getName();
String url = Preferences.sequenceUrlLinks.getPrimaryUrl(id);
Desktop.addInternalFrame(af, title, AlignFrame.DEFAULT_WIDTH,
AlignFrame.DEFAULT_HEIGHT);
- af.statusBar.setText(MessageManager
+ af.setStatus(MessageManager
.getString("label.successfully_pasted_alignment_file"));
try
alignFrame.getViewport()
.applyFeaturesStyle(proxyColourScheme);
}
- alignFrame.statusBar.setText(MessageManager.formatMessage(
+ alignFrame.setStatus(MessageManager.formatMessage(
"label.successfully_loaded_file", new String[]
{ title }));
protected JMenu sortByAnnotScore = new JMenu();
- public JLabel statusBar = new JLabel();
+ protected JLabel statusBar = new JLabel();
protected JMenu outputTextboxMenu = new JMenu();
private boolean showAutoCalculatedAbove = false;
- private Map<KeyStroke, JMenuItem> accelerators = new HashMap<KeyStroke, JMenuItem>();
+ private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
private SplitContainerI splitFrame;