{
al.setDataset(dataset);
}
-
propagateDatasetMappings(al);
+ Alignment complement=null;
+ if (input.hasComplementView())
+ {
+ Object[] newcompl = input
+ .getComplementView()
+ .getAlignmentAndHiddenColumns(getRequestingAlignFrame()
+ .getViewport().getCodingComplement().getGapCharacter());
+ complement = new Alignment((SequenceI[])newcompl[0]);
+ complement.setHiddenColumns((HiddenColumns) newcompl[1]);
+ complement.setDataset(dataset);
+ complement.alignAs(al);
+ }
// JBNote- TODO: warn user if a block is input rather than aligned data ?
if (newFrame)
{
- displayInNewFrame(al, alorders, hidden);
+ displayInNewFrame(al, alorders, hidden, complement);
}
else
*
* @param al
* @param alorders
+ * @param complement2
* @param columnselection
*/
protected void displayInNewFrame(AlignmentI al,
- List<AlignmentOrder> alorders, HiddenColumns hidden)
+ List<AlignmentOrder> alorders, HiddenColumns hidden, AlignmentI complement)
{
AlignFrame af = new AlignFrame(al, hidden, AlignFrame.DEFAULT_WIDTH,
AlignFrame.DEFAULT_HEIGHT);
* SplitFrame with the other pane similarly aligned.
*/
AlignFrame requestedBy = getRequestingAlignFrame();
- if (requestedBy != null && requestedBy.getSplitViewContainer() != null
+ if (complement!=null && requestedBy != null && requestedBy.getSplitViewContainer() != null
&& requestedBy.getSplitViewContainer()
.getComplement(requestedBy) != null)
{
- AlignmentI complement = requestedBy.getSplitViewContainer()
- .getComplement(requestedBy);
String complementTitle = requestedBy.getSplitViewContainer()
.getComplementTitle(requestedBy);
// becomes null if the alignment window was closed before the alignment
// job finished.
- AlignmentI copyComplement = new Alignment(complement);
- // todo should this be done by copy constructor?
- copyComplement.setGapCharacter(complement.getGapCharacter());
- // share the same dataset (and the mappings it holds)
- copyComplement.setDataset(complement.getDataset());
- copyComplement.alignAs(al);
- if (copyComplement.getHeight() > 0)
+ if (complement.getHeight() > 0)
{
af.setTitle(alTitle);
- AlignFrame af2 = new AlignFrame(copyComplement,
+ AlignFrame af2 = new AlignFrame(complement,
AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
af2.setTitle(complementTitle);
String linkedTitle = MessageManager