X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAnnotationColumnChooser.java;h=a8dff62e59045a0abb18408d4bda11ac2d0709c3;hb=4762b29420ed4df01b55a8afe5ab05467aaf41a9;hp=5cd95b63ecc7d3720d2beab4b279d3808842be2a;hpb=db4eacee27b836db4126dca551887bfc6652d72a;p=jalview.git diff --git a/src/jalview/appletgui/AnnotationColumnChooser.java b/src/jalview/appletgui/AnnotationColumnChooser.java index 5cd95b6..a8dff62 100644 --- a/src/jalview/appletgui/AnnotationColumnChooser.java +++ b/src/jalview/appletgui/AnnotationColumnChooser.java @@ -49,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; @@ -135,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); @@ -241,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); @@ -273,6 +278,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements this.validate(); } + @Override @SuppressWarnings("unchecked") public void reset() { @@ -302,6 +308,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements } + @Override public void adjustmentValueChanged(AdjustmentEvent evt) { if (!adjusting) @@ -343,6 +350,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements }); } + @Override public void valueChanged(boolean updateAllAnnotation) { if (slider.isEnabled()) @@ -866,6 +874,7 @@ public class AnnotationColumnChooser extends AnnotationRowFilter implements } } + @Override public void actionPerformed(ActionEvent evt) { if (evt.getSource() == thresholdValue)