public void suspend() { synchronized (TimelineEngine.LOCK) { TimelineScenarioState oldState = this.state; if (oldState != TimelineScenarioState.PLAYING) return; this.statePriorToSuspension = oldState; this.state = TimelineScenarioState.SUSPENDED; for (TimelineScenarioActor running : this.runningActors) { if (running instanceof Timeline) { ((Timeline) running).suspend(); } } } }
public void suspend() { synchronized (TimelineEngine.LOCK) { TimelineScenarioState oldState = this.state; if (oldState != TimelineScenarioState.PLAYING) return; this.statePriorToSuspension = oldState; this.state = TimelineScenarioState.SUSPENDED; for (TimelineScenarioActor running : this.runningActors) { if (running instanceof Timeline) { ((Timeline) running).suspend(); } } } }
public void suspend() { synchronized (TimelineEngine.LOCK) { TimelineScenarioState oldState = this.state; if (oldState != TimelineScenarioState.PLAYING) return; this.statePriorToSuspension = oldState; this.state = TimelineScenarioState.SUSPENDED; for (TimelineScenarioActor running : this.runningActors) { if (running instanceof Timeline) { ((Timeline) running).suspend(); } } } }
timeline.suspend();
/** * Animates the radar beam of the component. This has no effect * on the functionality but is only eye candy. * @param RUN enables/disables the animation of the beam */ public void animate(final boolean RUN) { if (isEnabled()) { if (RUN) { if (timeline.getState() != Timeline.TimelineState.PLAYING_FORWARD && timeline.getState() != Timeline.TimelineState.SUSPENDED) { timeline = new Timeline(this); timeline.addPropertyToInterpolate("rotationAngle", this.rotationAngle, 2 * Math.PI); timeline.setEase(new org.pushingpixels.trident.ease.Linear()); timeline.setDuration((long) (5000)); timeline.playLoop(Timeline.RepeatBehavior.LOOP); } else if (timeline.getState() == Timeline.TimelineState.SUSPENDED) { timeline.resume(); } } else { timeline.suspend(); } } }
/** * Animates the radar beam of the component. This has no effect * on the functionality but is only eye candy. * @param RUN enables/disables the animation of the beam */ public void animate(final boolean RUN) { if (isEnabled()) { if (RUN) { if (timeline.getState() != Timeline.TimelineState.PLAYING_FORWARD && timeline.getState() != Timeline.TimelineState.SUSPENDED) { timeline = new Timeline(this); timeline.addPropertyToInterpolate("rotationAngle", this.rotationAngle, 2 * Math.PI); timeline.setEase(new org.pushingpixels.trident.ease.Linear()); timeline.setDuration((long) (5000)); timeline.playLoop(Timeline.RepeatBehavior.LOOP); } else if (timeline.getState() == Timeline.TimelineState.SUSPENDED) { timeline.resume(); } } else { timeline.suspend(); } } }