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
patch for JAL-572
[jalview.git]
/
src
/
jalview
/
appletgui
/
AnnotationPanel.java
diff --git
a/src/jalview/appletgui/AnnotationPanel.java
b/src/jalview/appletgui/AnnotationPanel.java
index
15b590e
..
982d3ec
100755
(executable)
--- a/
src/jalview/appletgui/AnnotationPanel.java
+++ b/
src/jalview/appletgui/AnnotationPanel.java
@@
-1,5
+1,5
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5.1)
* Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
* Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
*
* This file is part of Jalview.
@@
-104,6
+104,10
@@
public class AnnotationPanel extends Panel implements AdjustmentListener,
public void actionPerformed(ActionEvent evt)
{
AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();
public void actionPerformed(ActionEvent evt)
{
AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation();
+ if (aa==null)
+ {
+ return;
+ }
Annotation[] anot = aa[activeRow].annotations;
if (anot.length < av.getColumnSelection().getMax())
Annotation[] anot = aa[activeRow].annotations;
if (anot.length < av.getColumnSelection().getMax())
@@
-322,13
+326,18
@@
public class AnnotationPanel extends Panel implements AdjustmentListener,
graphStretch = -1;
graphStretchY = -1;
mouseDragging = false;
graphStretch = -1;
graphStretchY = -1;
mouseDragging = false;
+ if (needValidating)
+ {
+ ap.validate();
+ needValidating=false;
+ }
ap.scalePanel.mouseReleased(evt);
}
public void mouseClicked(MouseEvent evt)
{
}
ap.scalePanel.mouseReleased(evt);
}
public void mouseClicked(MouseEvent evt)
{
}
-
+ boolean needValidating=false;
public void mouseDragged(MouseEvent evt)
{
if (graphStretch > -1)
public void mouseDragged(MouseEvent evt)
{
if (graphStretch > -1)
@@
-341,6
+350,7
@@
public class AnnotationPanel extends Panel implements AdjustmentListener,
}
graphStretchY = evt.getY();
adjustPanelHeight();
}
graphStretchY = evt.getY();
adjustPanelHeight();
+ needValidating=true;
ap.paintAlignment(true);
}
else
ap.paintAlignment(true);
}
else
@@
-443,13
+453,11
@@
public class AnnotationPanel extends Panel implements AdjustmentListener,
height += aa[i].height;
}
}
height += aa[i].height;
}
}
- else
+ if (height==0)
{
height = 20;
}
{
height = 20;
}
-
this.setSize(getSize().width, height);
this.setSize(getSize().width, height);
-
repaint();
return height;
repaint();
return height;