jdk/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java
changeset 4957 e33105a2db5b
parent 4394 92a8ec883f5d
child 4963 004eaf21ba24
equal deleted inserted replaced
4851:4f7de5eeeac7 4957:e33105a2db5b
  1569             }
  1569             }
  1570 
  1570 
  1571             offset = 0;
  1571             offset = 0;
  1572             scrollTimer.stop();
  1572             scrollTimer.stop();
  1573 
  1573 
  1574             // This is the way we have to determine snap-to-ticks.  It's
  1574             isDragging = false;
  1575             // hard to explain but since ChangeEvents don't give us any
  1575             slider.setValueIsAdjusting(false);
  1576             // idea what has changed we don't have a way to stop the thumb
       
  1577             // bounds from being recalculated.  Recalculating the thumb
       
  1578             // bounds moves the thumb over the current value (i.e., snapping
       
  1579             // to the ticks).
       
  1580             if (slider.getSnapToTicks() /*|| slider.getSnapToValue()*/ ) {
       
  1581                 isDragging = false;
       
  1582                 slider.setValueIsAdjusting(false);
       
  1583             }
       
  1584             else {
       
  1585                 slider.setValueIsAdjusting(false);
       
  1586                 isDragging = false;
       
  1587             }
       
  1588             slider.repaint();
  1576             slider.repaint();
  1589         }
  1577         }
  1590 
  1578 
  1591         /**
  1579         /**
  1592         * If the mouse is pressed above the "thumb" component
  1580         * If the mouse is pressed above the "thumb" component