+ /**
+ * 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;
+ }
+