X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FJSONFile.java;h=3cda444958fc76a6716128ffa3f8b0ed102ecad6;hb=4bd4726a6cd30825c18525c2a0851e207d687423;hp=103892562101abb68712ee2d1ed70921e62f28e1;hpb=b95ec6f233e933437c48fc221b68810ddeb08d0c;p=jalview.git diff --git a/src/jalview/io/JSONFile.java b/src/jalview/io/JSONFile.java index 1038925..3cda444 100644 --- a/src/jalview/io/JSONFile.java +++ b/src/jalview/io/JSONFile.java @@ -26,6 +26,7 @@ import jalview.api.AlignViewportI; import jalview.api.AlignmentViewPanel; import jalview.api.ComplexAlignFile; import jalview.api.FeatureRenderer; +import jalview.api.FeatureSettingsModelI; import jalview.api.FeaturesDisplayedI; import jalview.bin.BuildDetails; import jalview.datamodel.AlignmentAnnotation; @@ -709,6 +710,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile } } + @Override public String getGlobalColourScheme() { return globalColourScheme; @@ -730,6 +732,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile this.displayedFeatures = displayedFeatures; } + @Override public void configureForView(AlignmentViewPanel avpanel) { super.configureForView(avpanel); @@ -741,11 +744,14 @@ public class JSONFile extends AlignFile implements ComplexAlignFile fr = avpanel.cloneFeatureRenderer(); // Add non auto calculated annotation to AlignFile - for (AlignmentAnnotation annot : annots) + if (annots != null) { - if (annot != null && !annot.autoCalculated) + for (AlignmentAnnotation annot : annots) { - annotations.add(annot); + if (annot != null && !annot.autoCalculated) + { + annotations.add(annot); + } } } globalColourScheme = ColourSchemeProperty.getColourName(viewport @@ -755,6 +761,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile } + @Override public boolean isShowSeqFeatures() { return showSeqFeatures; @@ -775,6 +782,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile return hiddenColumns; } + @Override public ColumnSelection getColumnSelection() { return columnSelection; @@ -785,6 +793,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile this.columnSelection = columnSelection; } + @Override public SequenceI[] getHiddenSequences() { if (hiddenSequences == null || hiddenSequences.isEmpty()) @@ -864,4 +873,19 @@ public class JSONFile extends AlignFile implements ComplexAlignFile this.exportJalviewSettings = exportJalviewSettings; } } + + /** + * Returns a descriptor for suitable feature display settings with + * + */ + @Override + public FeatureSettingsModelI getFeatureColourScheme() + { + return new PDBFeatureSettings(); + } }