else
{
-
-
int screenY = 0;
int blockStart = startRes;
int blockEnd = endRes;
- if (av.getColumnSelection() != null
- && av.getColumnSelection().getHiddenColumns() != null)
+ if (av.hasHiddenColumns())
{
- java.util.Vector regions = av.getColumnSelection()
- .getHiddenColumns();
+ for (int[] region : av.getColumnSelection().getHiddenColumns())
+ {
+ int hideStart = region[0];
+ int hideEnd = region[1];
- for (int i = 0; i < regions.size(); i++)
- {
- int[] region = (int[]) regions.elementAt(i);
- int hideStart = region[0];
- int hideEnd = region[1];
+ if (hideStart <= blockStart)
+ {
+ blockStart += (hideEnd - hideStart) + 1;
+ continue;
+ }
- if (hideStart <= blockStart)
- {
- blockStart += (hideEnd - hideStart) + 1;
- continue;
- }
+ blockEnd = hideStart - 1;
- blockEnd = hideStart - 1;
+ g1.translate(screenY * av.charWidth, 0);
- g1.translate(screenY * av.charWidth, 0);
+ draw(g1, blockStart, blockEnd, startSeq, endSeq, offset);
- draw(g1, blockStart, blockEnd, startSeq, endSeq, offset);
+ if (av.getShowHiddenMarkers())
+ {
+ g1.setColor(Color.blue);
+ g1.drawLine((blockEnd - blockStart + 1) * av.charWidth - 1,
+ 0 + offset, (blockEnd - blockStart + 1) * av.charWidth
+ - 1, (endSeq - startSeq) * av.charHeight
+ + offset);
+ }
- if (av.getShowHiddenMarkers())
- {
- g1.setColor(Color.blue);
- g1.drawLine((blockEnd - blockStart + 1) * av.charWidth - 1,
- 0 + offset, (blockEnd - blockStart + 1) * av.charWidth
- - 1, (endSeq - startSeq) * av.charHeight + offset);
+ g1.translate(-screenY * av.charWidth, 0);
+ screenY += blockEnd - blockStart + 1;
+ blockStart = hideEnd + 1;
}
-
- g1.translate(-screenY * av.charWidth, 0);
- screenY += blockEnd - blockStart + 1;
- blockStart = hideEnd + 1;
- }
}
if (screenY <= (endRes - startRes))
{