import jalview.renderer.AnnotationRenderer;
import jalview.renderer.AwtRenderPanelI;
-public class AnnotationPanel extends Panel implements AwtRenderPanelI, AdjustmentListener,
- ActionListener, MouseListener, MouseMotionListener
+public class AnnotationPanel extends Panel implements AwtRenderPanelI,
+ AdjustmentListener, ActionListener, MouseListener,
+ MouseMotionListener
{
AlignViewport av;
/**
* DOCUMENT ME!
- *
+ *
* @param evt
* DOCUMENT ME!
*/
}
String label = "";
- if (av.getColumnSelection() != null && av.getColumnSelection().size() > 0
+ if (av.getColumnSelection() != null
+ && av.getColumnSelection().size() > 0
&& anot[av.getColumnSelection().getMin()] != null)
label = anot[av.getColumnSelection().getMin()].displayCharacter;
item = new MenuItem(STEM);
item.addActionListener(this);
pop.add(item);
- } else {
+ }
+ else
+ {
item = new MenuItem(HELIX);
item.addActionListener(this);
pop.add(item);
}
return height;
}
+
/**
- * calculate the height for visible annotation, revalidating bounds where necessary
- * ABSTRACT GUI METHOD
+ * calculate the height for visible annotation, revalidating bounds where
+ * necessary ABSTRACT GUI METHOD
+ *
* @return total height of annotation
*/
Dimension d = getSize();
imgWidth = d.width;
// (av.endRes - av.startRes + 1) * av.charWidth;
- if (imgWidth<1 || d.height<1)
+ if (imgWidth < 1 || d.height < 1)
{
return;
}
- if (image == null || imgWidth != image.getWidth(this) || d.height != image.getHeight(this))
+ if (image == null || imgWidth != image.getWidth(this)
+ || d.height != image.getHeight(this))
{
image = createImage(imgWidth, d.height);
gg = image.getGraphics();
public void fastPaint(int horizontal)
{
- if (horizontal == 0 || av.getAlignment().getAlignmentAnnotation() == null
+ if (horizontal == 0
+ || av.getAlignment().getAlignmentAnnotation() == null
|| av.getAlignment().getAlignmentAnnotation().length < 1)
{
repaint();
/**
* DOCUMENT ME!
- *
+ *
* @param g
* DOCUMENT ME!
* @param startRes