- AlignFrame af = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH,
- AlignFrame.DEFAULT_HEIGHT);
+
+ AlignFrame af;
+ if (source instanceof ComplexAlignFile)
+ {
+ ColumnSelection colSel = ((ComplexAlignFile) source)
+ .getColumnSelection();
+ SequenceI[] hiddenSeqs = ((ComplexAlignFile) source)
+ .getHiddenSequences();
+ boolean showSeqFeatures = ((ComplexAlignFile) source)
+ .isShowSeqFeatures();
+ String colourSchemeName = ((ComplexAlignFile) source)
+ .getGlobalColourScheme();
+ FeaturesDisplayedI fd = ((ComplexAlignFile) source)
+ .getDisplayedFeatures();
+ af = new AlignFrame(al, hiddenSeqs, colSel,
+ AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT);
+ af.getViewport().setShowSequenceFeatures(showSeqFeatures);
+ af.getViewport().setFeaturesDisplayed(fd);
+ ColourSchemeI cs = ColourSchemeMapper.getJalviewColourScheme(
+ colourSchemeName, al);
+ if (cs != null)
+ {
+ af.changeColour(cs);
+ }
+ }
+ else
+ {
+ af = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH,
+ AlignFrame.DEFAULT_HEIGHT);
+ }
+