From: Jim Procter Date: Wed, 7 Jan 2015 23:08:47 +0000 (+0000) Subject: Merge branch 'develop' into JAL-1483_29dev X-Git-Tag: Jalview_2_9~123^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=30133ea9afab31009432eb013c299eb6c36ae75e;p=jalview.git Merge branch 'develop' into JAL-1483_29dev updated JAL-1483 with commits from 15th Dec-7th Jan 2015 Conflicts: .classpath src/jalview/api/AlignmentViewPanel.java src/jalview/appletgui/SeqPanel.java src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java src/jalview/gui/AlignFrame.java src/jalview/gui/AlignViewport.java src/jalview/gui/AnnotationExporter.java src/jalview/gui/FeatureRenderer.java src/jalview/gui/FeatureSettings.java src/jalview/gui/Jalview2XML.java src/jalview/gui/Jalview2XML_V1.java src/jalview/gui/PopupMenu.java src/jalview/gui/SeqPanel.java src/jalview/io/BioJsHTMLOutput.java src/jalview/io/HtmlSvgOutput.java --- 30133ea9afab31009432eb013c299eb6c36ae75e diff --cc .classpath index 388e111,4c39421..59772ae --- a/.classpath +++ b/.classpath @@@ -49,7 -49,7 +49,6 @@@ -- diff --cc src/jalview/gui/FeatureRenderer.java index 9f5f3af,80f1255..3ce831e --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRenderer.java @@@ -20,18 -20,21 +20,35 @@@ */ package jalview.gui; --import java.util.*; - import java.awt.*; - import java.awt.event.*; - import java.awt.image.*; - import java.beans.PropertyChangeListener; - - import javax.swing.*; - - import jalview.datamodel.*; -import java.util.concurrent.ConcurrentHashMap; - -import java.awt.*; -import java.awt.event.*; -import java.awt.image.*; -import java.beans.PropertyChangeListener; -import java.beans.PropertyChangeSupport; - -import javax.swing.*; - -import jalview.datamodel.*; ++import jalview.datamodel.SearchResults; ++import jalview.datamodel.SequenceFeature; ++import jalview.datamodel.SequenceI; import jalview.schemes.GraduatedColor; import jalview.util.MessageManager; ++import java.awt.BorderLayout; ++import java.awt.Color; ++import java.awt.Dimension; ++import java.awt.Font; ++import java.awt.GridLayout; ++import java.awt.event.ActionEvent; ++import java.awt.event.ActionListener; ++import java.awt.event.ItemEvent; ++import java.awt.event.ItemListener; ++import java.awt.event.MouseAdapter; ++import java.awt.event.MouseEvent; ++ ++import javax.swing.JColorChooser; ++import javax.swing.JComboBox; ++import javax.swing.JLabel; ++import javax.swing.JOptionPane; ++import javax.swing.JPanel; ++import javax.swing.JScrollPane; ++import javax.swing.JSpinner; ++import javax.swing.JTextArea; ++import javax.swing.JTextField; ++import javax.swing.SwingConstants; ++ /** * DOCUMENT ME! * @@@ -317,7 -1235,7 +334,9 @@@ public class FeatureRenderer extends ja lastDescriptionAdded = description.getText().replaceAll("\n", " "); // TODO: determine if the null feature group is valid if (lastFeatureGroupAdded.length() < 1) ++ { lastFeatureGroupAdded = null; ++ } } if (!newFeatures) @@@ -363,13 -1281,20 +382,12 @@@ ffile.parseDescriptionHTML(features[i], false); } - - if (av.getFeaturesDisplayed() == null) - { - av.setFeaturesDisplayed(new Hashtable()); - } - if (lastFeatureGroupAdded != null) { - if (featureGroups == null) - featureGroups = new Hashtable(); - featureGroups.put(lastFeatureGroupAdded, new Boolean(true)); + setGroupVisibility(lastFeatureGroupAdded, true); } setColour(lastFeatureAdded, fcol); - av.getFeaturesDisplayed().put(lastFeatureAdded, - getColour(lastFeatureAdded)); + setVisible(lastFeatureAdded); findAllFeatures(false); diff --cc src/jalview/gui/FeatureSettings.java index dc0a127,0f14bed..3475fe3 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@@ -1056,15 -1078,15 +1056,30 @@@ public class FeatureSettings extends JP { public void actionPerformed(ActionEvent e) { - sortByDens(null); + af.avc.sortAlignmentByFeatureDensity(null); + } + }); + help.setFont(JvSwingUtils.getLabelFont()); + help.setText(MessageManager.getString("action.help")); + help.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { ++ try ++ { ++ Help.showHelpWindow(HelpId.SequenceFeatureSettings); ++ } catch (HelpSetException e1) ++ { ++ e1.printStackTrace(); ++ } + } + }); + help.setFont(JvSwingUtils.getLabelFont()); + help.setText(MessageManager.getString("action.help")); + help.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { try { Help.showHelpWindow(HelpId.SequenceFeatureSettings); diff --cc src/jalview/gui/Jalview2XML_V1.java index 885d42a,033b6dc..586e2fa --- a/src/jalview/gui/Jalview2XML_V1.java +++ b/src/jalview/gui/Jalview2XML_V1.java @@@ -40,6 -40,6 +40,7 @@@ import jalview.schemes.ResiduePropertie 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; diff --cc src/jalview/io/BioJsHTMLOutput.java index 163f311,772337a..db43a3f --- a/src/jalview/io/BioJsHTMLOutput.java +++ b/src/jalview/io/BioJsHTMLOutput.java @@@ -51,11 -50,12 +51,9 @@@ public class BioJsHTMLOutpu this.av = ap.av; this.globalColorScheme = ColourSchemeProperty.getColourName(av .getGlobalColourScheme()); - this.fr = new FeatureRenderer(ap); - fr.transferSettings(fr1); + this.fr = ap.cloneFeatureRenderer(); displayedFeatures = av.getFeaturesDisplayed(); -- -- exportJalviewAlignmentAsBioJsHtmlFile(); -- } ++ } } private void exportJalviewAlignmentAsBioJsHtmlFile()