X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationPanel.java;h=77f557bff87a4a488d7e50e8b6171a2a7db2c4ee;hb=b8ad1d6974a31bce823c3d7ac2f49d07f0a0c061;hp=f14b199a99859ba9166f9205472d5532aae9fdb0;hpb=c3162a6dd5f226c743bce629cf125a17c9b67711;p=jalview.git diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index f14b199..77f557b 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -31,6 +31,8 @@ public class AnnotationPanel extends JPanel implements MouseListener, MouseMotio boolean fastPaint = false; + public static int GRAPH_HEIGHT = 40; + public AnnotationPanel(AlignmentPanel ap) @@ -70,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; @@ -310,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) { @@ -497,7 +509,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) { @@ -511,10 +523,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 ); } @@ -565,7 +577,7 @@ public class AnnotationPanel extends JPanel implements MouseListener, MouseMotio for(int j=0; j