X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignmentView.java;h=5058dcff0de4b547e867154b7296330f3840dea0;hb=e5b2edf3955c50cfd61799ad12cdc9016603ee1c;hp=1e340361c249b5268121c0c8d69c0f52ce364cf0;hpb=7451c6419c9c94627f79d044228db55b90e9b4cf;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentView.java b/src/jalview/datamodel/AlignmentView.java index 1e34036..5058dcf 100644 --- a/src/jalview/datamodel/AlignmentView.java +++ b/src/jalview/datamodel/AlignmentView.java @@ -141,13 +141,14 @@ public class AlignmentView * the view */ public AlignmentView(AlignmentI alignment, - ColumnSelection columnSelection, SequenceGroup selection, + HiddenColumns hidden, + SequenceGroup selection, boolean hasHiddenColumns, boolean selectedRegionOnly, boolean recordGroups) { // refactored from AlignViewport.getAlignmentView(selectedOnly); this(new jalview.datamodel.CigarArray(alignment, - (hasHiddenColumns ? columnSelection : null), + (hasHiddenColumns ? hidden : null), (selectedRegionOnly ? selection : null)), (selectedRegionOnly && selection != null) ? selection .getStartRes() : 0); @@ -330,13 +331,13 @@ public class AlignmentView * char * @return Object[] { SequenceI[], ColumnSelection} */ - public Object[] getAlignmentAndColumnSelection(char gapCharacter) + public Object[] getAlignmentAndHiddenColumns(char gapCharacter) { - ColumnSelection colsel = new ColumnSelection(); + HiddenColumns hidden = new HiddenColumns(); return new Object[] { - SeqCigar.createAlignmentSequences(sequences, gapCharacter, colsel, - contigs), colsel }; + SeqCigar.createAlignmentSequences(sequences, gapCharacter, hidden, + contigs), hidden }; } /** @@ -710,7 +711,8 @@ public class AlignmentView if (contigs != null && contigs.length > 0) { SequenceI[] alignment = new SequenceI[sequences.length]; - ColumnSelection columnselection = new ColumnSelection(); + // ColumnSelection columnselection = new ColumnSelection(); + HiddenColumns hidden = new HiddenColumns(); if (contigs != null && contigs.length > 0) { int start = 0; @@ -823,7 +825,7 @@ public class AlignmentView } } // mark hidden segment as hidden in the new alignment - columnselection.hideColumns(nwidth, nwidth + contigs[contig + 2] + hidden.hideColumns(nwidth, nwidth + contigs[contig + 2] - 1); nwidth += contigs[contig + 2]; } @@ -901,7 +903,7 @@ public class AlignmentView } } } - return new Object[] { alignment, columnselection }; + return new Object[] { alignment, hidden }; } else { @@ -920,7 +922,7 @@ public class AlignmentView } else { - return getAlignmentAndColumnSelection(gapCharacter); + return getAlignmentAndHiddenColumns(gapCharacter); } } } @@ -1135,7 +1137,7 @@ public class AlignmentView } public static void testSelectionViews(AlignmentI alignment, - ColumnSelection csel, SequenceGroup selection) + HiddenColumns hidden, SequenceGroup selection) { System.out.println("Testing standard view creation:\n"); AlignmentView view = null; @@ -1143,7 +1145,7 @@ public class AlignmentView { System.out .println("View with no hidden columns, no limit to selection, no groups to be collected:"); - view = new AlignmentView(alignment, csel, selection, false, false, + view = new AlignmentView(alignment, hidden, selection, false, false, false); summariseAlignmentView(view, System.out); @@ -1157,7 +1159,7 @@ public class AlignmentView { System.out .println("View with no hidden columns, no limit to selection, and all groups to be collected:"); - view = new AlignmentView(alignment, csel, selection, false, false, + view = new AlignmentView(alignment, hidden, selection, false, false, true); summariseAlignmentView(view, System.out); } catch (Exception e) @@ -1170,7 +1172,7 @@ public class AlignmentView { System.out .println("View with no hidden columns, limited to selection and no groups to be collected:"); - view = new AlignmentView(alignment, csel, selection, false, true, + view = new AlignmentView(alignment, hidden, selection, false, true, false); summariseAlignmentView(view, System.out); } catch (Exception e) @@ -1183,7 +1185,7 @@ public class AlignmentView { System.out .println("View with no hidden columns, limited to selection, and all groups to be collected:"); - view = new AlignmentView(alignment, csel, selection, false, true, + view = new AlignmentView(alignment, hidden, selection, false, true, true); summariseAlignmentView(view, System.out); } catch (Exception e) @@ -1196,7 +1198,7 @@ public class AlignmentView { System.out .println("View *with* hidden columns, no limit to selection, no groups to be collected:"); - view = new AlignmentView(alignment, csel, selection, true, false, + view = new AlignmentView(alignment, hidden, selection, true, false, false); summariseAlignmentView(view, System.out); } catch (Exception e) @@ -1209,7 +1211,7 @@ public class AlignmentView { System.out .println("View *with* hidden columns, no limit to selection, and all groups to be collected:"); - view = new AlignmentView(alignment, csel, selection, true, false, + view = new AlignmentView(alignment, hidden, selection, true, false, true); summariseAlignmentView(view, System.out); } catch (Exception e) @@ -1222,7 +1224,7 @@ public class AlignmentView { System.out .println("View *with* hidden columns, limited to selection and no groups to be collected:"); - view = new AlignmentView(alignment, csel, selection, true, true, + view = new AlignmentView(alignment, hidden, selection, true, true, false); summariseAlignmentView(view, System.out); } catch (Exception e) @@ -1235,7 +1237,8 @@ public class AlignmentView { System.out .println("View *with* hidden columns, limited to selection, and all groups to be collected:"); - view = new AlignmentView(alignment, csel, selection, true, true, true); + view = new AlignmentView(alignment, hidden, selection, true, true, + true); summariseAlignmentView(view, System.out); } catch (Exception e) {