\r
void refresh()\r
{\r
+ SequenceGroup sg = getGroup();\r
+ SuperGroup superG = ap.av.alignment.getSuperGroup( sg );\r
+ if( superG !=null)\r
+ superG.setSuperGroupProperties( sg );\r
+\r
ap.seqPanel.seqCanvas.paintFlag=true;\r
ap.seqPanel.repaint();\r
}\r
refresh();\r
}\r
\r
-/*\r
- protected void noColourmenuItem_actionPerformed(ActionEvent e)\r
- {\r
- viewport.setGlobalColourScheme( null );\r
- changeColour();\r
- }\r
-\r
-\r
- public void clustalColour_actionPerformed(ActionEvent e)\r
- {\r
- viewport.setGlobalColourScheme(new ClustalxColourScheme( ));\r
- conservationMenuItem.setSelected(false);\r
- abovePIDThreshold.setSelected(false);\r
- changeColour();\r
- }\r
-\r
- public void zappoColour_actionPerformed(ActionEvent e)\r
- {\r
- viewport.setGlobalColourScheme(new ZappoColourScheme() );\r
- changeColour();\r
- }\r
-\r
- public void taylorColour_actionPerformed(ActionEvent e)\r
- {\r
- viewport.setGlobalColourScheme(new TaylorColourScheme() );\r
- changeColour();\r
- }\r
-\r
-\r
- public void hydrophobicityColour_actionPerformed(ActionEvent e)\r
- {\r
- viewport.setGlobalColourScheme( new HydrophobicColourScheme() );\r
- changeColour();\r
- }\r
-\r
- public void helixColour_actionPerformed(ActionEvent e)\r
- {\r
- viewport.setGlobalColourScheme( new HelixColourScheme() );\r
- changeColour();\r
- }\r
-\r
-\r
- public void strandColour_actionPerformed(ActionEvent e)\r
- {\r
- viewport.setGlobalColourScheme(new StrandColourScheme() );\r
- changeColour();\r
- }\r
-\r
-\r
- public void turnColour_actionPerformed(ActionEvent e)\r
- {\r
- viewport.setGlobalColourScheme(new TurnColourScheme() );\r
- changeColour();\r
- }\r
-\r
-\r
- public void buriedColour_actionPerformed(ActionEvent e)\r
- {\r
- viewport.setGlobalColourScheme( new BuriedColourScheme() );\r
- changeColour();\r
- }\r
-\r
- void changeColour()\r
- {\r
- if(abovePIDThreshold.isSelected())\r
- abovePIDThreshold_actionPerformed(null);\r
- else if(conservationMenuItem.isSelected())\r
- conservationMenuItem_actionPerformed(null);\r
-\r
- alignPanel.seqPanel.seqCanvas.paintFlag = true;\r
- alignPanel.repaint();\r
- }\r
-\r
- void addConservationOrPIDColour()\r
- {\r
- int x=0, y=0, threshold = 70;\r
-\r
- if(sliderFrame!=null)\r
- try\r
- {\r
- x = sliderFrame.getX();\r
- y = sliderFrame.getY();\r
- SliderPanel sp = (SliderPanel) sliderFrame.getContentPane();\r
- threshold = sp.getValue();\r
- sliderFrame.setClosed(true);\r
- }\r
- catch (Exception ex)\r
- { ex.printStackTrace(); }\r
-\r
- ColourSchemeI oldCs = viewport.getGlobalColourScheme();\r
-\r
- ConservationColourScheme ccs = null;\r
- if (oldCs instanceof ConservationColourScheme)\r
- ccs = (ConservationColourScheme) oldCs;\r
-\r
- if(conservationMenuItem.isSelected())\r
- {\r
- Alignment al = (Alignment)viewport.alignment;\r
- Conservation c = new Conservation("All",\r
- ResidueProperties.propHash, 3, al.getSequences(), 0,\r
- al.getWidth() );\r
-\r
- c.calculate();\r
- c.verdict(false, 100);\r
-\r
- if(ccs!=null)\r
- ccs = new ConservationColourScheme(c, ccs.cs);\r
- else\r
- ccs = new ConservationColourScheme(c, oldCs);\r
-\r
- viewport.setGlobalColourScheme( ccs );\r
-\r
- }\r
- else if(oldCs instanceof ConservationColourScheme)\r
- {\r
- oldCs = ccs.cs;\r
- viewport.setGlobalColourScheme( oldCs );\r
- }\r
-\r
-\r
- if( conservationMenuItem.isSelected() || abovePIDThreshold.isSelected() )\r
- {\r
- sliderFrame = new JInternalFrame();\r
- sliderFrame.setMaximizable(false);\r
- sliderFrame.setResizable(false);\r
-\r
- SliderPanel sp = null;\r
- if (conservationMenuItem.isSelected())\r
- {\r
- if(threshold > 50)\r
- threshold = 30;\r
- sp = new SliderPanel(alignPanel, threshold, true,ccs);\r
- Desktop.addInternalFrame(sliderFrame, "Conservation Colour Increment (Global colour)", 400, 90);\r
- threshold = 0;\r
- }\r
- else if (abovePIDThreshold.isSelected())\r
- {\r
- sp = new SliderPanel(alignPanel, threshold, false, oldCs);\r
- sp.cs = oldCs;\r
- Desktop.addInternalFrame(sliderFrame, "Percentage Identity Threshold (Global colour)", 400, 90);\r
- }\r
-\r
- sliderFrame.setContentPane(sp);\r
- if(x!=0 && y!=0)\r
- sliderFrame.setLocation(x,y);\r
-\r
- }\r
- else\r
- threshold = 0;\r
-\r
-\r
- if (oldCs instanceof ResidueColourScheme)\r
- {\r
- ResidueColourScheme rcs = (ResidueColourScheme) oldCs;\r
- rcs.setThreshold(threshold);\r
- }\r
- else if (oldCs instanceof ScoreColourScheme)\r
- {\r
- ScoreColourScheme scs = (ScoreColourScheme) oldCs;\r
- scs.setThreshold(threshold);\r
- }\r
-\r
- alignPanel.seqPanel.seqCanvas.paintFlag = true;\r
- alignPanel.repaint();\r
-\r
- }\r
-\r
- protected void conservationMenuItem_actionPerformed(ActionEvent e)\r
- {\r
- if(abovePIDThreshold.isSelected())\r
- abovePIDThreshold.setSelected(false);\r
-\r
- viewport.setConservationSelected(conservationMenuItem.isSelected());\r
-\r
- addConservationOrPIDColour();\r
- }\r
-\r
- JInternalFrame sliderFrame;\r
- public void abovePIDThreshold_actionPerformed(ActionEvent e)\r
- {\r
- if(conservationMenuItem.isSelected())\r
- conservationMenuItem.setSelected(false);\r
-\r
- addConservationOrPIDColour();\r
- }\r
-\r
-\r
-\r
- public void userDefinedColour_actionPerformed(ActionEvent e)\r
- {\r
- JInternalFrame frame = new JInternalFrame();\r
- UserDefinedColours chooser = new UserDefinedColours( frame, alignPanel, null);\r
- frame.setContentPane(chooser);\r
- Desktop.addInternalFrame(frame,"User defined colours", 450,540 );\r
- frame.setResizable(false);\r
- frame.setIconifiable(false);\r
- frame.setMaximizable(false);\r
- }\r
-\r
- public void PIDColour_actionPerformed(ActionEvent e)\r
- {\r
- viewport.setGlobalColourScheme( new PIDColourScheme() );\r
- alignPanel.setColourScheme( );\r
- }\r
-\r
-\r
- public void BLOSUM62Colour_actionPerformed(ActionEvent e)\r
- {\r
- viewport.setGlobalColourScheme( new Blosum62ColourScheme(viewport) );\r
- alignPanel.setColourScheme();\r
- }\r
-*/\r
-//////////////////////////////////////\r
protected void groupAnnotation_actionPerformed(ActionEvent e)\r
{\r
\r