import jalview.schemes.ResidueProperties;
import jalview.util.Comparison;
import jalview.util.MessageManager;
+import jalview.util.Platform;
import java.awt.Color;
import java.awt.Dimension;
public AnnotationPanel(AlignmentPanel ap)
{
- MAC = new jalview.util.Platform().isAMac();
+ new jalview.util.Platform();
+ MAC = Platform.isAMac();
this.ap = ap;
av = ap.av;
setLayout(null);
else if (evt.getActionCommand().equals(STEM))
{
type = 'S';
- symbol = "\u03C3";
+ int column = av.getColumnSelection().getSelectedRanges().get(0)[0];
+ symbol = aa[activeRow].getDefaultRnaHelixSymbol(column);
}
if (!aa[activeRow].hasIcons)
if ((evt.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK
&& activeRow != -1)
{
- if (av.getColumnSelection() == null)
+ if (av.getColumnSelection() == null
+ || av.getColumnSelection().isEmpty())
{
return;
}
PopupMenu pop = new PopupMenu(
MessageManager.getString("label.structure_type"));
MenuItem item;
- /*
- * Just display the needed structure options
- */
- if (av.getAlignment().isNucleotide() == true)
+
+ if (av.getAlignment().isNucleotide())
{
item = new MenuItem(STEM);
item.addActionListener(this);