X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FIdCanvas.java;h=37be8bc3e9a760a725a11733c3c24f4cbc07a9f6;hb=853624fb32058cccc544ae7d13af6ad4b0800b6c;hp=fe42e1e236fa16337bc97649fd130a01f99d190c;hpb=685909b39c1c85ff304ecea9763925de75b2cf77;p=jalview.git diff --git a/src/jalview/gui/IdCanvas.java b/src/jalview/gui/IdCanvas.java index fe42e1e..37be8bc 100755 --- a/src/jalview/gui/IdCanvas.java +++ b/src/jalview/gui/IdCanvas.java @@ -98,8 +98,7 @@ public class IdCanvas extends JPanel * DOCUMENT ME! */ public void drawIdString(Graphics2D gg, boolean hiddenRows, SequenceI s, - int i, int starty, - int ypos) + int i, int starty, int ypos) { int xPos = 0; int panelWidth = getWidth(); @@ -205,6 +204,7 @@ public class IdCanvas extends JPanel * @param g * DOCUMENT ME! */ + @Override public void paintComponent(Graphics g) { g.setColor(Color.white); @@ -453,11 +453,9 @@ public class IdCanvas extends JPanel if (below) { gg.fillPolygon( - new int[] - { getWidth() - av.getCharHeight(), - getWidth() - av.getCharHeight(), - getWidth() }, new int[] - { + new int[] { getWidth() - av.getCharHeight(), + getWidth() - av.getCharHeight(), getWidth() }, + new int[] { (i - starty) * av.getCharHeight() + yoffset, (i - starty) * av.getCharHeight() + yoffset + av.getCharHeight() / 4, @@ -466,11 +464,9 @@ public class IdCanvas extends JPanel if (above) { gg.fillPolygon( - new int[] - { getWidth() - av.getCharHeight(), - getWidth() - av.getCharHeight(), - getWidth() }, new int[] - { + new int[] { getWidth() - av.getCharHeight(), + getWidth() - av.getCharHeight(), getWidth() }, + new int[] { (i - starty + 1) * av.getCharHeight() + yoffset, (i - starty + 1) * av.getCharHeight() + yoffset - av.getCharHeight() / 4, @@ -484,7 +480,7 @@ public class IdCanvas extends JPanel Font bold = new Font(av.getFont().getName(), Font.BOLD, av.getFont() .getSize()); - if (av.isHiddenRepSequence(seq)) + if (av.isReferenceSeq(seq) || av.isHiddenRepSequence(seq)) { gg.setFont(bold); }