PaintRefresher.Register(this, av.getSequenceSetId());
}
- public void drawIdString(Graphics gg, SequenceI s, int i, int starty,
+ 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);
}
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);
}
Color color = Color.yellow;
int row, col, sameRow = 0, sameCol = 0;
jalview.datamodel.SequenceI seq;
+ final boolean hasHiddenRows = av.hasHiddenRows(), hasHiddenCols = av
+ .hasHiddenColumns();
boolean hiddenRow = false;
AlignmentI alignment = av.getAlignment();
for (row = 0; row <= sequencesHeight; row++)
}
hiddenRow = false;
- if (av.hasHiddenRows())
+ if (hasHiddenRows)
{
seq = alignment.getHiddenSequences().getHiddenSequence(lastrow);
if (seq == null)
}
if (hiddenRow
- || (av.hasHiddenColumns() && !av.getColumnSelection()
+ || (hasHiddenCols && !av.getColumnSelection()
.isVisible(lastcol)))
{
color = color.darker().darker();
*
* @param gg
* DOCUMENT ME!
+ * @param hiddenRows
+ * true - check and display hidden row marker if need be
* @param s
* DOCUMENT ME!
* @param i
* @param ypos
* DOCUMENT ME!
*/
- public void drawIdString(Graphics2D gg, SequenceI s, int i, int starty,
+ public void drawIdString(Graphics2D gg, boolean hiddenRows, SequenceI s,
+ int i, int starty,
int ypos)
{
int xPos = 0;
gg.drawString(s.getDisplayId(av.getShowJVSuffix()), xPos,
(((i - starty + 1) * charHeight) + ypos) - (charHeight / 5));
- if (av.hasHiddenRows() && av.getShowHiddenMarkers())
+ if (hiddenRows)
{
drawMarker(i, starty, ypos);
}
Color currentColor = Color.white;
Color currentTextColor = Color.black;
+ final boolean doHiddenCheck = av.isDisplayReferenceSeq()
+ || av.hasHiddenRows(), hiddenRows = av.hasHiddenRows();
+
if (av.getWrapAlignment())
{
int maxwidth = av.getAlignment().getWidth();
for (int i = starty; i < alheight; i++)
{
SequenceI s = av.getAlignment().getSequenceAt(i);
- if (av.isDisplayReferenceSeq() || av.hasHiddenRows())
+ if (doHiddenCheck)
{
setHiddenFont(s);
}
gg.setFont(getIdfont());
}
- drawIdString(gg, s, i, 0, ypos);
+ drawIdString(gg, hiddenRows, s, i, 0, ypos);
}
if (labels != null && av.isShowAnnotation())
continue;
}
- if (av.isDisplayReferenceSeq() || av.hasHiddenRows())
+ if (doHiddenCheck)
{
setHiddenFont(sequence);
}
(((i - starty) * av.getCharHeight()) + av.getCharHeight())
- (av.getCharHeight() / 5));
- if (av.hasHiddenRows() && av.getShowHiddenMarkers())
+ if (hiddenRows)
{
drawMarker(i, starty, 0);
}
int color = Color.white.getRGB();
int row, col;
jalview.datamodel.SequenceI seq;
+ final boolean hasHiddenRows = av.hasHiddenRows(), hasHiddenCols = av
+ .hasHiddenColumns();
boolean hiddenRow = false;
for (row = 0; row < sequencesHeight; row++)
{
lastrow = (int) (row * sampleRow);
hiddenRow = false;
- if (av.hasHiddenRows())
+ if (hasHiddenRows)
{
seq = av.getAlignment().getHiddenSequences()
.getHiddenSequence(lastrow);
}
if (hiddenRow
- || (av.hasHiddenColumns() && !av.getColumnSelection()
+ || (hasHiddenCols && !av.getColumnSelection()
.isVisible(lastcol)))
{
color = new Color(color).darker().darker().getRGB();