X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FIdCanvas.java;fp=src%2Fjalview%2Fappletgui%2FIdCanvas.java;h=5204094d21079cb859ad0e8597ce1d0968920a31;hb=685909b39c1c85ff304ecea9763925de75b2cf77;hp=7f9eba9c08c8e0f697decae0b6b55ba52948bcc1;hpb=1b2a573d7c93db57c3299d768f021c9096dffc67;p=jalview.git diff --git a/src/jalview/appletgui/IdCanvas.java b/src/jalview/appletgui/IdCanvas.java index 7f9eba9..5204094 100755 --- a/src/jalview/appletgui/IdCanvas.java +++ b/src/jalview/appletgui/IdCanvas.java @@ -56,7 +56,8 @@ public class IdCanvas extends Panel 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(); @@ -88,7 +89,7 @@ public class IdCanvas extends Panel ((i - starty) * charHeight) + ypos + charHeight - (charHeight / 5)); - if (av.hasHiddenRows() && av.getShowHiddenMarkers()) + if (hiddenRows) { drawMarker(i, starty, ypos); } @@ -199,6 +200,10 @@ public class IdCanvas extends Panel 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(); @@ -227,7 +232,6 @@ public class IdCanvas extends Panel 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) @@ -237,11 +241,11 @@ public class IdCanvas extends Panel 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) @@ -267,7 +271,7 @@ public class IdCanvas extends Panel } gg.setFont(italic); // boolean isrep=false; - if (av.isDisplayReferenceSeq() || av.hasHiddenRows()) + if (doHiddenCheck) { // isrep = setHiddenFont(seq); @@ -302,7 +306,7 @@ public class IdCanvas extends Panel (((i - starty) * avcharHeight) + avcharHeight) - (avcharHeight / 5)); - if (av.hasHiddenRows() && av.getShowHiddenMarkers()) + if (hiddenRows) { drawMarker(i, starty, 0); }