git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a6ae2ce
)
Check endres when drawing graphs
author
amwaterhouse
<Andrew Waterhouse>
Thu, 16 Mar 2006 15:17:14 +0000
(15:17 +0000)
committer
amwaterhouse
<Andrew Waterhouse>
Thu, 16 Mar 2006 15:17:14 +0000
(15:17 +0000)
src/jalview/appletgui/AnnotationPanel.java
patch
|
blob
|
history
diff --git
a/src/jalview/appletgui/AnnotationPanel.java
b/src/jalview/appletgui/AnnotationPanel.java
index
4bc8ed5
..
92ee3a2
100755
(executable)
--- a/
src/jalview/appletgui/AnnotationPanel.java
+++ b/
src/jalview/appletgui/AnnotationPanel.java
@@
-556,6
+556,9
@@
public class AnnotationPanel
if(sRes>aa.annotations.length)
\r
return;
\r
\r
if(sRes>aa.annotations.length)
\r
return;
\r
\r
+
\r
+ eRes = Math.min(eRes, aa.annotations.length);
\r
+
\r
int x = 0;
\r
\r
//Adjustment for fastpaint to left
\r
int x = 0;
\r
\r
//Adjustment for fastpaint to left
\r
@@
-576,17
+579,16
@@
public class AnnotationPanel
y2 = (int)(y - (0-min / range)*graphHeight);
\r
\r
g.setColor(Color.gray);
\r
y2 = (int)(y - (0-min / range)*graphHeight);
\r
\r
g.setColor(Color.gray);
\r
- g.drawLine(x-av.charWidth,y2,(eRes-sRes+1)*av.charWidth,y2);
\r
+ g.drawLine(x-av.charWidth,y2,(eRes-sRes)*av.charWidth,y2);
\r
\r
\r
if(aa.threshold!=null)
\r
{
\r
g.setColor(aa.threshold.colour);
\r
y2 = (int)(y - ((aa.threshold.value-min) / range)*graphHeight);
\r
\r
\r
if(aa.threshold!=null)
\r
{
\r
g.setColor(aa.threshold.colour);
\r
y2 = (int)(y - ((aa.threshold.value-min) / range)*graphHeight);
\r
- g.drawLine(x-av.charWidth,y2,(eRes-sRes+1)*av.charWidth,y2);
\r
+ g.drawLine(x-av.charWidth,y2,(eRes-sRes)*av.charWidth,y2);
\r
}
\r
\r
}
\r
\r
- eRes = Math.min(eRes, aa.annotations.length);
\r
for (int j = sRes; j < eRes; j++)
\r
{
\r
if(aa.annotations[j]==null || aa.annotations[j-1]==null)
\r
for (int j = sRes; j < eRes; j++)
\r
{
\r
if(aa.annotations[j]==null || aa.annotations[j-1]==null)
\r
@@
-610,6
+612,9
@@
public class AnnotationPanel
if(sRes>aa.annotations.length)
\r
return;
\r
\r
if(sRes>aa.annotations.length)
\r
return;
\r
\r
+
\r
+ eRes = Math.min(eRes, aa.annotations.length);
\r
+
\r
int x=0, y1, y2;
\r
\r
float range = max - min;
\r
int x=0, y1, y2;
\r
\r
float range = max - min;
\r
@@
-618,7
+623,7
@@
public class AnnotationPanel
{
\r
g.setColor(aa.threshold.colour);
\r
y2 = (int)(y - ((aa.threshold.value-min) / range)*aa.graphHeight);
\r
{
\r
g.setColor(aa.threshold.colour);
\r
y2 = (int)(y - ((aa.threshold.value-min) / range)*aa.graphHeight);
\r
- g.drawLine(x-av.charWidth,y2,(eRes-sRes+1)*av.charWidth,y2);
\r
+ g.drawLine(x-av.charWidth,y2,(eRes-sRes)*av.charWidth,y2);
\r
}
\r
\r
y1 = y2 = y;
\r
}
\r
\r
y1 = y2 = y;
\r
@@
-630,9
+635,6
@@
public class AnnotationPanel
\r
g.drawLine(x,y2,(eRes-sRes+1)*av.charWidth,y2);
\r
\r
\r
g.drawLine(x,y2,(eRes-sRes+1)*av.charWidth,y2);
\r
\r
- eRes = Math.min(eRes, aa.annotations.length-1);
\r
-
\r
-
\r
for (int j = sRes; j < eRes; j++)
\r
{
\r
\r
for (int j = sRes; j < eRes; j++)
\r
{
\r
\r