git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Scrolls if dragged off the screen
[jalview.git]
/
src
/
jalview
/
appletgui
/
AnnotationPanel.java
diff --git
a/src/jalview/appletgui/AnnotationPanel.java
b/src/jalview/appletgui/AnnotationPanel.java
index
92ee3a2
..
cb638dd
100755
(executable)
--- a/
src/jalview/appletgui/AnnotationPanel.java
+++ b/
src/jalview/appletgui/AnnotationPanel.java
@@
-206,8
+206,6
@@
public class AnnotationPanel
\r
public void paint(Graphics g)
\r
{
\r
\r
public void paint(Graphics g)
\r
{
\r
- g.setColor(Color.white);
\r
- g.fillRect(0,0, getSize().width, getSize().height);
\r
imgWidth = (av.endRes - av.startRes + 1) * av.charWidth;
\r
\r
if (image == null || imgWidth != image.getWidth(this))
\r
imgWidth = (av.endRes - av.startRes + 1) * av.charWidth;
\r
\r
if (image == null || imgWidth != image.getWidth(this))
\r
@@
-389,8
+387,8
@@
public class AnnotationPanel
y + iconOffset + 3);
\r
}
\r
else if (((row.annotations[j - 1] == null) ||
\r
y + iconOffset + 3);
\r
}
\r
else if (((row.annotations[j - 1] == null) ||
\r
- (row.annotations[j].displayCharacter != row.annotations[j -
\r
- 1].displayCharacter)))
\r
+ (!row.annotations[j].displayCharacter.equals(
\r
+ row.annotations[j - 1].displayCharacter))))
\r
{
\r
g.drawString(row.annotations[j].displayCharacter, x+charOffset,
\r
y + iconOffset + 3);
\r
{
\r
g.drawString(row.annotations[j].displayCharacter, x+charOffset,
\r
y + iconOffset + 3);
\r
@@
-582,13
+580,6
@@
public class AnnotationPanel
g.drawLine(x-av.charWidth,y2,(eRes-sRes)*av.charWidth,y2);
\r
\r
\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
- g.drawLine(x-av.charWidth,y2,(eRes-sRes)*av.charWidth,y2);
\r
- }
\r
-
\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
@@
-602,6
+593,15
@@
public class AnnotationPanel
g.drawLine(x-av.charWidth/2, y1, x+av.charWidth/2, y2);
\r
x += av.charWidth;
\r
}
\r
g.drawLine(x-av.charWidth/2, y1, x+av.charWidth/2, y2);
\r
x += av.charWidth;
\r
}
\r
+
\r
+
\r
+ if(aa.threshold!=null)
\r
+ {
\r
+ g.setColor(aa.threshold.colour);
\r
+ y2 = (int)(y - ((aa.threshold.value-min) / range)*aa.graphHeight);
\r
+ g.drawLine(0,y2,(eRes-sRes)*av.charWidth,y2);
\r
+ }
\r
+
\r
}
\r
\r
public void drawBarGraph(Graphics g, AlignmentAnnotation aa,
\r
}
\r
\r
public void drawBarGraph(Graphics g, AlignmentAnnotation aa,
\r
@@
-619,13
+619,6
@@
public class AnnotationPanel
\r
float range = max - min;
\r
\r
\r
float range = max - min;
\r
\r
- if(aa.threshold!=null)
\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)*av.charWidth,y2);
\r
- }
\r
-
\r
y1 = y2 = y;
\r
\r
if(min<0)
\r
y1 = y2 = y;
\r
\r
if(min<0)
\r
@@
-633,7
+626,7
@@
public class AnnotationPanel
\r
g.setColor(Color.gray);
\r
\r
\r
g.setColor(Color.gray);
\r
\r
- g.drawLine(x,y2,(eRes-sRes+1)*av.charWidth,y2);
\r
+ g.drawLine(x,y2,(eRes-sRes)*av.charWidth,y2);
\r
\r
for (int j = sRes; j < eRes; j++)
\r
{
\r
\r
for (int j = sRes; j < eRes; j++)
\r
{
\r
@@
-655,6
+648,15
@@
public class AnnotationPanel
x += av.charWidth;
\r
}
\r
\r
x += av.charWidth;
\r
}
\r
\r
+
\r
+ if(aa.threshold!=null)
\r
+ {
\r
+ g.setColor(aa.threshold.colour);
\r
+ y2 = (int)(y - ((aa.threshold.value-min) / range)*aa.graphHeight);
\r
+ g.drawLine(0,y2,(eRes-sRes)*av.charWidth,y2);
\r
+ }
\r
+
\r
+
\r
}
\r
\r
// used by overview window
\r
}
\r
\r
// used by overview window
\r