jouni / animator Goto Github PK
View Code? Open in Web Editor NEWGeneral purpose animation add-on for Vaadin. Animate any component directly from the server side.
Home Page: http://vaadin.com/addon/animator
General purpose animation add-on for Vaadin. Animate any component directly from the server side.
Home Page: http://vaadin.com/addon/animator
Add removeListener(AnimationListener) method to AnimationProxy to provide a symmetric API.
Plus, as AnimatorProxy is a descendant of Component, AnimationListener needs to extend the Component.Listener interface, so it can be passed to Component.removeListener(Component.Listener). (via @marlonrichert)
AnimatorProxy needs a removeListener(AnimationListener) method. Plus, as AnimatorProxy is a descendant of Component, AnimationListener needs to extend the Component.Listener interface, so it can be passed to Component.removeListener(Component.Listener).
Hi again,
Found it rather impossible to extend Animator as it stands because the constructor is private. I appreciate the cleanliness of the static.animate() pattern but I'll need to attach some listeners to do stuff when the animations are complete which I can't see how I can do right now?
Thanks,
Peter
A roll right close option is needed
ROLL_RIGHT_CLOSE
/**
* Close the target by clipping it with a mask moving from left to right.
* Removes the component from its parent layout after the animation is
* finished.
*/
From posting:
So regarding the right close animation, would you like the animation to move the curtain from the left edge of the component to the right edge while simultaneously keeping the components right edge in place (i.e. not moving the left side of the component, only clipping the component visually from the left to right)?
For the Left Open, the component should be in place and fully hidden at the start, and the curtain should reveal from right to left.
ROLL_LEFT_OPEN,
/**
* Reveals the target by clipping it with a mask moving to the left.
*/
Hi all,
I had an exception using AnimatorProxy as shown in the following:
Grave: Terminal error:
java.lang.NullPointerException
at org.vaadin.jouni.animator.AnimatorProxy.changeVariables(AnimatorProxy.java:170)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVariables(AbstractCommunicationManager.java:1460)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1404)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1329)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:761)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:95)
at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
I tried to debug my application but it seems that it's all ok.
Can anyone get me further information about the cause of this exception?
Thanks in advance
I see comments about error:
Widgetset does not contain implementation for org.vaadin.jouni.animator.server.AnimatorProxy
Does it work now?
Thanks.
Hi,
I am unable to know when the animation is finished as I need to do stuff as soon as it's done.
Will it be possible to add functionality e.g. be able to add the AnimationEndListener.
The class 'Animator' of 'animator-2.0.0' has a
But to call the non-static public methods I need an 'Animator' instance.
See
Requirement: either remove these methods or make them usable. Or is there a trick to use them?
If we move layout back and forth in X direction it rises 1px up each time. So we need y+=1 to compensate it.
public void onOpenThird() {
view.getAnimator().animate((HorizontalLayout) view, AnimType.SIZE).setDuration(150)
.setData("width=+450,x=-450,y=+1");
view.getAnimator().animate(view.getRightContent(), AnimType.FADE_IN).setDuration(150).setDelay(150);
}
public void onCloseThird() {
view.getAnimator().animate(view.getRightContent(), AnimType.FADE_OUT).setDuration(150);
view.getAnimator().animate((HorizontalLayout) view, AnimType.SIZE).setDuration(150)
.setData("width=-450,x=+450,y=+1").setDelay(150);
}
Hi Jouni,
Great add-on, thank you!
I'm playing around with the 2.0 version and would really love to be able to chain transformations with a specified delay between each. I'll try and see if I can achieve that by sub-classing around a bit but perhaps something to put on your radar as a cool addition!
Thanks,
Peter
Velocity.js should be as performant or better than CSS transitions and animations.
The benefits of using velocity.js
The cons of using velocity.js
If you profile an application which uses the AnimatorProxy component using a server-side only tool (such as JMeter), the memory usage of the app will grow uncontrollably.
This is because the AnimatorProxy depends on messages sent from the client back to the server for it to clean up references to the animations. So in real use, such memory leaks will not be present.
The place in code where the cleanup is done: https://github.com/jounikoivuviita/Animator/blob/master/src/org/vaadin/jouni/animator/AnimatorProxy.java#L155
AnimationListener.onAnimation method name is confusing. The callback method is called when the animation finished running in the client.
The method name could be onAnimationEnd.
(copied from earlier repo, posted by @tehapo)
Please add support for Vaadin 8... thanks in advance!
The addon jar contains an extra package "build.classes.org.vaadin.jouni.animator" with duplicates of all the class files.
Using animator jar version 1.7.1
Please implement Serializable on all your classes.
And also, Animation objects may exceed 1MB in size, which is not allowed in memcache in Google App Engine. In this case, a terminal error is thrown through Vaadin and which is hard to recover from in the application.
Currently it's working not so good, as expected.
Cell roll_up and roll_down is looking good, but at the same time table resizing is poor.
Is it planned to implement?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.