Beispiel #1
0
  public void setLimit(long newLimit) {
    if (newLimit != 0) {
      this.limit = newLimit;

      if (formatting == Formatting.TIME) {
        limitDisplay.setText(StringUtils.toHhMmSs(limit));
      } else {
        limitDisplay.setText(String.valueOf(limit));
      }

      separationSlash.setVisible(limit != -1);
      limitDisplay.setVisible(limit != -1);
      progress.setVisible(limit != -1);
    }
  }
Beispiel #2
0
 @Override
 public void setValue(long value) {
   if (formatting == Formatting.TIME) numberDisplay.setText(StringUtils.toHhMmSs(value));
   else numberDisplay.setText(String.valueOf(value));
   progress.setProgress((double) value / (double) limit);
 }