From: jprocter Date: Fri, 16 Apr 2010 14:31:55 +0000 (+0000) Subject: export graduated feature colors X-Git-Tag: Release_2_5~67 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=61cd7fa8560bb5c1f747a8cab4cc2fbd61980063;p=jalview.git export graduated feature colors --- diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 2159de5..07c717c 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -931,18 +931,34 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, return annotation; } + private Hashtable getDisplayedFeatureCols() + { + if (alignPanel.getFeatureRenderer()!=null) { + FeatureRenderer fr = alignPanel.getFeatureRenderer(); + Hashtable fcols = new Hashtable(); + Enumeration en = viewport.featuresDisplayed.keys(); + while (en.hasMoreElements()) + { + Object col = en.nextElement(); + fcols.put(col,fr.featureColours.get(col)); + } + return fcols; + } + return null; + } + public String outputFeatures(boolean displayTextbox, String format) { String features; if (format.equalsIgnoreCase("Jalview")) { features = new FeaturesFile().printJalviewFormat(viewport.alignment - .getSequencesArray(), viewport.featuresDisplayed); + .getSequencesArray(), getDisplayedFeatureCols()); } else { features = new FeaturesFile().printGFFFormat(viewport.alignment - .getSequencesArray(), viewport.featuresDisplayed); + .getSequencesArray(), getDisplayedFeatureCols()); } if (displayTextbox)