Exemple #1
0
 /**
  * @see TimelineCallback#onTimelineStateChanged(org.pushingpixels.trident.Timeline.TimelineState,
  *     org.pushingpixels.trident.Timeline.TimelineState, float, float)
  */
 @Override
 public void onTimelineStateChanged(
     final Timeline.TimelineState ts,
     final Timeline.TimelineState ts1,
     final float f,
     final float f1) {
   // If the current timeline is done then we play the next one...
   if (ts1 == Timeline.TimelineState.DONE) nextTimeline.play();
 }
Exemple #2
0
  public static void main(String[] args) {
    HelloWorld helloWorld = new HelloWorld();
    Timeline timeline = new Timeline(helloWorld);
    timeline.addPropertyToInterpolate("value", 0.0f, 1.0f);
    timeline.play();

    try {
      Thread.sleep(3000);
    } catch (Exception exc) {
    }
  }
 @Override
 public void setLcdValueAnimated(final double LCD_VALUE) {
   if (isEnabled()) {
     if (timeline.getState() != Timeline.TimelineState.IDLE) {
       timeline.abort();
     }
     timeline = new Timeline(this);
     timeline.addPropertyToInterpolate("lcdValue", this.lcdValue, LCD_VALUE);
     timeline.setEase(EASING);
     timeline.setDuration((long) (2000));
     timeline.play();
   }
 }