@Override protected void calculateThumbLocation() { super.calculateThumbLocation(); if (slider.getOrientation() == JSlider.HORIZONTAL) { thumbRect.y -= 1; } else { thumbRect.x -= 1; } }
@Override protected void calculateThumbLocation() { super.calculateThumbLocation(); if (slider.getOrientation() == JSlider.HORIZONTAL) { thumbRect.y -= 1; } else { thumbRect.x -= 1; } }
@Override protected void calculateThumbLocation() { super.calculateThumbLocation(); if (slider.getOrientation() == JSlider.HORIZONTAL) { thumbRect.y -= 3; } else { thumbRect.x -= 3; } } /*
@Override protected void calculateThumbLocation() { if (slider.getSnapToTicks()) { adjustSnapHighValue(); } super.calculateThumbLocation(); }
@Override protected void calculateThumbLocation() { super.calculateThumbLocation(); Rectangle trackRect = this.getPaintTrackRect(); if (slider.getOrientation() == JSlider.HORIZONTAL) { int valuePosition = xPositionForValue(slider.getValue()); double centerY = trackRect.y + trackRect.height / 2.0; thumbRect.y = (int) (centerY - thumbRect.height / 2.0) + 1; thumbRect.x = valuePosition - thumbRect.width / 2; } else { int valuePosition = yPositionForValue(slider.getValue()); double centerX = trackRect.x + trackRect.width / 2.0; thumbRect.x = (int) (centerX - thumbRect.width / 2.0) + 1; thumbRect.y = valuePosition - (thumbRect.height / 2); } }
@Override protected void calculateThumbLocation() { super.calculateThumbLocation(); Rectangle trackRect = this.getPaintTrackRect(); if (slider.getOrientation() == JSlider.HORIZONTAL) { int valuePosition = xPositionForValue(slider.getValue()); double centerY = trackRect.y + trackRect.height / 2.0; thumbRect.y = (int) (centerY - thumbRect.height / 2.0) + 1; thumbRect.x = valuePosition - thumbRect.width / 2; } else { int valuePosition = yPositionForValue(slider.getValue()); double centerX = trackRect.x + trackRect.width / 2.0; thumbRect.x = (int) (centerX - thumbRect.width / 2.0) + 1; thumbRect.y = valuePosition - (thumbRect.height / 2); } }
protected void calculateThumbLocation() { super.calculateThumbLocation();
protected void calculateThumbLocation() { super.calculateThumbLocation();
calculateThumbLocation(); slider.repaint();