X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationPanel.java;h=b8d35dc7bedb7d6427409d5cbf9a13d74ca2dc23;hb=12d96b44faa3d26fa4f75212d371be69e1ed1199;hp=5c6bcf4d35f144595db04d0cbf9c279706668f92;hpb=7535505ef73485ad43881cb72a6c52cfb0033c63;p=jalview.git diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index 5c6bcf4..b8d35dc 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -29,6 +29,9 @@ public class AnnotationPanel extends JPanel implements MouseListener, MouseMotio FontMetrics fm; int imgWidth=0; + boolean fastPaint = false; + + public static int GRAPH_HEIGHT = 40; @@ -69,7 +72,7 @@ public class AnnotationPanel extends JPanel implements MouseListener, MouseMotio aa[i].height += 16; if (aa[i].isGraph) - aa[i].height += 50; + aa[i].height += GRAPH_HEIGHT; if(aa[i].height==0) aa[i].height = 20; @@ -309,7 +312,14 @@ public class AnnotationPanel extends JPanel implements MouseListener, MouseMotio int res = evt.getX() / av.getCharWidth() + av.getStartRes(); if(row>-1 && res0) { - int charOffset = (av.charWidth - - fm.charWidth(row.annotations[j].displayCharacter. - charAt(0))) / 2; + int charOffset = (av.charWidth - fm.charWidth(row.annotations[j].displayCharacter.charAt(0)))/2; g.setColor( row.annotations[j].colour); if(j==0) { @@ -488,7 +512,7 @@ public class AnnotationPanel extends JPanel implements MouseListener, MouseMotio if (validRes && row.isGraph) { g.setColor(new Color(0,0,180)); - int height = (int)((row.annotations[j].value / row.graphMax)*50); + int height = (int)((row.annotations[j].value / row.graphMax)*GRAPH_HEIGHT); if(row.windowLength>1) { @@ -502,10 +526,10 @@ public class AnnotationPanel extends JPanel implements MouseListener, MouseMotio } total/=row.windowLength; - height = (int)( (total / row.graphMax) *50); + height = (int)( (total / row.graphMax) *GRAPH_HEIGHT); } - + g.setColor(row.annotations[j].colour); g.fillRect(x, y-height, av.charWidth, height ); } @@ -556,7 +580,7 @@ public class AnnotationPanel extends JPanel implements MouseListener, MouseMotio for(int j=0; j