+++ /dev/null
-package jalview.gui;\r
-\r
-import jalview.jbgui.GConservationIncrementPanel;\r
-import jalview.datamodel.*;\r
-import jalview.schemes.*;\r
-import java.awt.event.*;\r
-import javax.swing.event.*;\r
-\r
-public class ConservationIncrementPanel extends GConservationIncrementPanel\r
-{\r
- AlignViewport av;\r
- AlignmentPanel ap;\r
-\r
- public ConservationIncrementPanel(AlignViewport av, AlignmentPanel ap)\r
- {\r
- this.av = av;\r
- this.ap = ap;\r
-\r
- slider.addChangeListener( new ChangeListener()\r
- {\r
- public void stateChanged(ChangeEvent evt)\r
- {\r
- valueField.setText( slider.getValue()+"" );\r
- valueChanged( slider.getValue() );\r
- }\r
- });\r
-\r
- slider.setValue(30);\r
- }\r
-\r
- public void valueChanged(int i)\r
- {\r
- java.util.Vector groups = av.getAlignment().getGroups();\r
-\r
-\r
- for (int j = 0; j < groups.size(); j++)\r
- {\r
- SequenceGroup sg = ( (SequenceGroup) groups.elementAt(j));\r
- if (sg.cs instanceof ConservationColourScheme)\r
- ( (ConservationColourScheme) sg.cs).inc = i;\r
- }\r
-\r
-\r
-\r
- if (av.getGlobalColourScheme() instanceof ConservationColourScheme)\r
- ( (ConservationColourScheme) av.getGlobalColourScheme()).inc = i;\r
-\r
-\r
- ap.seqPanel.seqCanvas.paintFlag=true;\r
- ap.seqPanel.repaint();\r
-\r
- }\r
-\r
- public void valueField_actionPerformed(ActionEvent e)\r
- {\r
- try{\r
- int i = Integer.parseInt(valueField.getText());\r
- slider.setValue(i);\r
- }\r
- catch(Exception ex)\r
- {\r
- valueField.setText( slider.getValue()+"" );\r
- }\r
- }\r
-}\r