X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FIdCanvas.java;h=ac82e12a36e8925fd8478c825e4e2bfc3c05cf6d;hb=7bc226b58110fa26d9dbd3f0c78095d06909ffc3;hp=a1bc8732a64dad55ee57f70331d5d6e1a9dbfb25;hpb=dd74fc4938723fe5ec48d4e5fdcfbe58ac42a48d;p=jalview.git diff --git a/src/jalview/appletgui/IdCanvas.java b/src/jalview/appletgui/IdCanvas.java index a1bc873..ac82e12 100755 --- a/src/jalview/appletgui/IdCanvas.java +++ b/src/jalview/appletgui/IdCanvas.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -54,7 +54,7 @@ public class IdCanvas if (searchResults != null && searchResults.contains(s)) { gg.setColor(Color.black); - gg.fillRect(0, ((i - starty) * charHeight) + ypos, + gg.fillRect(0, ( (i - starty) * charHeight) + ypos, getSize().width, charHeight); gg.setColor(Color.white); } @@ -62,25 +62,26 @@ public class IdCanvas av.getSelectionGroup().getSequences(null).contains(s)) { gg.setColor(Color.lightGray); - gg.fillRect(0, ((i - starty) * charHeight) + ypos, + gg.fillRect(0, ( (i - starty) * charHeight) + ypos, getSize().width, charHeight); gg.setColor(Color.white); } else { gg.setColor(av.getSequenceColour(s)); - gg.fillRect(0, ((i - starty) * charHeight) + ypos, + gg.fillRect(0, ( (i - starty) * charHeight) + ypos, getSize().width, charHeight); gg.setColor(Color.black); } - - gg.drawString( s.getDisplayId(av.getShowJVSuffix()), 0, - ((i - starty) * charHeight) + ypos + + gg.drawString(s.getDisplayId(av.getShowJVSuffix()), 0, + ( (i - starty) * charHeight) + ypos + charHeight - (charHeight / 5)); if (av.hasHiddenRows && av.showHiddenMarkers) - drawMarker(i, starty, ypos); + { + drawMarker(i, starty, ypos); + } } @@ -186,7 +187,9 @@ public class IdCanvas int alheight = av.alignment.getHeight(); if (av.hasHiddenColumns) + { maxwidth = av.getColumnSelection().findColumnPosition(maxwidth) - 1; + } int annotationHeight = 0; AnnotationLabels labels = null; @@ -200,7 +203,9 @@ public class IdCanvas int hgap = av.charHeight; if (av.scaleAboveWrapped) + { hgap += av.charHeight; + } int cHeight = alheight * av.charHeight + hgap @@ -220,7 +225,9 @@ public class IdCanvas setHiddenFont(i); } else + { gg.setFont(italic); + } SequenceI s = av.alignment.getSequenceAt(i); drawIdString(gg, s, i, 0, ypos); @@ -249,8 +256,10 @@ public class IdCanvas } seq = av.alignment.getSequenceAt(i); - if(seq==null) + if (seq == null) + { continue; + } // Selected sequence colours if ( (searchResults != null) && @@ -267,7 +276,7 @@ public class IdCanvas } else { - currentColor = av.getSequenceColour(seq); + currentColor = av.getSequenceColour(seq); currentTextColor = Color.black; } @@ -278,14 +287,15 @@ public class IdCanvas gg.setColor(currentTextColor); - gg.drawString(seq.getDisplayId(av.getShowJVSuffix()), 0, ( ( (i - starty) * av.charHeight) + av.charHeight) - (av.charHeight / 5)); if (av.hasHiddenRows && av.showHiddenMarkers) + { drawMarker(i, starty, 0); + } } } } @@ -298,7 +308,7 @@ public class IdCanvas void drawMarker(int i, int starty, int yoffset) { - SequenceI [] hseqs = av.alignment.getHiddenSequences().hiddenSequences; + SequenceI[] hseqs = av.alignment.getHiddenSequences().hiddenSequences; //Use this method here instead of calling hiddenSeq adjust //3 times. int hSize = hseqs.length; @@ -310,59 +320,64 @@ public class IdCanvas boolean below = (hiddenIndex > lastIndex + 1); boolean above = (nextIndex > hiddenIndex + 1); - - - for(int j=0; j