gg.fillRect(0, 0, getWidth(), imgHeight);
drawIds(gg, av, av.getRanges().getStartSeq(),
- av.getRanges().getEndSeq(), searchResults,true, getWidth());
+ av.getRanges().getEndSeq(), searchResults, true, getWidth());
gg.dispose();
* @param startSeq
* @param endSeq
* @param selection
- * @param forGUI when false rendering for print
- * @param panelWidth width used to calculate righthand margin - usually idCanvas.getWidth()
+ * @param forGUI
+ * when false rendering for print
+ * @param panelWidth
+ * width used to calculate righthand margin - usually
+ * idCanvas.getWidth()
*
*/
void drawIds(Graphics2D g, AlignViewport alignViewport,
- final int startSeq, final int endSeq, List<SequenceI> selection, boolean forGUI, int panelWidth)
+ final int startSeq, final int endSeq, List<SequenceI> selection,
+ boolean forGUI, int panelWidth)
{
Font font = alignViewport.getFont();
if (alignViewport.isSeqNameItalics())
if (alignViewport.getWrapAlignment())
{
- drawIdsWrapped(g, alignViewport, startSeq, getHeight(), panelWidth,forGUI);
+ drawIdsWrapped(g, alignViewport, startSeq, getHeight(),
+ manuallyAdjusted ? panelWidth : -1, forGUI);
return;
}
/**
* render sequence IDs and annotation labels when wrapped - without GUI junk
+ *
* @param g
* @param av2
- * @param i
+ * @param startSeq
* @param totalHeight
*/
- public void drawIdsWrappedNoGUI(Graphics2D g, AlignViewport av2, int i,
- int totalHeight)
+ public void drawIdsWrappedNoGUI(Graphics2D g, AlignViewport av2,
+ int startSeq, int totalHeight)
{
- drawIdsWrapped(g, av2, totalHeight, totalHeight, i,false);
+ drawIdsWrapped(g, av2, startSeq, totalHeight, -1, false);
}
public void drawIdsWrapped(Graphics2D g, AlignViewport alignViewport,
if (alignViewport.isShowAnnotation())
{
// in wrapped mode, no alignPanel reference is available
- // FIXME: make the renderer not create a new object in wrapped mode everytime!
+ // FIXME: make the renderer not create a new object in wrapped mode
+ // everytime!
labels = new AnnotationLabels(alignViewport);
}
int getWidth = getWidth();
int thisIdWidth = getWidth;
g.translate(0, ypos + (alheight * charHeight));
- if (!manuallyAdjusted())
+ if (!isManuallyAdjusted())
{
- int getAnnotationsIdWidth = labels.drawLabels(g, false, -1, false,forGUI,
- null, false);
+ int getAnnotationsIdWidth = labels.drawLabels(g, false, -1, false,
+ forGUI, null, false);
thisIdWidth = idWidth < 0 ? getAnnotationsIdWidth : idWidth;
if (thisIdWidth > getWidth)
{
private boolean manuallyAdjusted = false;
- public boolean manuallyAdjusted()
+ public boolean isManuallyAdjusted()
{
return manuallyAdjusted;
}