X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FAnnotationLabels.java;h=c0b80220630010b800ed272611a32a0d6ecbaf46;hb=4f90c01f2b85f6c042ddba89e4dacb8cc2f86881;hp=a0648c7106a5facf93624f248eda8ae85ce04f69;hpb=6861625df35505461021e2bccda7d0b4ef0e25f8;p=jalview.git
diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java
index a0648c7..c0b8022 100755
--- a/src/jalview/gui/AnnotationLabels.java
+++ b/src/jalview/gui/AnnotationLabels.java
@@ -147,7 +147,6 @@ public class AnnotationLabels
*/
public void actionPerformed(ActionEvent evt)
{
- int dif = 0;
AlignmentAnnotation[] aa = ap.av.alignment.getAlignmentAnnotation();
if (evt.getActionCommand().equals(ADDNEW))
@@ -163,10 +162,6 @@ public class AnnotationLabels
ap.av.alignment.addAnnotation(newAnnotation);
ap.av.alignment.setAnnotationIndex(newAnnotation, 0);
- if (aa != null)
- {
- dif = aa[aa.length - 1].height;
- }
}
else if (evt.getActionCommand().equals(EDITNAME))
{
@@ -181,13 +176,10 @@ public class AnnotationLabels
{
ap.av.quality = null;
}
-
- dif = aa[selectedRow].height * -1;
}
else if (evt.getActionCommand().equals(DELETE))
{
ap.av.alignment.deleteAnnotation(aa[selectedRow]);
- dif = aa[selectedRow].height * -1;
}
else if (evt.getActionCommand().equals(SHOWALL))
{
@@ -195,7 +187,6 @@ public class AnnotationLabels
{
if (!aa[i].visible && aa[i].annotations!=null)
{
- dif += aa[i].height;
aa[i].visible = true;
}
}
@@ -378,7 +369,9 @@ public class AnnotationLabels
if (aa.description != null && !aa.description.equals("New description"))
{
- desc.append(aa.description+"
");
+ desc.append(aa.description);
+ if(aa.hasScore)
+ desc.append("
");
}
if(aa.hasScore())
{
@@ -410,20 +403,19 @@ public class AnnotationLabels
AlignmentAnnotation[] aa = ap.av.alignment.getAlignmentAnnotation();
+ JPopupMenu pop = new JPopupMenu("Annotations");
+ JMenuItem item = new JMenuItem(ADDNEW);
+ item.addActionListener(this);
+
if ( (aa == null) || (aa.length == 0))
{
- JPopupMenu pop = new JPopupMenu("Annotations");
- JMenuItem item = new JMenuItem(ADDNEW);
+ item = new JMenuItem(SHOWALL);
item.addActionListener(this);
pop.add(item);
pop.show(this, evt.getX(), evt.getY());
-
return;
}
- JPopupMenu pop = new JPopupMenu("Annotations");
- JMenuItem item = new JMenuItem(ADDNEW);
- item.addActionListener(this);
pop.add(item);
item = new JMenuItem(EDITNAME);
item.addActionListener(this);
@@ -441,7 +433,7 @@ public class AnnotationLabels
item.addActionListener(this);
pop.add(item);
// annotation object should be typed
- if (aa[selectedRow] == ap.av.consensus)
+ if (selectedRow