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
memory monitor, garbage collection and changed menu item for groovy console opening
[jalview.git]
/
src
/
jalview
/
gui
/
AnnotationLabels.java
diff --git
a/src/jalview/gui/AnnotationLabels.java
b/src/jalview/gui/AnnotationLabels.java
index
a0648c7
..
c0b8022
100755
(executable)
--- a/
src/jalview/gui/AnnotationLabels.java
+++ b/
src/jalview/gui/AnnotationLabels.java
@@
-147,7
+147,6
@@
public class AnnotationLabels
*/
public void actionPerformed(ActionEvent evt)
{
*/
public void actionPerformed(ActionEvent evt)
{
- int dif = 0;
AlignmentAnnotation[] aa = ap.av.alignment.getAlignmentAnnotation();
if (evt.getActionCommand().equals(ADDNEW))
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);
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))
{
}
else if (evt.getActionCommand().equals(EDITNAME))
{
@@
-181,13
+176,10
@@
public class AnnotationLabels
{
ap.av.quality = null;
}
{
ap.av.quality = null;
}
-
- dif = aa[selectedRow].height * -1;
}
else if (evt.getActionCommand().equals(DELETE))
{
ap.av.alignment.deleteAnnotation(aa[selectedRow]);
}
else if (evt.getActionCommand().equals(DELETE))
{
ap.av.alignment.deleteAnnotation(aa[selectedRow]);
- dif = aa[selectedRow].height * -1;
}
else if (evt.getActionCommand().equals(SHOWALL))
{
}
else if (evt.getActionCommand().equals(SHOWALL))
{
@@
-195,7
+187,6
@@
public class AnnotationLabels
{
if (!aa[i].visible && aa[i].annotations!=null)
{
{
if (!aa[i].visible && aa[i].annotations!=null)
{
- dif += aa[i].height;
aa[i].visible = true;
}
}
aa[i].visible = true;
}
}
@@
-378,7
+369,9
@@
public class AnnotationLabels
if (aa.description != null && !aa.description.equals("New description"))
{
if (aa.description != null && !aa.description.equals("New description"))
{
- desc.append(aa.description+"<br>");
+ desc.append(aa.description);
+ if(aa.hasScore)
+ desc.append("<br>");
}
if(aa.hasScore())
{
}
if(aa.hasScore())
{
@@
-410,20
+403,19
@@
public class AnnotationLabels
AlignmentAnnotation[] aa = ap.av.alignment.getAlignmentAnnotation();
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))
{
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());
item.addActionListener(this);
pop.add(item);
pop.show(this, evt.getX(), evt.getY());
-
return;
}
return;
}
- JPopupMenu pop = new JPopupMenu("Annotations");
- JMenuItem item = new JMenuItem(ADDNEW);
- item.addActionListener(this);
pop.add(item);
item = new JMenuItem(EDITNAME);
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
item.addActionListener(this);
pop.add(item);
// annotation object should be typed
- if (aa[selectedRow] == ap.av.consensus)
+ if (selectedRow<aa.length && aa[selectedRow] == ap.av.consensus)
{
pop.addSeparator();
final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
{
pop.addSeparator();
final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(