ex.printStackTrace();\r
}\r
}\r
-\r
- static JInternalFrame conservationSlider;\r
- static JInternalFrame PIDSlider;\r
- public static int setConservationSliderSource(AlignmentPanel ap, ColourSchemeI cs, String source)\r
- {\r
- SliderPanel sp = null;\r
- ConservationColourScheme ccs = (ConservationColourScheme)cs;\r
- int value = ccs.inc;\r
-\r
- if(conservationSlider == null)\r
- {\r
- sp = new SliderPanel(ap, value, true, cs);\r
- conservationSlider = new JInternalFrame();\r
- conservationSlider.setContentPane(sp);\r
- addInternalFrame(conservationSlider, "Conservation Colour Increment ("+source+")", 420, 90, false);\r
- conservationSlider.addInternalFrameListener(new javax.swing.event.InternalFrameAdapter()\r
- {\r
- public void internalFrameClosed(javax.swing.event.InternalFrameEvent e)\r
- {\r
- conservationSlider = null;\r
- }\r
- });\r
- conservationSlider.setLayer(JLayeredPane.PALETTE_LAYER);\r
- }\r
- else\r
- {\r
-\r
- conservationSlider.setTitle("Conservation Colour Increment ("+source+")");\r
- sp = (SliderPanel)conservationSlider.getContentPane();\r
- sp.cs = cs;\r
- sp.setValue(value);\r
- }\r
-\r
- if(ap.av.alignment.getGroups()!=null)\r
- sp.setAllGroupsCheckEnabled( true );\r
- else\r
- sp.setAllGroupsCheckEnabled( false);\r
-\r
- return sp.getValue();\r
-\r
- }\r
-\r
- public static void hideConservationSlider()\r
- {\r
- try{\r
- conservationSlider.setClosed(true);\r
- conservationSlider = null;\r
- }catch(Exception ex){}\r
-}\r
-\r
-\r
- public static void hidePIDSlider()\r
- {\r
- try{\r
- PIDSlider.setClosed(true);\r
- PIDSlider = null;\r
- }catch(Exception ex){}\r
- }\r
-\r
- public static int setPIDSliderSource(AlignmentPanel ap, ColourSchemeI cs, String source)\r
- {\r
- SliderPanel pid = null;\r
- if(PIDSlider == null)\r
- {\r
- pid = new SliderPanel(ap, 50, false, cs);\r
- PIDSlider = new JInternalFrame();\r
- PIDSlider.setContentPane(pid);\r
- addInternalFrame(PIDSlider, "Percentage Identity Threshold ("+source+")", 420, 90, false);\r
- PIDSlider.setLayer(JLayeredPane.PALETTE_LAYER);\r
- }\r
- else\r
- {\r
- PIDSlider.setTitle("Percentage Identity Threshold ("+source+")");\r
- pid = (SliderPanel)PIDSlider.getContentPane();\r
- pid.cs = cs;\r
- }\r
-\r
- if (ap.av.alignment.getGroups() != null)\r
- pid.setAllGroupsCheckEnabled(true);\r
- else\r
- pid.setAllGroupsCheckEnabled(false);\r
-\r
-\r
- return pid.getValue();\r
-\r
- }\r
-\r
}\r