Java Code Examples for org.pushingpixels.trident.Timeline#playLoop()
The following examples show how to use
org.pushingpixels.trident.Timeline#playLoop() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JLabelStatusObserver.java From otroslogviewer with Apache License 2.0 | 5 votes |
@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); } }
Example 2
Source File: PlayerImagePanel.java From magarena with GNU General Public License v3.0 | 5 votes |
private void doDamageAnimation() { if (GeneralConfig.get(BooleanSetting.ANIMATE_GAMEPLAY)) { final Timeline timeline = new Timeline(); timeline.setDuration(100); timeline.addPropertyToInterpolate( Timeline.property("damageColorOpacity").on(this).from(0).to(120)); timeline.playLoop(6, Timeline.RepeatBehavior.REVERSE); } }
Example 3
Source File: ZoneToggleButton.java From magarena with GNU General Public License v3.0 | 5 votes |
private void doAlertAnimation(int loopCount) { if (MagicAnimations.isOn(AnimationFx.ZBUTTON_PULSE)) { timeline1 = new Timeline(); timeline1.setDuration(200); timeline1.addPropertyToInterpolate( Timeline.property("imageOffset").on(this).from(0).to(4)); timeline1.playLoop(loopCount, Timeline.RepeatBehavior.REVERSE); } }
Example 4
Source File: GuiUtils.java From otroslogviewer with Apache License 2.0 | 4 votes |
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); }