public class AnnotationRenderer
{
+ /**
+ * flag indicating if timing and redraw parameter info should be output
+ */
+ private final boolean debugRedraw;
public AnnotationRenderer()
{
- // TODO Auto-generated constructor stub
+ this(false);
+ }
+ /**
+ * Create a new annotation Renderer
+ * @param debugRedraw flag indicating if timing and redraw parameter info should be output
+ */
+ public AnnotationRenderer(boolean debugRedraw)
+ {
+ this.debugRedraw=debugRedraw;
}
public void drawStemAnnot(Graphics g, Annotation[] row_annotations,
/**
* indicate if the renderer should only render the visible portion of the annotation given the current view settings
*/
- private boolean useClip=false;
+ private boolean useClip=true;
/**
* master flag indicating if renderer should ever try to clip. not enabled for jalview 2.8.1
*/
private boolean canClip=false;
+
// public void updateFromAnnotationPanel(FontMetrics annotFM, AlignViewportI
// av)
public void updateFromAwtRenderPanel(AwtRenderPanelI annotPanel,
AlignViewportI av, Graphics g, int activeRow, int startRes,
int endRes)
{
+ long stime=System.currentTimeMillis();
boolean usedFaded = false;
// NOTES:
// AnnotationPanel needs to implement: ImageObserver, access to
y += aa[i].height;
}
}
- if (canClip)
+ if (debugRedraw)
{
- if (clipst)
+ if (canClip)
{
- System.err.println("Start clip at : " + yfrom + " (index " + f_i
- + ")");
- }
- if (clipend)
- {
- System.err
- .println("End clip at : " + yto + " (index " + f_to + ")");
+ if (clipst)
+ {
+ System.err.println("Start clip at : " + yfrom + " (index " + f_i
+ + ")");
+ }
+ if (clipend)
+ {
+ System.err.println("End clip at : " + yto + " (index " + f_to
+ + ")");
+ }
}
+ ;
+ System.err.println("Annotation Rendering time:"
+ + (System.currentTimeMillis() - stime));
}
;
+
return !usedFaded;
}