public void configureTimeline(Timeline timeline) { timeline.setDuration(this.timelineDuration); timeline.setEase(DEFAULT_EASE); }
public void configureModifiedTimeline(Timeline timeline) { timeline.setDuration(5 * this.timelineDuration); timeline.setEase(new TimelineEase() { @Override public float map(float durationFraction) { if (durationFraction < 0.8f) { return 0.0f; } return 5.0f * (durationFraction - 0.8f); } }); } }
private void initAnimationTimers() { this.showAnimation = new Timeline(this); this.showAnimation.setDuration(SHOW_TIME); this.showAnimation.addPropertyToInterpolate("opacity", this.minOpacity, this.maxOpacity); this.hideAnimation = new Timeline(this); this.hideAnimation.setDuration(HIDE_TIME); this.hideAnimation.addPropertyToInterpolate("opacity", this.maxOpacity, this.minOpacity); }
@Override public void updateStatus(String text, int level) { label.setText(text); if (level == LEVEL_NORMAL) { label.setBackground(colorNormal); } else { Color blinkColor = (level == LEVEL_WARNING) ? colorWarning : colorError; Timeline timeline = new Timeline(label); timeline.setDuration(200); timeline.setEase(new Sine()); timeline.addPropertyToInterpolate("background", colorNormal, blinkColor); timeline.playLoop(8, RepeatBehavior.REVERSE); } }
/** * Installs defaults on the associated color selector component. */ protected void installDefaults() { this.rolloverTimeline = new Timeline(this); this.rolloverTimeline.addPropertyToInterpolate("rollover", 0.0f, 1.0f); this.rolloverTimeline.addCallback(new SwingRepaintCallback( this.colorSelectorComponent)); this.rolloverTimeline.setDuration(150); }
@Override protected void onUpdate() { this.setVisible(this.descriptor.isVisible()); this.progressTl.abort(); this.progressTl.setDuration(1000 / this.descriptor.getFps()); this.progressTl.playLoop(Timeline.RepeatBehavior.LOOP); }
public static void blinkComponent(JComponent component){ final Timeline timeline = new Timeline(component); timeline.addPropertyToInterpolate("background", component.getBackground(), GuiUtils.getAverageColor(component.getBackground(), component.getForeground())); timeline.setDuration(150); timeline.playLoop(2, Timeline.RepeatBehavior.REVERSE); } }
public IconGlowTracker(Component component) { this.component = component; this.iconGlowTimeline = new Timeline(this.component); AnimationConfigurationManager.getInstance().configureTimeline( this.iconGlowTimeline); this.iconGlowTimeline.setDuration(10 * this.iconGlowTimeline .getDuration()); this.iconGlowTimeline.addCallback(new SwingRepaintCallback(component)); this.iconGlowTimeline.setName("Icon glow"); }
@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(); } }
public IconGlowTracker(Component component) { this.component = component; this.iconGlowTimeline = new Timeline(this.component); AnimationConfigurationManager.getInstance().configureTimeline( this.iconGlowTimeline); this.iconGlowTimeline.setDuration(10 * this.iconGlowTimeline .getDuration()); this.iconGlowTimeline.addCallback(new SwingRepaintCallback(component)); this.iconGlowTimeline.setName("Icon glow"); }
@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(animationDuration); timeline.play(); } }
@Override public void setValueAnimated(final double VALUE) { if (timeline.getState() == Timeline.TimelineState.PLAYING_FORWARD || timeline.getState() == Timeline.TimelineState.PLAYING_REVERSE) { timeline.abort(); } timeline = new Timeline(this); timeline.addPropertyToInterpolate("value", this.oldValue, VALUE); timeline.setEase(new Spline(0.5f)); timeline.setDuration(1500); timeline.play(); }
@Override public void setValueAnimated(final double VALUE) { if (timeline.getState() == Timeline.TimelineState.PLAYING_FORWARD || timeline.getState() == Timeline.TimelineState.PLAYING_REVERSE) { timeline.abort(); } timeline = new Timeline(this); timeline.addPropertyToInterpolate("value", value, VALUE); timeline.setEase(new Spline(0.5f)); timeline.setDuration(800); timeline.play(); }
@Override public void setValueAnimated(final double VALUE) { if (timeline.getState() == Timeline.TimelineState.PLAYING_FORWARD || timeline.getState() == Timeline.TimelineState.PLAYING_REVERSE) { timeline.abort(); } timeline = new Timeline(this); timeline.addPropertyToInterpolate("value", value, VALUE); timeline.setEase(new Spline(0.5f)); timeline.setDuration(800); timeline.play(); }
@Override public void setValueAnimated(final double VALUE) { if (timeline.getState() == Timeline.TimelineState.PLAYING_FORWARD || timeline.getState() == Timeline.TimelineState.PLAYING_REVERSE) { timeline.abort(); } timeline = new Timeline(this); timeline.addPropertyToInterpolate("value", this.oldValue, VALUE); timeline.setEase(new Spline(0.5f)); timeline.setDuration(1500); timeline.play(); }
public void setRollAnimated(final double ROLL) { if (isEnabled()) { if (timelineRoll.getState() == Timeline.TimelineState.PLAYING_FORWARD || timelineRoll.getState() == Timeline.TimelineState.PLAYING_REVERSE) { timelineRoll.abort(); } timelineRoll = new Timeline(this); timelineRoll.addPropertyToInterpolate("roll", this.oldRoll, ROLL); timelineRoll.setEase(new Spline(0.5f)); timelineRoll.setDuration(800); timelineRoll.play(); } }
public void setPitchAnimated(final double PITCH) { if (isEnabled()) { if (timelinePitch.getState() == Timeline.TimelineState.PLAYING_FORWARD || timelinePitch.getState() == Timeline.TimelineState.PLAYING_REVERSE) { timelinePitch.abort(); } timelinePitch = new Timeline(this); timelinePitch.addPropertyToInterpolate("pitch", this.oldPitch, PITCH); timelinePitch.setEase(new Spline(0.5f)); timelinePitch.setDuration(800); timelinePitch.play(); } }
public void setPitchAnimated(final double PITCH) { if (isEnabled()) { if (timelinePitch.getState() == Timeline.TimelineState.PLAYING_FORWARD || timelinePitch.getState() == Timeline.TimelineState.PLAYING_REVERSE) { timelinePitch.abort(); } timelinePitch = new Timeline(this); timelinePitch.addPropertyToInterpolate("pitch", this.oldPitch, PITCH); timelinePitch.setEase(new Spline(0.5f)); timelinePitch.setDuration(800); timelinePitch.play(); } }
@Override public void setValueAnimated(double value) { if (isEnabled()) { if (timeline.getState() == Timeline.TimelineState.PLAYING_FORWARD || timeline.getState() == Timeline.TimelineState.PLAYING_REVERSE) { timeline.abort(); } timeline = new Timeline(this); timeline.addPropertyToInterpolate("value", getValue(), value); timeline.setEase(EASE); timeline.setDuration(easingDuration); timeline.play(); } }
public void setRollAnimated(final double ROLL) { if (isEnabled()) { if (timelineRoll.getState() == Timeline.TimelineState.PLAYING_FORWARD || timelineRoll.getState() == Timeline.TimelineState.PLAYING_REVERSE) { timelineRoll.abort(); } timelineRoll = new Timeline(this); timelineRoll.addPropertyToInterpolate("roll", this.oldRoll, ROLL); timelineRoll.setEase(new Spline(0.5f)); timelineRoll.setDuration(800); timelineRoll.play(); } }