protected boolean handleScaleSelection(Scale scale) { int min = scale.getMinimum(); double portion = (scale.getSelection() - min) * 1.0d / (scale.getMaximum() - min); boolean selectionChanged = internalSetSelection(portion, false); refresh(); return selectionChanged; }
protected void refreshScale(Scale scale) { int min = scale.getMinimum(); int sel = (int) Math.round((scale.getMaximum() - min) * selectionRatio + min); scale.setSelection(sel); scale.setToolTipText(getSelectionText()); }