import jalview.datamodel.SequenceI;
import jalview.renderer.AnnotationRenderer;
import jalview.renderer.AwtRenderPanelI;
+import jalview.schemes.ResidueProperties;
import jalview.util.Comparison;
import jalview.util.MessageManager;
StringBuilder text = new StringBuilder();
text.append(MessageManager.getString("label.column")).append(" ")
.append(column + 1);
- if (aa[row].annotations[column].description != null)
+ String description = aa[row].annotations[column].description;
+ if (description != null && description.length() > 0)
{
- text.append(" ").append(aa[row].annotations[column].description);
+ text.append(" ").append(description);
}
/*
char residue = seqref.getCharAt(column);
if (!Comparison.isGap(residue))
{
+ text.append(" ");
+ String name;
+ if (av.getAlignment().isNucleotide())
+ {
+ name = ResidueProperties.nucleotideName.get(String
+ .valueOf(residue));
+ text.append(" Nucleotide: ").append(
+ name != null ? name : residue);
+ }
+ else
+ {
+ name = 'X' == residue ? "X" : ('*' == residue ? "STOP"
+ : ResidueProperties.aa2Triplet.get(String
+ .valueOf(residue)));
+ text.append(" Residue: ").append(
+ name != null ? name : residue);
+ }
int residuePos = seqref.findPosition(column);
- text.append(": ").append(residue).append(" (")
- .append(residuePos).append(")");
+ text.append(" (").append(residuePos).append(")");
+ // int residuePos = seqref.findPosition(column);
+ // text.append(residue).append(" (")
+ // .append(residuePos).append(")");
}
}
}
import jalview.datamodel.SequenceI;
import jalview.renderer.AnnotationRenderer;
import jalview.renderer.AwtRenderPanelI;
+import jalview.schemes.ResidueProperties;
import jalview.util.Comparison;
import jalview.util.MessageManager;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import java.awt.image.BufferedImage;
+import java.util.Collections;
+import java.util.List;
import javax.swing.JColorChooser;
import javax.swing.JMenuItem;
String last = "";
ColumnSelection viscols = av.getColumnSelection();
// TODO: refactor and save av.getColumnSelection for efficiency
- for (int index : viscols.getSelected())
+ List<Integer> selected = viscols.getSelected();
+ Collections.sort(selected);
+ for (int index : selected)
{
// always check for current display state - just in case
if (!viscols.isVisible(index))
char residue = seqref.getCharAt(column);
if (!Comparison.isGap(residue))
{
+ text.append(" ");
+ String name;
+ if (av.getAlignment().isNucleotide())
+ {
+ name = ResidueProperties.nucleotideName.get(String
+ .valueOf(residue));
+ text.append(" Nucleotide: ").append(
+ name != null ? name : residue);
+ }
+ else
+ {
+ name = 'X' == residue ? "X" : ('*' == residue ? "STOP"
+ : ResidueProperties.aa2Triplet.get(String
+ .valueOf(residue)));
+ text.append(" Residue: ").append(name != null ? name : residue);
+ }
int residuePos = seqref.findPosition(column);
- text.append(": ").append(residue).append(" (")
- .append(residuePos).append(")");
+ text.append(" (").append(residuePos).append(")");
}
}
}