import java.awt.image.BufferedImage;
import jalview.datamodel.*;
+import jalview.util.ParseHtmlBodyAndLinks;
public class AnnotationLabels extends Panel implements ActionListener,
MouseListener, MouseMotionListener
if (row > -1)
{
+ ParseHtmlBodyAndLinks phb = new ParseHtmlBodyAndLinks(av.alignment.getAlignmentAnnotation()[row].getDescription(true), true, "\n");
if (tooltip == null)
{
- tooltip = new Tooltip(
- ap.av.alignment.getAlignmentAnnotation()[row]
- .getDescription(true),
- this);
+ tooltip = new Tooltip(phb.getNonHtmlContent(), this);
}
else
{
- tooltip.setTip(ap.av.alignment.getAlignmentAnnotation()[row]
- .getDescription(true));
+ tooltip.setTip(phb.getNonHtmlContent());
}
}
else if (tooltip != null)
public void mouseReleased(MouseEvent evt)
{
- if (!dragCancelled)
+ if (!resizePanel && !dragCancelled)
{
int start = selectedRow;
public void paint(Graphics g)
{
int w = getSize().width;
- if (image == null || w != image.getWidth(this))
+ int h = getSize().height;
+ if (image == null || w != image.getWidth(this) || h!=image.getHeight(this) )
{
image = createImage(w, ap.annotationPanel.getSize().height);
}