usercolours changed
[jalview.git] / src / jalview / gui / AlignFrame.java
index de2d8ef..1f04fa3 100755 (executable)
@@ -105,9 +105,8 @@ public class AlignFrame extends GAlignFrame
 
   protected void outputText_actionPerformed(ActionEvent e)
   {
-     CutAndPasteTransfer cap = new CutAndPasteTransfer(false);
+     CutAndPasteTransfer cap = new CutAndPasteTransfer();
      JInternalFrame frame = new JInternalFrame();
-     cap.formatForOutput();
      frame.setContentPane(cap);
      Desktop.addInternalFrame(frame, "Alignment output - "+e.getActionCommand(), 600, 500);
      cap.setText( FormatAdapter.formatSequences(e.getActionCommand(), viewport.getAlignment().getSequences()));
@@ -115,8 +114,7 @@ public class AlignFrame extends GAlignFrame
 
   protected void htmlMenuItem_actionPerformed(ActionEvent e)
   {
-    HTMLOutput htmlOutput = new HTMLOutput(viewport);
-    htmlOutput = null;
+    new HTMLOutput(viewport);
   }
 
   protected void createPNG_actionPerformed(ActionEvent e)
@@ -737,7 +735,6 @@ public class AlignFrame extends GAlignFrame
 
   public void clustalColour_actionPerformed(ActionEvent e)
   {
-    abovePIDThreshold.setSelected(false);
     changeColour(new ClustalxColourScheme(viewport.alignment.getSequences(), viewport.alignment.getWidth()));
   }
 
@@ -834,7 +831,7 @@ public class AlignFrame extends GAlignFrame
       ccs.setConsensus( viewport.vconsensus );
       viewport.setGlobalColourScheme(ccs);
 
-      SliderPanel.setConservationSlider(alignPanel, ccs, "Background");
+      ccs.inc = SliderPanel.setConservationSlider(alignPanel, ccs, "Background");
 
     }
     else
@@ -853,16 +850,16 @@ public class AlignFrame extends GAlignFrame
       {
         SequenceGroup sg = (SequenceGroup)groups.elementAt(i);
 
-        if (cs instanceof ClustalxColourScheme)
-        {
+        if(cs==null)
+          sg.cs = null;
+        else if (cs instanceof ClustalxColourScheme)
           sg.cs = new ClustalxColourScheme(sg.sequences, sg.getWidth());
-        }
-        else if(cs!=null)
-        {
+        else if (cs instanceof UserColourScheme)
+          sg.cs = new UserColourScheme( ((UserColourScheme)cs).getColours());
+        else
           try{
             sg.cs = (ColourSchemeI) cs.getClass().newInstance();
-          }catch(Exception ex){ex.printStackTrace();}
-        }
+          }catch(Exception ex){}
 
         if(viewport.getAbovePIDThreshold())
         {
@@ -959,7 +956,7 @@ public class AlignFrame extends GAlignFrame
 
   public void userDefinedColour_actionPerformed(ActionEvent e)
   {
-    UserDefinedColours chooser = new UserDefinedColours( alignPanel, null);
+    new UserDefinedColours( alignPanel, null);
   }
 
   public void PIDColour_actionPerformed(ActionEvent e)
@@ -1063,7 +1060,7 @@ public class AlignFrame extends GAlignFrame
 
   protected void avTreeBlosumMenuItem_actionPerformed(ActionEvent e)
   {
-    NewTreePanel("AV", "BL", "Average distance tree using BLOSUM62PID");
+    NewTreePanel("AV", "BL", "Average distance tree using BLOSUM62");
   }
 
   void NewTreePanel(String type, String pwType, String title)