else
{
int newAnnotationIdWidth = drawLabels(g, clip, width, false, forGUI, null, false);
- width = Math.max(newAnnotationIdWidth, givenWidth);
+ width = newAnnotationIdWidth<givenWidth ? givenWidth: Math.min(newAnnotationIdWidth, givenWidth);
}
drawLabels(g, clip, width, true, forGUI, null, false);
}
if (alignViewport.getWrapAlignment())
{
- drawIdsWrapped(g, alignViewport, startSeq, getHeight());
+ drawIdsWrapped(g, alignViewport, startSeq, getHeight(), panelWidth,forGUI);
return;
}
drawIdsWrapped(g, av2, totalHeight, totalHeight, i,false);
}
- void drawIdsWrapped(Graphics2D g, AlignViewport alignViewport,
+ public void drawIdsWrapped(Graphics2D g, AlignViewport alignViewport,
int startSeq, int pageHeight, int idWidth, boolean forGUI)
{
int alignmentWidth = alignViewport.getAlignment().getWidth();
AnnotationLabels labels = null;
if (alignViewport.isShowAnnotation())
{
+ // in wrapped mode, no alignPanel reference is available
+ // FIXME: make the renderer not create a new object in wrapped mode everytime!
labels = new AnnotationLabels(alignViewport);
}