From: jprocter Date: Tue, 5 Jul 2011 14:22:38 +0000 (+0100) Subject: Revert "partial patch for JAL-411 - text rendered above features" X-Git-Tag: Release_2_7~147 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3e62000c93de12ce4e4a2282d8f020e21a278292;p=jalview.git Revert "partial patch for JAL-411 - text rendered above features" This reverts commit 8f050c10c0bd044493b7537b6c6d119c7c29c986. --- diff --git a/src/jalview/appletgui/SeqCanvas.java b/src/jalview/appletgui/SeqCanvas.java index 1452bb7..fd9d768 100755 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@ -581,17 +581,14 @@ public class SeqCanvas extends Panel { continue; } - // draw box background, possibly with sequence label. + sr.drawSequence(nextSeq, av.alignment.findAllGroups(nextSeq), - startRes, endRes, offset + ((i - startSeq) * av.charHeight), true, !av.showSequenceFeatures); - + startRes, endRes, offset + ((i - startSeq) * av.charHeight)); + if (av.showSequenceFeatures) { fr.drawSequence(g, nextSeq, startRes, endRes, offset + ((i - startSeq) * av.charHeight)); - // draw sequence label - sr.drawSequence(nextSeq, av.alignment.findAllGroups(nextSeq), - startRes, endRes, offset + ((i - startSeq) * av.charHeight), false, true); } // / Highlight search Results once all sequences have been drawn diff --git a/src/jalview/appletgui/SequenceRenderer.java b/src/jalview/appletgui/SequenceRenderer.java index b6eeba3..0215e55 100755 --- a/src/jalview/appletgui/SequenceRenderer.java +++ b/src/jalview/appletgui/SequenceRenderer.java @@ -103,19 +103,8 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer return resBoxColour; } - /** - * draw coloured sequence to the current graphics cursor - * @param seq - * @param sg - * @param start - * @param end - * @param y1 - * @param drawBox - draw background - * @param drawText - draw text (if shading style permits) - */ - public void drawSequence(SequenceI seq, SequenceGroup[] sg, int start, - int end, int y1, boolean drawBox, boolean drawText) + int end, int y1) { if (seq == null) { @@ -123,11 +112,10 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer } allGroups = sg; - if (drawBox) { - drawBoxes(seq, start, end, y1); - } - if (av.validCharWidth && drawText) + drawBoxes(seq, start, end, y1); + + if (av.validCharWidth) { drawText(seq, start, end, y1); } diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index c8a6a75..f625838 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -697,17 +697,13 @@ public class SeqCanvas extends JComponent // empty continue; } - // draw box background, possibly with sequence label. sr.drawSequence(nextSeq, av.alignment.findAllGroups(nextSeq), - startRes, endRes, offset + ((i - startSeq) * av.charHeight), true, !av.showSequenceFeatures); - + startRes, endRes, offset + ((i - startSeq) * av.charHeight)); + if (av.showSequenceFeatures) { fr.drawSequence(g, nextSeq, startRes, endRes, offset + ((i - startSeq) * av.charHeight)); - // draw sequence label - sr.drawSequence(nextSeq, av.alignment.findAllGroups(nextSeq), - startRes, endRes, offset + ((i - startSeq) * av.charHeight), false, true); } // / Highlight search Results once all sequences have been drawn diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index f2eae2a..b15851c 100755 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@ -125,25 +125,35 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer } /** - * draw coloured sequence to the current graphics cursor + * DOCUMENT ME! + * + * @param g + * DOCUMENT ME! * @param seq + * DOCUMENT ME! * @param sg + * DOCUMENT ME! * @param start + * DOCUMENT ME! * @param end + * DOCUMENT ME! + * @param x1 + * DOCUMENT ME! * @param y1 - * @param drawBox - draw background - * @param drawText - draw text (if shading style permits) + * DOCUMENT ME! + * @param width + * DOCUMENT ME! + * @param height + * DOCUMENT ME! */ public void drawSequence(SequenceI seq, SequenceGroup[] sg, int start, - int end, int y1, boolean drawBox, boolean drawText) + int end, int y1) { allGroups = sg; - if (drawBox) { - drawBoxes(seq, start, end, y1); - } + drawBoxes(seq, start, end, y1); - if (av.validCharWidth && drawText) + if (av.validCharWidth) { drawText(seq, start, end, y1); }