From b7c522b6eba60889fb1078f75e83e8e6c97ef7f8 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 21 Jan 2005 18:30:06 +0000 Subject: [PATCH] Commented out code removed --- src/jalview/gui/PopupMenu.java | 218 +--------------------------------------- 1 file changed, 5 insertions(+), 213 deletions(-) diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index 19698b7..722bad1 100755 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -332,6 +332,11 @@ public class PopupMenu extends JPopupMenu void refresh() { + SequenceGroup sg = getGroup(); + SuperGroup superG = ap.av.alignment.getSuperGroup( sg ); + if( superG !=null) + superG.setSuperGroupProperties( sg ); + ap.seqPanel.seqCanvas.paintFlag=true; ap.seqPanel.repaint(); } @@ -456,219 +461,6 @@ frame.setMaximizable(false); refresh(); } -/* - protected void noColourmenuItem_actionPerformed(ActionEvent e) - { - viewport.setGlobalColourScheme( null ); - changeColour(); - } - - - public void clustalColour_actionPerformed(ActionEvent e) - { - viewport.setGlobalColourScheme(new ClustalxColourScheme( )); - conservationMenuItem.setSelected(false); - abovePIDThreshold.setSelected(false); - changeColour(); - } - - public void zappoColour_actionPerformed(ActionEvent e) - { - viewport.setGlobalColourScheme(new ZappoColourScheme() ); - changeColour(); - } - - public void taylorColour_actionPerformed(ActionEvent e) - { - viewport.setGlobalColourScheme(new TaylorColourScheme() ); - changeColour(); - } - - - public void hydrophobicityColour_actionPerformed(ActionEvent e) - { - viewport.setGlobalColourScheme( new HydrophobicColourScheme() ); - changeColour(); - } - - public void helixColour_actionPerformed(ActionEvent e) - { - viewport.setGlobalColourScheme( new HelixColourScheme() ); - changeColour(); - } - - - public void strandColour_actionPerformed(ActionEvent e) - { - viewport.setGlobalColourScheme(new StrandColourScheme() ); - changeColour(); - } - - - public void turnColour_actionPerformed(ActionEvent e) - { - viewport.setGlobalColourScheme(new TurnColourScheme() ); - changeColour(); - } - - - public void buriedColour_actionPerformed(ActionEvent e) - { - viewport.setGlobalColourScheme( new BuriedColourScheme() ); - changeColour(); - } - - void changeColour() - { - if(abovePIDThreshold.isSelected()) - abovePIDThreshold_actionPerformed(null); - else if(conservationMenuItem.isSelected()) - conservationMenuItem_actionPerformed(null); - - alignPanel.seqPanel.seqCanvas.paintFlag = true; - alignPanel.repaint(); - } - - void addConservationOrPIDColour() - { - int x=0, y=0, threshold = 70; - - if(sliderFrame!=null) - try - { - x = sliderFrame.getX(); - y = sliderFrame.getY(); - SliderPanel sp = (SliderPanel) sliderFrame.getContentPane(); - threshold = sp.getValue(); - sliderFrame.setClosed(true); - } - catch (Exception ex) - { ex.printStackTrace(); } - - ColourSchemeI oldCs = viewport.getGlobalColourScheme(); - - ConservationColourScheme ccs = null; - if (oldCs instanceof ConservationColourScheme) - ccs = (ConservationColourScheme) oldCs; - - if(conservationMenuItem.isSelected()) - { - Alignment al = (Alignment)viewport.alignment; - Conservation c = new Conservation("All", - ResidueProperties.propHash, 3, al.getSequences(), 0, - al.getWidth() ); - - c.calculate(); - c.verdict(false, 100); - - if(ccs!=null) - ccs = new ConservationColourScheme(c, ccs.cs); - else - ccs = new ConservationColourScheme(c, oldCs); - - viewport.setGlobalColourScheme( ccs ); - - } - else if(oldCs instanceof ConservationColourScheme) - { - oldCs = ccs.cs; - viewport.setGlobalColourScheme( oldCs ); - } - - - if( conservationMenuItem.isSelected() || abovePIDThreshold.isSelected() ) - { - sliderFrame = new JInternalFrame(); - sliderFrame.setMaximizable(false); - sliderFrame.setResizable(false); - - SliderPanel sp = null; - if (conservationMenuItem.isSelected()) - { - if(threshold > 50) - threshold = 30; - sp = new SliderPanel(alignPanel, threshold, true,ccs); - Desktop.addInternalFrame(sliderFrame, "Conservation Colour Increment (Global colour)", 400, 90); - threshold = 0; - } - else if (abovePIDThreshold.isSelected()) - { - sp = new SliderPanel(alignPanel, threshold, false, oldCs); - sp.cs = oldCs; - Desktop.addInternalFrame(sliderFrame, "Percentage Identity Threshold (Global colour)", 400, 90); - } - - sliderFrame.setContentPane(sp); - if(x!=0 && y!=0) - sliderFrame.setLocation(x,y); - - } - else - threshold = 0; - - - if (oldCs instanceof ResidueColourScheme) - { - ResidueColourScheme rcs = (ResidueColourScheme) oldCs; - rcs.setThreshold(threshold); - } - else if (oldCs instanceof ScoreColourScheme) - { - ScoreColourScheme scs = (ScoreColourScheme) oldCs; - scs.setThreshold(threshold); - } - - alignPanel.seqPanel.seqCanvas.paintFlag = true; - alignPanel.repaint(); - - } - - protected void conservationMenuItem_actionPerformed(ActionEvent e) - { - if(abovePIDThreshold.isSelected()) - abovePIDThreshold.setSelected(false); - - viewport.setConservationSelected(conservationMenuItem.isSelected()); - - addConservationOrPIDColour(); - } - - JInternalFrame sliderFrame; - public void abovePIDThreshold_actionPerformed(ActionEvent e) - { - if(conservationMenuItem.isSelected()) - conservationMenuItem.setSelected(false); - - addConservationOrPIDColour(); - } - - - - public void userDefinedColour_actionPerformed(ActionEvent e) - { - JInternalFrame frame = new JInternalFrame(); - UserDefinedColours chooser = new UserDefinedColours( frame, alignPanel, null); - frame.setContentPane(chooser); - Desktop.addInternalFrame(frame,"User defined colours", 450,540 ); - frame.setResizable(false); - frame.setIconifiable(false); - frame.setMaximizable(false); - } - - public void PIDColour_actionPerformed(ActionEvent e) - { - viewport.setGlobalColourScheme( new PIDColourScheme() ); - alignPanel.setColourScheme( ); - } - - - public void BLOSUM62Colour_actionPerformed(ActionEvent e) - { - viewport.setGlobalColourScheme( new Blosum62ColourScheme(viewport) ); - alignPanel.setColourScheme(); - } -*/ -////////////////////////////////////// protected void groupAnnotation_actionPerformed(ActionEvent e) { -- 1.7.10.2