本文整理汇总了Java中org.pushingpixels.trident.Timeline.playLoop方法的典型用法代码示例。如果您正苦于以下问题:Java Timeline.playLoop方法的具体用法?Java Timeline.playLoop怎么用?Java Timeline.playLoop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pushingpixels.trident.Timeline
的用法示例。
在下文中一共展示了Timeline.playLoop方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateStatus
import org.pushingpixels.trident.Timeline; //导入方法依赖的package包/类
@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);
}
}
示例2: doDamageAnimation
import org.pushingpixels.trident.Timeline; //导入方法依赖的package包/类
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);
}
}
示例3: doAlertAnimation
import org.pushingpixels.trident.Timeline; //导入方法依赖的package包/类
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);
}
}
示例4: trackTabModification
import org.pushingpixels.trident.Timeline; //导入方法依赖的package包/类
private void trackTabModification(int tabIndex, Component tabComponent) {
Timeline modifiedTimeline = new Timeline(tabPane);
AnimationConfigurationManager.getInstance().configureModifiedTimeline(
modifiedTimeline);
modifiedTimeline.addCallback(new TabRepaintCallback(tabPane, tabIndex));
modifiedTimeline.playLoop(RepeatBehavior.REVERSE);
modifiedTimelines.put(tabComponent, modifiedTimeline);
}
示例5: blinkComponent
import org.pushingpixels.trident.Timeline; //导入方法依赖的package包/类
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);
}