public class AlignViewport extends AlignmentViewport
implements SelectionSource
{
-
public final static int NO_SPLIT = 0;
public final static int SPLIT_FRAME = 1;
public final static int NEW_WINDOW = 2;
-
-
Font font;
boolean cursorMode = false;
* @param hiddenColumns
* @param seqsetid
* (may be null)
-f */
+ */
public AlignViewport(AlignmentI al, HiddenColumns hiddenColumns,
String seqsetid)
{
}
setColourAppliesToAllGroups(true);
}
+
boolean validCharWidth;
}
/**
- * Returns an iterator over the visible column regions of the alignment
- *
- * @param selectedRegionOnly
- * true to just return the contigs intersecting with the selected
- * area
- * @return
- */
- public Iterator<int[]> getViewAsVisibleContigs(boolean selectedRegionOnly)
- {
- int start = 0;
- int end = 0;
- if (selectedRegionOnly && selectionGroup != null)
- {
- start = selectionGroup.getStartRes();
- end = selectionGroup.getEndRes() + 1;
- }
- else
- {
- end = alignment.getWidth();
- }
-
- return (alignment.getHiddenColumns().getVisContigsIterator(start,
- end, false));
- }
-
- /**
* get hash of undo and redo list for the alignment
*
* @return long[] { historyList.hashCode, redoList.hashCode };
}
public boolean followSelection = true;
-
+
/**
* @return true if view selection should always follow the selections
* broadcast by other selection sources
return StructureSelectionManager
.getStructureSelectionManager(Desktop.getInstance());
}
+
@Override
public boolean isNormaliseSequenceLogo()
normaliseSequenceLogo = state;
}
-
/**
*
* @return true if alignment characters should be displayed
ranges.setEndSeq(getAlignment().getHeight() - 1); // BH 2019.04.18
notifyAlignment();
-
}
/**
@Override
public void run()
{
+ // Make a copy of this one to open it in a splitframe
openLinkedAlignmentAs(getAlignPanel().alignFrame,
new Alignment(getAlignment()), al, title,
SPLIT_FRAME);
-// us.openLinkedAlignmentAs(al, title, true);
}
}).setResponseHandler(NEW_WINDOW, new Runnable()
{
JvOptionPane.DEFAULT_OPTION, JvOptionPane.PLAIN_MESSAGE, null,
options, options[0]);
}
+
/**
* Open a split frame or a new window
*
AlignmentI thisAlignment, AlignmentI al, String title, int mode)
{
/*
- * Identify protein and dna alignments. Make a copy of this one if opening
- * in a new split pane.
+ * Identify protein and dna alignments.
*/
AlignmentI protein = al.isNucleotide() ? thisAlignment : al;
AlignmentI cdna = al.isNucleotide() ? al : thisAlignment;
+
/*
* Map sequences. At least one should get mapped as we have already passed
* the test for 'mappability'. Any mappings made will be added to the
AlignFrame.DEFAULT_HEIGHT);
copyMe.setTitle(thisFrame.getTitle());
-
AlignmentI al = newAlignFrame.viewport.getAlignment();
final AlignFrame proteinFrame = al.isNucleotide() ? copyMe
: newAlignFrame;
.getFeatureColour(type);
FeatureMatcherSetI preferredFilters = featureSettings
.getFeatureFilters(type);
-
FeatureColourI origColour = fr.getFeatureStyle(type);
if (!mergeOnly || (!origRenderOrder.contains(type)
|| origColour == null
{
displayed.setVisible(type);
}
+ else if (featureSettings.isFeatureHidden(type))
+ {
+ displayed.setHidden(type);
+ }
}
}
fr.orderFeatures(featureSettings);
}
fr.setTransparency(featureSettings.getTransparency());
+ fr.notifyFeaturesChanged();
}
public String getViewName()
{
this.viewName = viewName;
}
-
}