X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FJalview2XML_V1.java;h=ef01a5092e88f99125d1306bdb5b841e31b3d05a;hb=be32c14cd8e48fe0a207cd7030cb9cd46f894678;hp=9263cd982d475cec57f86abedea3433394902a60;hpb=9c37999eb4b461a5c7a94e10ac39583c1c29200a;p=jalview.git diff --git a/src/jalview/gui/Jalview2XML_V1.java b/src/jalview/gui/Jalview2XML_V1.java index 9263cd9..ef01a50 100755 --- a/src/jalview/gui/Jalview2XML_V1.java +++ b/src/jalview/gui/Jalview2XML_V1.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -40,6 +40,7 @@ import jalview.schemes.ResidueProperties; import jalview.structure.StructureSelectionManager; import jalview.util.MessageManager; import jalview.util.jarInputStreamProvider; +import jalview.viewmodel.seqfeatures.FeatureRendererSettings; import java.io.InputStreamReader; import java.util.Hashtable; @@ -370,15 +371,14 @@ public class Jalview2XML_V1 af.viewport.setColourText(view.getShowColourText()); af.viewport.setConservationSelected(view.getConservationSelected()); af.viewport.setShowJVSuffix(view.getShowFullId()); - af.viewport.setFont(new java.awt.Font(view.getFontName(), view - .getFontStyle(), view.getFontSize())); - af.alignPanel.fontChanged(); + af.viewport.setFont( + new java.awt.Font(view.getFontName(), view.getFontStyle(), view + .getFontSize()), true); af.viewport.setRenderGaps(view.getRenderGaps()); af.viewport.setWrapAlignment(view.getWrapAlignment()); - af.alignPanel.setWrapAlignment(view.getWrapAlignment()); - af.viewport.setShowAnnotation(view.getShowAnnotation()); - af.alignPanel.setAnnotationVisible(view.getShowAnnotation()); + + af.viewport.setShowAnnotation(view.isShowAnnotation()); af.viewport.setShowBoxes(view.getShowBoxes()); af.viewport.setShowText(view.getShowText()); @@ -404,6 +404,7 @@ public class Jalview2XML_V1 af.viewport.setGlobalColourScheme(cs); af.viewport.setColourAppliesToAllGroups(false); + af.alignPanel.updateLayout(); af.changeColour(cs); if (view.getConservationSelected() && cs != null) { @@ -411,29 +412,31 @@ public class Jalview2XML_V1 } af.viewport.setColourAppliesToAllGroups(true); - af.viewport.showSequenceFeatures = view.getShowSequenceFeatures(); + af.viewport.setShowSequenceFeatures(view.getShowSequenceFeatures()); if (jms.getFeatureSettings() != null) { - af.viewport.featuresDisplayed = new Hashtable(); + Hashtable featuresDisplayed = new Hashtable(); + Hashtable featureColours = new Hashtable(); String[] renderOrder = new String[jms.getFeatureSettings() .getSettingCount()]; for (int fs = 0; fs < jms.getFeatureSettings().getSettingCount(); fs++) { Setting setting = jms.getFeatureSettings().getSetting(fs); - af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().setColour( + featureColours.put( setting.getType(), new java.awt.Color(setting.getColour())); renderOrder[fs] = setting.getType(); if (setting.getDisplay()) { - af.viewport.featuresDisplayed.put(setting.getType(), new Integer( + featuresDisplayed.put(setting.getType(), new Integer( setting.getColour())); } } - af.alignPanel.seqPanel.seqCanvas.getFeatureRenderer().renderOrder = renderOrder; + FeatureRendererSettings frs = new FeatureRendererSettings(renderOrder, new Hashtable(), featureColours, 1.0f, null); + af.alignPanel.getSeqPanel().seqCanvas.getFeatureRenderer().transferSettings(frs); } af.setMenusFromViewport(af.viewport);