Merge branch 'develop' into JAL-1483_29dev
authorJim Procter <jprocter@dundee.ac.uk>
Wed, 7 Jan 2015 23:08:47 +0000 (23:08 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Wed, 7 Jan 2015 23:08:47 +0000 (23:08 +0000)
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

1  2 
.classpath
src/jalview/gui/FeatureRenderer.java
src/jalview/gui/FeatureSettings.java
src/jalview/gui/Jalview2XML_V1.java
src/jalview/io/BioJsHTMLOutput.java

diff --cc .classpath
@@@ -49,7 -49,7 +49,6 @@@
        <classpathentry kind="lib" path="lib/log4j-to-slf4j-2.0-rc2.jar"/>
        <classpathentry kind="lib" path="lib/slf4j-log4j12-1.7.7.jar"/>
        <classpathentry kind="lib" path="lib/VARNAv3-91.jar"/>
--      <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.jar"/>
        <classpathentry kind="lib" path="lib/xml-apis.jar"/>
        <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
   */
  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)
            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);
  
@@@ -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);
@@@ -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;
@@@ -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()