Esempio n. 1
0
 @Override
 public void onJump(GSMovie m) {
   if (timeSlider != null) {
     timeSlider.setVisible(true);
     timeSlider.setValue(m.time());
   }
 }
Esempio n. 2
0
 @Override
 public void onNewFrame(GSMovie m) {
   if (!stopSliderAdvance && m != null && timeSlider != null) {
     timeSlider.setValue(m.time());
   }
   updateTimeInfo(m);
 }
Esempio n. 3
0
  private void updateTimeInfo(GSMovie m) {
    int totalElapsedSeconds = (int) m.time();
    int se = totalElapsedSeconds % 60;
    totalElapsedSeconds -= se;
    int totalElapsedMin = totalElapsedSeconds / 60;

    int me = totalElapsedMin % 60;
    totalElapsedMin -= me;
    int totalElapsedHours = totalElapsedMin / 60;
    int he = totalElapsedHours;

    totalElapsedSeconds = (int) movieView.getDuration();
    int sd = totalElapsedSeconds % 60;
    totalElapsedSeconds -= sd;
    totalElapsedMin = totalElapsedSeconds / 60;

    int md = totalElapsedMin % 60;
    totalElapsedMin -= md;
    totalElapsedHours = totalElapsedMin / 60;
    int hd = totalElapsedHours;

    displayTime(getTimeString(he, me, se, hd, md, sd));
  }