From: amwaterhouse Date: Wed, 15 Dec 2004 17:14:48 +0000 (+0000) Subject: SliderPanel added, edit is by mouse click X-Git-Tag: Release_2_0~818 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=57d6a9e73c82ce2663a56dde4e70d997198f9e12;p=jalview.git SliderPanel added, edit is by mouse click --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index a50164a..ec75ee5 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -21,6 +21,7 @@ import java.awt.*; import java.awt.event.*; import java.awt.print.*; import javax.swing.*; +import javax.swing.event.*; import java.util.*; public class AlignFrame extends GAlignFrame @@ -189,11 +190,6 @@ public class AlignFrame extends GAlignFrame alignPanel.RefreshPanels(); } - protected void modifyAlignmentMenuItem_actionPerformed(ActionEvent e) - { - viewport.groupDefiningMode = !modifyAlignmentMenuItem.isSelected(); - } - public void groupsMenuItem_actionPerformed(ActionEvent e) { @@ -204,10 +200,6 @@ public class AlignFrame extends GAlignFrame frame.setResizable(false); } - public void groupEditingMenuItem_actionPerformed(ActionEvent e) - { - viewport.setGroupEdit( groupEditingMenuItem.isSelected() ); - } public void selectAllSequenceMenuItem_actionPerformed(ActionEvent e) { @@ -466,7 +458,8 @@ public class AlignFrame extends GAlignFrame public void clustalColour_actionPerformed(ActionEvent e) { - // alignPanel.setColourScheme( new ClustalxColourScheme() ); + viewport.setGlobalColourScheme(new ClustalxColourScheme( )); + alignPanel.setColourScheme( ); } public void zappoColour_actionPerformed(ActionEvent e) @@ -519,24 +512,30 @@ public class AlignFrame extends GAlignFrame protected void conservationMenuItem_actionPerformed(ActionEvent e) { viewport.setConservationSelected(conservationMenuItem.isSelected()); - conservationColourIncMenuItem.setEnabled( conservationMenuItem.isSelected() ); alignPanel.setColourScheme(); - } - public void conservationColourIncMenuItem_actionPerformed(ActionEvent e) - { - ConservationIncrementPanel cip = new ConservationIncrementPanel(viewport, alignPanel); - JInternalFrame frame = new JInternalFrame(); - frame.setContentPane(cip); - Desktop.addInternalFrame(frame, "Conservation Colour Increment", 400,90); - frame.setMaximizable(false); - } + if(conservationMenuItem.isSelected()) + { + SliderPanel sp = new SliderPanel(alignPanel, 30, true, viewport.getGlobalColourScheme()); + JInternalFrame frame = new JInternalFrame(); + frame.setContentPane(sp); + Desktop.addInternalFrame(frame, "Conservation Colour Increment", 400, 90); + frame.setMaximizable(false); + } + } - public void abovePIDColour_actionPerformed(ActionEvent e) + public void abovePIDThreshold_actionPerformed(ActionEvent e) { - viewport.setGlobalColourScheme(new PIDColourScheme()); - alignPanel.setColourScheme( ); + if(abovePIDThreshold.isSelected()) + { + SliderPanel sp = new SliderPanel(alignPanel, 70, false, + viewport.getGlobalColourScheme()); + JInternalFrame frame = new JInternalFrame(); + frame.setContentPane(sp); + Desktop.addInternalFrame(frame, "Percentage Identity Threshold", 400, 90); + frame.setMaximizable(false); + } } @@ -553,7 +552,7 @@ public class AlignFrame extends GAlignFrame public void PIDColour_actionPerformed(ActionEvent e) { - viewport.setGlobalColourScheme(new PIDColourScheme() ); + viewport.setGlobalColourScheme( new PIDColourScheme() ); alignPanel.setColourScheme( ); }