Пример #1
0
 /**
  * Allow to update the progress status of the current component loading process. As the instance
  * of TPTLazyLoader is passed to your LazyLoader implementation, you may update the progress from
  * there.
  *
  * @param progress new progress. Must be specified from 0.0 to 1.0, which reflects 0% ... 100%
  *     interval. If set to 0.0, a progress indicator will be swithced to indeterminate mode,
  *     displaying an endless wheel.
  */
 public void setLoadingProgress(float progress) {
   if (progress == 0.0f) {
     progressBar.setIndeterminate(true);
   } else {
     progressBar.setIndeterminate(false);
     progressBar.setValue(progress);
   }
 }
Пример #2
0
 @Override
 public void updateTrackPosition(Song song, long elapsedTime) {
   if (song != null) {
     double lenght = (double) song.getSong().getLength();
     indicator.setValue(new Float(elapsedTime / lenght));
     labelMusic.setValue(song.getArtist() + " - " + song.getTitle());
     labelDuration.setValue(
         Utils.formatTime(song.getSong().getLength(), TimeUnit.SECONDS)
             + " / "
             + Utils.formatTime(elapsedTime, TimeUnit.SECONDS));
   }
 }
Пример #3
0
  public UploadUnit(
      String url,
      String dbName,
      String driver,
      String userName,
      String password,
      User user,
      TabSheet mainTabs,
      TabSheet subTabs) {
    this.user = user;
    this.mainTabs = mainTabs;
    this.subTabs = subTabs;

    eh = new ExperimentHandler(url, dbName, driver, userName, password);
    this.updateComponents(this.user);

    auth = new Authenticator(url, dbName, driver, userName, password);
    pi.setValue(0f);
    pi.setCaption("Loading...");
    pi.setVisible(false);
  }