X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FSeqPanel.java;h=0b84fa53172fd7531db253bd4349e5cfc64507d1;hb=8548008f4fbd321b445c7e69fbdffda26e21f457;hp=3e47f4b91169d714a675ba17e7dba59c6399162e;hpb=6f3b2d39f15649cfa5808e18edbe8d5e876dc011;p=jalview.git diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 3e47f4b..0b84fa5 100755 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -115,8 +115,7 @@ public class SeqPanel extends JPanel seqEditOccurred = -1; - ap.RefreshPanels(); - repaint(); + ap.repaint(); } @@ -175,8 +174,6 @@ public class SeqPanel extends JPanel y %= chunkHeight; seq = y / av.getCharHeight() + av.getStartSeq(); - // chunkHeight = (da.getHeight() + 2)*charHeight; - // startx += chunkWidth; } else { @@ -422,14 +419,9 @@ public class SeqPanel extends JPanel stretchGroup = sg; if(av.getConservationSelected()) - Desktop.setConservationSliderSource(ap, av.getGlobalColourScheme(), "Background"); - else if(av.getGlobalColourScheme()!=null && av.getGlobalColourScheme().canThreshold()) - { - ResidueColourScheme rcs = (ResidueColourScheme) av.getGlobalColourScheme(); - int threshold = rcs.getThreshold(); - if (threshold > 0) - Desktop.setPIDSliderSource(ap, av.getGlobalColourScheme(), "Background"); - } + SliderPanel.setConservationSlider(ap, av.getGlobalColourScheme(), "Background"); + if(av.getAbovePIDThreshold()) + SliderPanel.setPIDSliderSource(ap, av.getGlobalColourScheme(), "Background"); } else if( javax.swing.SwingUtilities.isRightMouseButton(evt)) @@ -474,13 +466,9 @@ public class SeqPanel extends JPanel else if(stretchGroup.cs instanceof ConservationColourScheme) { - ConservationColourScheme ccs = (ConservationColourScheme)stretchGroup.cs; - - + ConservationColourScheme ccs = (ConservationColourScheme)stretchGroup.cs; stretchGroup.cs = ccs; - - - Desktop.setConservationSliderSource(ap, stretchGroup.cs, stretchGroup.getName()) ; + SliderPanel.setConservationSlider(ap, stretchGroup.cs, stretchGroup.getName()) ; repaint(); } @@ -489,9 +477,7 @@ public class SeqPanel extends JPanel if(stretchGroup.cs !=null && stretchGroup.cs.canThreshold()) { ResidueColourScheme rcs = (ResidueColourScheme) stretchGroup.cs; - int threshold = rcs.getThreshold(); - if(threshold>0) - Desktop.setPIDSliderSource(ap, stretchGroup.cs, stretchGroup.getName()); + SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, stretchGroup.getName()); } } @@ -513,6 +499,10 @@ public class SeqPanel extends JPanel if(stretchGroup==null) return; + if(res>av.alignment.getWidth()-2) + res = av.alignment.getWidth()-2; + + if(stretchGroup.getEndRes()==res) // Edit end res position of selected group changeEndRes = true; @@ -544,7 +534,7 @@ public class SeqPanel extends JPanel else if (y < oldSeq) dragDirection = -1; - while (y != oldSeq && oldSeq>0) + while (y != oldSeq && oldSeq>0 && y