import jalview.renderer.AwtRenderPanelI;
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"; sigma
+ int column = av.getColumnSelection().getSelectedRanges().get(0)[0];
+ symbol = aa[activeRow].getDefaultRnaHelixSymbol(column);
}
- symbol = getCurrentAnnotationCharacter(anot, symbol);
-
if (!aa[activeRow].hasIcons)
{
aa[activeRow].hasIcons = true;
return null;
}
}
-
- /**
- * Returns the current annotation symbol (if any) within the visible selected
- * columns (first symbol found left to right in selection). If none is found,
- * the supplied default value is returned.
- *
- * @param annotations
- * @param defaultValue
- * @return
- */
- String getCurrentAnnotationCharacter(Annotation[] annotations,
- String defaultValue)
- {
- String result = defaultValue;
- for (int index : av.getColumnSelection().getSelected())
- {
- if (!av.getColumnSelection().isVisible(index))
- {
- continue;
- }
-
- Annotation annotation = annotations[index];
- if (annotation != null)
- {
- String displayed = annotation.displayCharacter;
- if (displayed != null && displayed.length() > 0)
- {
- result = displayed.substring(0, 1);
- break;
- }
- }
- }
- return result;
- }
}