From 7a33703b08606394844a7cc796ca1ffe83e3d2d1 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 15 Apr 2005 14:59:46 +0000 Subject: [PATCH] pid and conservation slider moved to sliderPanel --- src/jalview/gui/Desktop.java | 87 ------------------------------------------ 1 file changed, 87 deletions(-) diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 331f882..5076243 100755 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -327,91 +327,4 @@ this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this)); ex.printStackTrace(); } } - - static JInternalFrame conservationSlider; - static JInternalFrame PIDSlider; - public static int setConservationSliderSource(AlignmentPanel ap, ColourSchemeI cs, String source) - { - SliderPanel sp = null; - ConservationColourScheme ccs = (ConservationColourScheme)cs; - int value = ccs.inc; - - if(conservationSlider == null) - { - sp = new SliderPanel(ap, value, true, cs); - conservationSlider = new JInternalFrame(); - conservationSlider.setContentPane(sp); - addInternalFrame(conservationSlider, "Conservation Colour Increment ("+source+")", 420, 90, false); - conservationSlider.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter() - { - public void internalFrameClosed(javax.swing.event.InternalFrameEvent e) - { - conservationSlider = null; - } - }); - conservationSlider.setLayer(JLayeredPane.PALETTE_LAYER); - } - else - { - - conservationSlider.setTitle("Conservation Colour Increment ("+source+")"); - sp = (SliderPanel)conservationSlider.getContentPane(); - sp.cs = cs; - sp.setValue(value); - } - - if(ap.av.alignment.getGroups()!=null) - sp.setAllGroupsCheckEnabled( true ); - else - sp.setAllGroupsCheckEnabled( false); - - return sp.getValue(); - - } - - public static void hideConservationSlider() - { - try{ - conservationSlider.setClosed(true); - conservationSlider = null; - }catch(Exception ex){} -} - - - public static void hidePIDSlider() - { - try{ - PIDSlider.setClosed(true); - PIDSlider = null; - }catch(Exception ex){} - } - - public static int setPIDSliderSource(AlignmentPanel ap, ColourSchemeI cs, String source) - { - SliderPanel pid = null; - if(PIDSlider == null) - { - pid = new SliderPanel(ap, 50, false, cs); - PIDSlider = new JInternalFrame(); - PIDSlider.setContentPane(pid); - addInternalFrame(PIDSlider, "Percentage Identity Threshold ("+source+")", 420, 90, false); - PIDSlider.setLayer(JLayeredPane.PALETTE_LAYER); - } - else - { - PIDSlider.setTitle("Percentage Identity Threshold ("+source+")"); - pid = (SliderPanel)PIDSlider.getContentPane(); - pid.cs = cs; - } - - if (ap.av.alignment.getGroups() != null) - pid.setAllGroupsCheckEnabled(true); - else - pid.setAllGroupsCheckEnabled(false); - - - return pid.getValue(); - - } - } -- 1.7.10.2