setAlignment(al);
if (hiddenColumns != null)
{
- this.colSel = hiddenColumns;
- if (hiddenColumns.getHiddenColumns() != null
- && hiddenColumns.getHiddenColumns().size() > 0)
- {
- hasHiddenColumns = true;
- }
- else
- {
- hasHiddenColumns = false;
- }
+ colSel = hiddenColumns;
}
init();
}
setAlignment(al);
if (hiddenColumns != null)
{
- this.colSel = hiddenColumns;
- if (hiddenColumns.getHiddenColumns() != null
- && hiddenColumns.getHiddenColumns().size() > 0)
- {
- hasHiddenColumns = true;
- }
- else
- {
- hasHiddenColumns = false;
- }
+ colSel = hiddenColumns;
}
init();
}
}
/**
- *
- * @return true if view has hidden columns
- */
- public boolean hasHiddenColumns()
- {
- return hasHiddenColumns;
- }
-
- /**
* when set, view will scroll to show the highlighted position
*/
public boolean followHighlight = true;
public void setHiddenColumns(ColumnSelection colsel)
{
this.colSel = colsel;
- if (colSel.getHiddenColumns() != null)
- {
- hasHiddenColumns = true;
- }
}
@Override
this.hiddenRepSequences = hiddenRepSequences;
}
- protected boolean hasHiddenColumns = false;
+ @Override
+ public boolean hasHiddenColumns()
+ {
+ return colSel != null && colSel.hasHiddenColumns();
+ }
public void updateHiddenColumns()
{
- hasHiddenColumns = colSel.hasHiddenColumns();
+ // this method doesn't really do anything now. But - it could, since a
+ // column Selection could be in the process of modification
+ // hasHiddenColumns = colSel.hasHiddenColumns();
}
protected boolean hasHiddenRows = false;
colSel.hideSelectedColumns();
setSelectionGroup(null);
- hasHiddenColumns = true;
}
public void hideColumns(int start, int end)
{
colSel.hideColumns(start, end);
}
-
- hasHiddenColumns = true;
}
public void showColumn(int col)
{
colSel.revealHiddenColumns(col);
- if (colSel.getHiddenColumns() == null)
- {
- hasHiddenColumns = false;
- }
+
}
public void showAllHiddenColumns()
{
colSel.revealAllHiddenColumns();
- hasHiddenColumns = false;
}
// common hide/show seq stuff
public jalview.datamodel.CigarArray getViewAsCigars(
boolean selectedRegionOnly)
{
- return new jalview.datamodel.CigarArray(alignment,
- (hasHiddenColumns ? colSel : null),
+ return new jalview.datamodel.CigarArray(alignment, colSel,
(selectedRegionOnly ? selectionGroup : null));
}
boolean selectedOnly, boolean markGroups)
{
return new AlignmentView(alignment, colSel, selectionGroup,
- hasHiddenColumns, selectedOnly, markGroups);
+ colSel != null && colSel.hasHiddenColumns(), selectedOnly,
+ markGroups);
}
}
selection = new String[iSize];
- if (hasHiddenColumns)
+ if (colSel != null && colSel.hasHiddenColumns())
{
selection = colSel.getVisibleSequenceStrings(start, end, seqs);
}
do
{
- if (hasHiddenColumns)
+ if (colSel != null && colSel.hasHiddenColumns())
{
if (start == 0)
{
regions.addElement(new int[]
{ start, end });
- if (hasHiddenColumns)
+ if (colSel != null && colSel.hasHiddenColumns())
{
start = colSel.adjustForHiddenColumns(end);
start = colSel.getHiddenBoundaryLeft(start) + 1;