SliderPanel added, edit is by mouse click
authoramwaterhouse <Andrew Waterhouse>
Wed, 15 Dec 2004 17:14:48 +0000 (17:14 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 15 Dec 2004 17:14:48 +0000 (17:14 +0000)
src/jalview/gui/AlignFrame.java

index a50164a..ec75ee5 100755 (executable)
@@ -21,6 +21,7 @@ import java.awt.*;
 import java.awt.event.*;\r
 import java.awt.print.*;\r
 import javax.swing.*;\r
+import javax.swing.event.*;\r
 import java.util.*;\r
 \r
 public class AlignFrame extends GAlignFrame\r
@@ -189,11 +190,6 @@ public class AlignFrame extends GAlignFrame
      alignPanel.RefreshPanels();\r
   }\r
 \r
-  protected void modifyAlignmentMenuItem_actionPerformed(ActionEvent e)\r
-  {\r
-    viewport.groupDefiningMode = !modifyAlignmentMenuItem.isSelected();\r
-  }\r
-\r
 \r
   public void groupsMenuItem_actionPerformed(ActionEvent e)\r
   {\r
@@ -204,10 +200,6 @@ public class AlignFrame extends GAlignFrame
     frame.setResizable(false);\r
   }\r
 \r
-  public void groupEditingMenuItem_actionPerformed(ActionEvent e)\r
-  {\r
-    viewport.setGroupEdit( groupEditingMenuItem.isSelected() );\r
-  }\r
 \r
   public void selectAllSequenceMenuItem_actionPerformed(ActionEvent e)\r
   {\r
@@ -466,7 +458,8 @@ public class AlignFrame extends GAlignFrame
 \r
   public void clustalColour_actionPerformed(ActionEvent e)\r
   {\r
-   // alignPanel.setColourScheme( new ClustalxColourScheme() );\r
+    viewport.setGlobalColourScheme(new ClustalxColourScheme( ));\r
+    alignPanel.setColourScheme(  );\r
   }\r
 \r
   public void zappoColour_actionPerformed(ActionEvent e)\r
@@ -519,24 +512,30 @@ public class AlignFrame extends GAlignFrame
   protected  void conservationMenuItem_actionPerformed(ActionEvent e)\r
   {\r
     viewport.setConservationSelected(conservationMenuItem.isSelected());\r
-    conservationColourIncMenuItem.setEnabled( conservationMenuItem.isSelected() );\r
     alignPanel.setColourScheme();\r
-  }\r
 \r
-  public void conservationColourIncMenuItem_actionPerformed(ActionEvent e)\r
- {\r
-   ConservationIncrementPanel cip = new ConservationIncrementPanel(viewport, alignPanel);\r
-   JInternalFrame frame = new JInternalFrame();\r
-   frame.setContentPane(cip);\r
-   Desktop.addInternalFrame(frame, "Conservation Colour Increment", 400,90);\r
-   frame.setMaximizable(false);\r
- }\r
+    if(conservationMenuItem.isSelected())\r
+    {\r
+      SliderPanel sp = new SliderPanel(alignPanel, 30, true, viewport.getGlobalColourScheme());\r
+      JInternalFrame frame = new JInternalFrame();\r
+      frame.setContentPane(sp);\r
+      Desktop.addInternalFrame(frame, "Conservation Colour Increment", 400, 90);\r
+      frame.setMaximizable(false);\r
+    }\r
+  }\r
 \r
 \r
-  public void abovePIDColour_actionPerformed(ActionEvent e)\r
+  public void abovePIDThreshold_actionPerformed(ActionEvent e)\r
   {\r
-    viewport.setGlobalColourScheme(new PIDColourScheme());\r
-    alignPanel.setColourScheme( );\r
+    if(abovePIDThreshold.isSelected())\r
+    {\r
+      SliderPanel sp = new SliderPanel(alignPanel, 70, false,\r
+                                       viewport.getGlobalColourScheme());\r
+      JInternalFrame frame = new JInternalFrame();\r
+      frame.setContentPane(sp);\r
+      Desktop.addInternalFrame(frame, "Percentage Identity Threshold", 400, 90);\r
+      frame.setMaximizable(false);\r
+    }\r
   }\r
 \r
 \r
@@ -553,7 +552,7 @@ public class AlignFrame extends GAlignFrame
 \r
   public void PIDColour_actionPerformed(ActionEvent e)\r
   {\r
-    viewport.setGlobalColourScheme(new PIDColourScheme() );\r
+    viewport.setGlobalColourScheme( new PIDColourScheme() );\r
     alignPanel.setColourScheme( );\r
   }\r
 \r