本文整理汇总了Java中org.jdesktop.animation.timing.triggers.TimingTrigger类的典型用法代码示例。如果您正苦于以下问题:Java TimingTrigger类的具体用法?Java TimingTrigger怎么用?Java TimingTrigger使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TimingTrigger类属于org.jdesktop.animation.timing.triggers包,在下文中一共展示了TimingTrigger类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: DemoPanel
import org.jdesktop.animation.timing.triggers.TimingTrigger; //导入依赖的package包/类
public DemoPanel(Demo demo) {
this.demo = demo;
setLayout(new BorderLayout());
// remind(aim): how to access resourceMap?
//resourceMap = getContext().getResourceMap();
LoadAnimationPanel loadAnimationPanel = new LoadAnimationPanel();
add(loadAnimationPanel);
loadAnimationPanel.setAnimating(true);
LoadedDemoPanel demoPanel = new LoadedDemoPanel(demo);
try {
loadAnimationPanel.setAnimating(false);
Animator fadeOutAnimator = new Animator(400,
new FadeOut(DemoPanel.this,
loadAnimationPanel, demoPanel));
fadeOutAnimator.setAcceleration(.2f);
fadeOutAnimator.setDeceleration(.3f);
Animator fadeInAnimator = new Animator(400,
new PropertySetter(DemoPanel.this, "alpha", 0.3f, 1.0f));
TimingTrigger.addTrigger(fadeOutAnimator, fadeInAnimator, TimingTriggerEvent.STOP);
fadeOutAnimator.start();
} catch (Exception ignore) {
System.err.println(ignore);
ignore.printStackTrace();
}
}
开发者ID:freeseawind,项目名称:littleluck,代码行数:30,代码来源:DemoPanel.java
示例2: Triggers
import org.jdesktop.animation.timing.triggers.TimingTrigger; //导入依赖的package包/类
/** Creates a new instance of Triggers */
public Triggers() {
setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
action = new SpherePanel("yellow-sphere.png");
focus = new SpherePanel("blue-sphere.png");
armed = new SpherePanel("red-sphere.png");
over = new SpherePanel("green-sphere.png");
timing = new SpherePanel("gray-sphere.png");
add(action);
add(focus);
add(armed);
add(over);
add(timing);
// Add triggers for each sphere, depending on what we want to
// trigger them
ActionTrigger.addTrigger(triggerButton, action.getAnimator());
FocusTrigger.addTrigger(triggerButton,
focus.getAnimator(), FocusTriggerEvent.IN);
MouseTrigger.addTrigger(triggerButton,
armed.getAnimator(), MouseTriggerEvent.PRESS);
MouseTrigger.addTrigger(triggerButton,
over.getAnimator(), MouseTriggerEvent.ENTER);
TimingTrigger.addTrigger(action.getAnimator(),
timing.getAnimator(), TimingTriggerEvent.STOP);
}
开发者ID:romainguy,项目名称:filthy-rich-clients,代码行数:28,代码来源:Triggers.java
示例3: questionSwipeEvent1
import org.jdesktop.animation.timing.triggers.TimingTrigger; //导入依赖的package包/类
public void questionSwipeEvent1(TextZone tZone) {
if(tZone.isHSwipeable()){
animQuestion11[animIndex1].stop();
animQuestion11[animIndex1] = new Animator(FINAL_TIME, tZone);
start1x[animIndex1] = tZone.getX();
end1x[animIndex1] = tZone.getX() + (sketch.getWidth() - tZone.getX());
start1y[animIndex1] = tZone.getY();
end1y[animIndex1] = tZone.getY();
animQuestion11[animIndex1].setResolution(5);
animQuestion11[animIndex1].start();
int oldAnimIndex = animIndex1;
animIndex1 = animIndex1 + 1;
if(animIndex1 >= Sketch.NUM_QUESTIONS) {
animIndex1 = 0;
}
animQuestion11[animIndex1] = new Animator(TIME, questionZone1[animIndex1]);
animQuestion11[animIndex1].setResolution(5);
questionZone1[animIndex1].setXY(sketch.lineX, sketch.getHeight());
start1x[animIndex1] = sketch.lineX;
end1x[animIndex1] = xMaxTranslation1[animIndex1] + sketch.lineX;
start1y[animIndex1] = sketch.getHeight();
end1y[animIndex1] = sketch.getHeight() + yMaxTranslation1[animIndex1];
TimingTrigger.addTrigger(animQuestion11[oldAnimIndex], animQuestion11[animIndex1], TimingTriggerEvent.STOP);
questionZone1[animIndex1].setGestureEnabled("HSwipe", true);
tZone.setGestureEnabled("HSwipe", false);
}
}
开发者ID:vialab,项目名称:TandemTable,代码行数:40,代码来源:IntroSection.java
示例4: questionSwipeEvent2
import org.jdesktop.animation.timing.triggers.TimingTrigger; //导入依赖的package包/类
public void questionSwipeEvent2(TextZone tZone) {
if(tZone.isHSwipeable()){
animQuestion12[animIndex2].stop();
animQuestion12[animIndex2] = new Animator(FINAL_TIME, tZone);
animQuestion12[animIndex2].setResolution(5);
start2x[animIndex2] = tZone.getX();
end2x[animIndex2] = tZone.getX() - (sketch.getWidth() - tZone.getX());
start2y[animIndex2] = tZone.getY();
end2y[animIndex2] = tZone.getY();
animQuestion12[animIndex2].start();
int oldAnimIndex = animIndex2;
animIndex2 = animIndex2 + 1;
if(animIndex2 >= Sketch.NUM_QUESTIONS) {
animIndex2 = 0;
}
animQuestion12[animIndex2] = new Animator(TIME, questionZone2[animIndex2]);
animQuestion12[animIndex2].setResolution(5);
questionZone2[animIndex2].setXY(sketch.lineX, sketch.getHeight());
start2x[animIndex2] = sketch.lineX;
end2x[animIndex2] = xMaxTranslation2[animIndex2] + sketch.lineX;
start2y[animIndex2] = -zoneHeight2[animIndex2];
end2y[animIndex2] = -zoneHeight2[animIndex2] + yMaxTranslation2[animIndex2];
TimingTrigger.addTrigger(animQuestion12[oldAnimIndex], animQuestion12[animIndex2], TimingTriggerEvent.STOP);
questionZone2[animIndex2].setGestureEnabled("HSwipe", true);
tZone.setGestureEnabled("HSwipe", false);
}
}
开发者ID:vialab,项目名称:TandemTable,代码行数:39,代码来源:IntroSection.java
注:本文中的org.jdesktop.animation.timing.triggers.TimingTrigger类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论