return maxLength;
}
- /*
+
@Override
- public int getWidth()
+ public int getVisibleWidth()
{
- final Wrapper temp = new Wrapper();
-
- forEachSequence(new Consumer<SequenceI>()
+ int w = getWidth();
+ if (hiddenCols != null)
{
- @Override
- public void accept(SequenceI s)
- {
- if (s.getLength() > temp.inner)
- {
- temp.inner = s.getLength();
- }
- }
- }, 0, sequences.size() - 1);
-
- return temp.inner;
+ w -= hiddenCols.getSize();
+ }
+ return w;
}
-
- public static class Wrapper
- {
- public int inner;
- }*/
/**
* DOCUMENT ME!
/**
*
- * Calculates the maximum width of the alignment, including gaps.
+ * Answers the width of the alignment, including gaps, that is, the length of
+ * the longest sequence, or -1 if there are no sequences. Avoid calling this
+ * method repeatedly where possible, as it has to perform a calculation. Note
+ * that this width includes any hidden columns.
*
- * @return Greatest sequence length within alignment, or -1 if no sequences
- * present
+ * @return
+ * @see AlignmentI#getVisibleWidth()
*/
@Override
int getWidth();
/**
+ *
+ * Answers the visible width of the alignment, including gaps, that is, the
+ * length of the longest sequence, excluding any hidden columns. Answers -1 if
+ * there are no sequences. Avoid calling this method repeatedly where
+ * possible, as it has to perform a calculation.
+ *
+ * @return
+ */
+ int getVisibleWidth();
+
+ /**
* Calculates if this set of sequences (visible and invisible) are all the
* same length
*