org.jdesktop.animation.timing.triggers.TimingTriggerEvent Java Examples
The following examples show how to use
org.jdesktop.animation.timing.triggers.TimingTriggerEvent.
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: DemoPanel.java From littleluck with Apache License 2.0 | 5 votes |
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(); } }
Example #2
Source File: DemoPanel.java From beautyeye with Apache License 2.0 | 5 votes |
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(); } }
Example #3
Source File: Triggers.java From filthy-rich-clients with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** 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); }
Example #4
Source File: DemoPanel.java From Darcula with Apache License 2.0 | 5 votes |
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(); } }