/*
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
+ * Copyright (C) 2015 The Jalview Authors
*
* This file is part of Jalview.
*
PaintRefresher.Register(this, av.getSequenceSetId());
}
- public void drawIdString(Graphics gg, SequenceI s, int i, int starty,
- int ypos)
+ public void drawIdString(Graphics gg, boolean hiddenRows, SequenceI s,
+ int i, int starty, int ypos)
{
int charHeight = av.getCharHeight();
((i - starty) * charHeight) + ypos + charHeight
- (charHeight / 5));
- if (av.hasHiddenRows() && av.getShowHiddenMarkers())
+ if (hiddenRows)
{
drawMarker(i, starty, ypos);
}
* local copy of av.getCharHeight set at top of drawIds
*/
private int avcharHeight;
+
void drawIds(int starty, int endy)
{
// hardwired italic IDs in applet currently
Color currentColor = Color.white;
Color currentTextColor = Color.black;
+ final boolean doHiddenCheck = av.isDisplayReferenceSeq()
+ || av.hasHiddenRows(), hiddenRows = av.hasHiddenRows()
+ && av.getShowHiddenMarkers();
+
if (av.getWrapAlignment())
{
int maxwidth = av.getAlignment().getWidth();
int cHeight = alheight * avcharHeight + hgap + annotationHeight;
int rowSize = av.getEndRes() - av.getStartRes();
-
// Draw the rest of the panels
for (int ypos = hgap, row = av.startRes; (ypos <= getSize().height)
&& (row < maxwidth); ypos += cHeight, row += rowSize)
SequenceI s = av.getAlignment().getSequenceAt(i);
gg.setFont(italic);
- if (av.isDisplayReferenceSeq() || av.hasHiddenRows())
+ if (doHiddenCheck)
{
setHiddenFont(s);
}
- drawIdString(gg, s, i, 0, ypos);
+ drawIdString(gg, hiddenRows, s, i, 0, ypos);
}
if (labels != null)
}
gg.setFont(italic);
// boolean isrep=false;
- if (av.isDisplayReferenceSeq() || av.hasHiddenRows())
+ if (doHiddenCheck)
{
// isrep =
setHiddenFont(seq);
(((i - starty) * avcharHeight) + avcharHeight)
- (avcharHeight / 5));
- if (av.hasHiddenRows() && av.getShowHiddenMarkers())
+ if (hiddenRows)
{
drawMarker(i, starty, 0);
}
gg.setColor(Color.blue);
if (below)
{
- gg.fillPolygon(new int[]
- { getSize().width - avcharHeight, getSize().width - avcharHeight,
- getSize().width }, new int[]
- { (i - starty) * avcharHeight + yoffset,
+ gg.fillPolygon(new int[] { getSize().width - avcharHeight,
+ getSize().width - avcharHeight, getSize().width }, new int[] {
+ (i - starty) * avcharHeight + yoffset,
(i - starty) * avcharHeight + yoffset + avcharHeight / 4,
(i - starty) * avcharHeight + yoffset }, 3);
}
if (above)
{
- gg.fillPolygon(new int[]
- { getSize().width - avcharHeight, getSize().width - avcharHeight,
- getSize().width }, new int[]
- { (i - starty + 1) * avcharHeight + yoffset,
+ gg.fillPolygon(new int[] { getSize().width - avcharHeight,
+ getSize().width - avcharHeight, getSize().width }, new int[] {
+ (i - starty + 1) * avcharHeight + yoffset,
(i - starty + 1) * avcharHeight + yoffset - avcharHeight / 4,
(i - starty + 1) * avcharHeight + yoffset }, 3);