+ private boolean isColumnForNodeSelected(BinaryNode bn)
+ {
+ SequenceI rseq = tp.assocAnnotation.sequenceRef;
+ int colm = -1;
+ try
+ {
+ colm = Integer.parseInt(
+ bn.getName().substring(bn.getName().indexOf("c") + 1));
+ } catch (Exception e)
+ {
+ return false;
+ }
+ ColumnSelection cs = av.getColumnSelection();
+ HiddenColumns hc = av.getAlignment().getHiddenColumns();
+ int offp = (rseq != null) ? rseq.findIndex(rseq.getStart() - 1 + colm)
+ : colm;
+
+ if (!av.hasHiddenColumns() || hc.isVisible(offp))
+ {
+ return cs.contains(offp);
+ }
+ return false;
+ }
+
+ private void markColumnsFor(AlignmentPanel[] aps, Vector<BinaryNode> l,
+ Color col)
+ {
+ SequenceI rseq = tp.assocAnnotation.sequenceRef;
+ for (BinaryNode bn:l)
+ {
+ int colm=-1;
+ try {
+ colm = Integer.parseInt(bn.getName().substring(bn.getName().indexOf("c")+1));
+ } catch (Exception e)
+ {
+ continue;
+ }
+ ColumnSelection cs = av.getColumnSelection();
+ HiddenColumns hc = av.getAlignment().getHiddenColumns();
+ {
+ int offp = (rseq!=null) ? rseq.findIndex(rseq.getStart()-1+colm) : colm;
+
+ if (!av.hasHiddenColumns() || hc.isVisible(offp))
+ {
+ if (cs.contains(offp))
+ {
+ cs.removeElement(offp);
+ } else {
+ cs.addElement(offp);
+ }