public void refresh(){
  label.setText(String.valueOf(MathHelper.round(val,2)));
  if (val == min)   minus.setEnabled(false);
 else   minus.setEnabled(true);
  if (val == max)   plus.setEnabled(false);
 else   plus.setEnabled(true);
  if (cb != null)   cb.callback(val);
  plus.repaint();
  minus.repaint();
  if (progress != null) {
    progress.setValue(val / max);
  }
}

public void refresh ( ) { label . setText ( String . valueOf ( MathHelper . round ( val , 2 ) ) ) ; if ( val == min ) minus . setEnabled ( false ) ; else minus . setEnabled ( true ) ; if ( val == max ) plus . setEnabled ( false ) ; else plus . setEnabled ( true ) ; if ( cb != null ) cb . callback ( val ) ; plus . repaint ( ) ; minus . repaint ( ) ; if ( progress != null ) { progress . setValue ( val / max ) ; } }
refresh the element . this enables / disables any + or - buttons if the clamp is reached , as well as call the callback if required .
