示例#1
0
 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;
 }
示例#2
0
 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());
 }