X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FHtmlFile.java;h=75e99a6c7a6641c78d91523e6a7a71a3cf84c224;hb=a576517d22220abb490437a02c9b37a1f4c2839e;hp=72728300b8b1c627631ca6a383cb4b29a2d9e71f;hpb=581e7e5a0736b3b5e5ade54656c194b399b2a3ec;p=jalview.git diff --git a/src/jalview/io/HtmlFile.java b/src/jalview/io/HtmlFile.java index 7272830..75e99a6 100644 --- a/src/jalview/io/HtmlFile.java +++ b/src/jalview/io/HtmlFile.java @@ -1,6 +1,27 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ + package jalview.io; -import jalview.gui.AlignFrame; +import jalview.api.AlignViewControllerGuiI; import jalview.schemes.ColourSchemeI; import java.io.IOException; @@ -15,7 +36,9 @@ public class HtmlFile extends AlignFile public static final String FILE_DESC = "HTML"; - private ColourSchemeI cs; + private ColourSchemeI colourScheme; + + private boolean showSeqFeatures; public HtmlFile() { @@ -49,19 +72,21 @@ public class HtmlFile extends AlignFile String alignmentJsonString = content.val(); JSONFile jsonFile = new JSONFile().parse(alignmentJsonString); - seqs = jsonFile.seqs; - seqGroups = jsonFile.seqGroups; - annotations = jsonFile.annotations; + seqs = jsonFile.getSeqs(); + seqGroups = jsonFile.getSeqGroups(); + annotations = jsonFile.getAnnotations(); + showSeqFeatures = jsonFile.isShowSeqFeatures(); + colourScheme = jsonFile.getColourScheme(); } catch (Exception e) { e.printStackTrace(); } } - public void LoadAlignmentFeatures(AlignFrame af) + public void applySettingsToAlignFrame(AlignViewControllerGuiI af) { - af.setShowSeqFeatures(JSONFile.isSeqFeaturesEnabled()); - af.changeColour(JSONFile.getColourScheme()); + af.setShowSeqFeatures(isShowSeqFeatures()); + af.changeColour(getColourScheme()); af.setMenusForViewport(); } @@ -70,7 +95,27 @@ public class HtmlFile extends AlignFile public String print() { throw new UnsupportedOperationException( - "Print method of HtmlFile not yet supported!"); + "Print method of HtmlFile is not supported!"); + } + + public boolean isShowSeqFeatures() + { + return showSeqFeatures; + } + + public void setShowSeqFeatures(boolean showSeqFeatures) + { + this.showSeqFeatures = showSeqFeatures; + } + + public ColourSchemeI getColourScheme() + { + return colourScheme; + } + + public void setColourScheme(ColourSchemeI colourScheme) + { + this.colourScheme = colourScheme; } }