X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FSeqCanvas.java;h=d73ee70a04c4b4e92c1c9d55b53f6e6b0b21ca85;hb=61a4ffb7cfd54b95c16bd78c14f4e86d2a7b037e;hp=690c048c3e7a4c9675350b2eee0feb916badae3b;hpb=a8f483d04205bb8273ee311c12968b7e86d205fa;p=jalview.git diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 690c048..d73ee70 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -6,23 +6,36 @@ * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.gui; -import java.awt.*; -import java.awt.image.*; -import javax.swing.*; +import jalview.datamodel.AlignmentI; +import jalview.datamodel.SearchResults; +import jalview.datamodel.SequenceGroup; +import jalview.datamodel.SequenceI; -import jalview.datamodel.*; +import java.awt.BasicStroke; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.RenderingHints; +import java.awt.Shape; +import java.awt.image.BufferedImage; + +import javax.swing.JComponent; /** * DOCUMENT ME! @@ -245,16 +258,11 @@ public class SeqCanvas extends JComponent */ public void fastPaint(int horizontal, int vertical) { - if (fastpainting) + if (fastpainting || gg == null) { return; } fastpainting = true; - if (gg == null) - { - return; - } - fastPaint = true; gg.copyArea(horizontal * av.charWidth, vertical * av.charHeight, @@ -573,7 +581,7 @@ public class SeqCanvas extends JComponent annotations = new AnnotationPanel(av); } - annotations.renderer.drawComponent(annotations, av, (Graphics2D) g, + annotations.renderer.drawComponent(annotations, av, g, -1, startRes, endx + 1); g.translate(0, -cHeight - ypos - 3); } @@ -761,7 +769,7 @@ public class SeqCanvas extends JComponent if ((group == null) && (av.getAlignment().getGroups().size() > 0)) { - group = (SequenceGroup) av.getAlignment().getGroups().get(0); + group = av.getAlignment().getGroups().get(0); groupIndex = 0; } @@ -922,7 +930,7 @@ public class SeqCanvas extends JComponent break; } - group = (SequenceGroup) av.getAlignment().getGroups() + group = av.getAlignment().getGroups() .get(groupIndex); } while (groupIndex < av.getAlignment().getGroups().size());