X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Frenderer%2FAnnotationRenderer.java;h=e527c100d60fa9a82519c59dc903230164836679;hb=968bc59842cfb502e5e9cc4503efe27b4b4412b2;hp=84f65894379c17abf630143507d87823337597a9;hpb=c0106888bd11a83e0f988ca9f90cc494a356b461;p=jalview.git diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index 84f6589..e527c10 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -212,20 +212,25 @@ public class AnnotationRenderer } /** - * DOCUMENT ME! - * - * @param annotationPanel - * TODO + * Render the annotation rows associated with an alignment. + * @param annotPanel + * container frame + * @param av + * data and view settings to render * @param g - * DOCUMENT ME! + * destination for graphics + * @param activeRow + * row where a mouse event occured (or -1) * @param startRes - * DOCUMENT ME! + * first column that will be drawn * @param endRes - * DOCUMENT ME! + * last column that will be drawn + * @return true if the fadedImage was used for any alignment annotation rows currently being calculated */ - public void drawComponent(AwtRenderPanelI annotPanel, AlignViewportI av, + public boolean drawComponent(AwtRenderPanelI annotPanel, AlignViewportI av, Graphics g, int activeRow, int startRes, int endRes) { + boolean usedFaded=false; // NOTES: // AnnotationPanel needs to implement: ImageObserver, access to // AlignViewport @@ -292,7 +297,7 @@ public class AnnotationRenderer if (row.autoCalculated && av.isCalculationInProgress(row)) { y += charHeight; - + usedFaded=true; g.drawImage(fadedImage, 0, y - row.height, imgWidth, y, 0, y - row.height, imgWidth, y, annotationPanel); g.setColor(Color.black); @@ -555,7 +560,6 @@ public class AnnotationRenderer { aa[gg].visible = false; } - if (aa[gg].graphMax > groupmax) { groupmax = aa[gg].graphMax; @@ -600,6 +604,7 @@ public class AnnotationRenderer y += aa[i].height; } } + return !usedFaded; } private final Color GLYPHLINE_COLOR = Color.gray;