X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAnnotationColumnChooser.java;h=a8dff62e59045a0abb18408d4bda11ac2d0709c3;hb=34d5dfb25731d7d797177cadfce954258ae90991;hp=0375de247676a04af22853f8bb2a3b3602c60ab6;hpb=65a810f2dd78c44eef0f06bc0afbe3ad3e891848;p=jalview.git
diff --git a/src/jalview/appletgui/AnnotationColumnChooser.java b/src/jalview/appletgui/AnnotationColumnChooser.java
index 0375de2..a8dff62 100644
--- a/src/jalview/appletgui/AnnotationColumnChooser.java
+++ b/src/jalview/appletgui/AnnotationColumnChooser.java
@@ -1,3 +1,23 @@
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see .
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
package jalview.appletgui;
import jalview.datamodel.AlignmentAnnotation;
@@ -29,7 +49,7 @@ import java.awt.event.TextListener;
import java.util.Iterator;
import java.util.Vector;
-import javax.swing.JPanel;
+//import javax.swing.JPanel;
//import net.miginfocom.swing.MigLayout;
@@ -115,17 +135,22 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
slider.addAdjustmentListener(this);
slider.addMouseListener(this);
- if (av.getAlignment().getAlignmentAnnotation() == null)
+ AlignmentAnnotation[] anns = av.getAlignment().getAlignmentAnnotation();
+ if (anns == null)
{
return;
}
setOldColumnSelection(av.getColumnSelection());
adjusting = true;
- Vector list = new Vector();
+ Vector list = new Vector();
int index = 1;
- for (int i = 0; i < av.getAlignment().getAlignmentAnnotation().length; i++)
+ for (int i = 0; i < anns.length; i++)
{
- String label = av.getAlignment().getAlignmentAnnotation()[i].label;
+ String label = anns[i].label;
+ if (anns[i].sequenceRef != null)
+ {
+ label = label + "_" + anns[i].sequenceRef.getName();
+ }
if (!list.contains(label))
{
list.addElement(label);
@@ -221,7 +246,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
actionPanel.add(ok);
actionPanel.add(cancel);
- JPanel staticPanel = new JPanel();
+ Panel staticPanel = new Panel();
staticPanel.setLayout(new BorderLayout());
staticPanel.setBackground(Color.white);
@@ -253,6 +278,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
this.validate();
}
+ @Override
@SuppressWarnings("unchecked")
public void reset()
{
@@ -282,6 +308,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
}
+ @Override
public void adjustmentValueChanged(AdjustmentEvent evt)
{
if (!adjusting)
@@ -323,6 +350,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
});
}
+ @Override
public void valueChanged(boolean updateAllAnnotation)
{
if (slider.isEnabled())
@@ -569,8 +597,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
updateView();
}
- public class FurtherActionPanel extends Panel implements
- ItemListener
+ public class FurtherActionPanel extends Panel implements ItemListener
{
private AnnotationColumnChooser aColChooser;
@@ -783,7 +810,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
});
- displayName.setLabel(MessageManager.getString("label.display_name"));
+ displayName.setLabel(MessageManager.getString("label.label"));
displayName.setEnabled(false);
displayName.addItemListener(this);
@@ -847,6 +874,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements
}
}
+ @Override
public void actionPerformed(ActionEvent evt)
{
if (evt.getSource() == thresholdValue)