Vector activeRes;
- static String HELIX = "Helix";
+ final String HELIX = "Helix";
- static String SHEET = "Sheet";
+ final String SHEET = "Sheet";
+
+ /**
+ * For RNA secondary structure "stems" aka helices
+ */
+ final String STEM = "RNA Helix";
- static String LABEL = "Label";
+ final String LABEL = "Label";
- static String REMOVE = "Remove Annotation";
+ final String REMOVE = "Remove Annotation";
- static String COLOUR = "Colour";
+ final String COLOUR = "Colour";
- static Color HELIX_COLOUR = Color.red.darker();
+ final Color HELIX_COLOUR = Color.red.darker();
- static Color SHEET_COLOUR = Color.green.darker().darker();
+ final Color SHEET_COLOUR = Color.green.darker().darker();
Image image;
symbol = "\u03B2";
}
+ // Added by LML to color stems
+ else if (evt.getActionCommand().equals(STEM))
+ {
+ type = 'S';
+ symbol = "\u03C3";
+ }
+
if (!aa[activeRow].hasIcons)
{
aa[activeRow].hasIcons = true;
}
PopupMenu pop = new PopupMenu("Structure type");
- MenuItem item = new MenuItem(HELIX);
- item.addActionListener(this);
- pop.add(item);
- item = new MenuItem(SHEET);
- item.addActionListener(this);
- pop.add(item);
+ MenuItem item;
+ /*
+ * Just display the needed structure options
+ */
+ if (av.getAlignment().isNucleotide() == true)
+ {
+ item = new MenuItem(STEM);
+ item.addActionListener(this);
+ pop.add(item);
+ } else {
+ item = new MenuItem(HELIX);
+ item.addActionListener(this);
+ pop.add(item);
+ item = new MenuItem(SHEET);
+ item.addActionListener(this);
+ pop.add(item);
+ }
item = new MenuItem(LABEL);
item.addActionListener(this);
pop.add(item);