X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FJSONFile.java;h=9d97af59490fbf71521b903350e584392c00edee;hb=db93a1adcbe0a4eaaf06e0a70ade0d6c5c1961c3;hp=7fdd827e54de4f6dcdd5cb7417f812b17b202fd3;hpb=a90e2fe3cc3b779521a81cf8de410936f3a777c1;p=jalview.git diff --git a/src/jalview/io/JSONFile.java b/src/jalview/io/JSONFile.java index 7fdd827..9d97af5 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,8 +732,13 @@ public class JSONFile extends AlignFile implements ComplexAlignFile this.displayedFeatures = displayedFeatures; } + @Override public void configureForView(AlignmentViewPanel avpanel) { + if (avpanel == null) + { + return; + } super.configureForView(avpanel); AlignViewportI viewport = avpanel.getAlignViewport(); AlignmentI alignment = viewport.getAlignment(); @@ -741,11 +748,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 +765,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile } + @Override public boolean isShowSeqFeatures() { return showSeqFeatures; @@ -775,6 +786,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile return hiddenColumns; } + @Override public ColumnSelection getColumnSelection() { return columnSelection; @@ -785,6 +797,7 @@ public class JSONFile extends AlignFile implements ComplexAlignFile this.columnSelection = columnSelection; } + @Override public SequenceI[] getHiddenSequences() { if (hiddenSequences == null || hiddenSequences.isEmpty()) @@ -864,4 +877,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(); + } }