This content has been marked as final. Show 2 replies
(1) Whenever I am navigating to different page (by a click or double click of a node ), I want to have an animation -- old page moving towards left and getting removed altogether and new page getting loaded from right hand side.Yes, see:
http://docs.oracle.com/javafx/2/api/javafx/animation/package-summary.html (Animation API)
http://www.e-zest.net/blog/sliding-in-javafx-its-all-about-clipping/ (Sliding in JavaFX)
http://fxexperience.com/2012/03/canned-animations/ (Animation Lib)
http://gist.github.com/1437374 (Panel Slide Effect)
(2) Can a click of a mouse be mapped to Gesture EventsI don't think this can be done with the public API. One way to do it would be to add a filter on your layout pane which consumes the mouse click event and generates a SwipeEvent, but SwipeEvent has no constructor - so this would not work. There is an existing Jira request to create public constructors for event classes so that this kind of thing could be done. Perhaps you could make use of private impl_ apis or com.sun classes to allow this to be done with JavaFX 2.2, but I wouldn't recommend that approach.
Also it is probably best to place separate questions in separate posts for ease of searching etc.
Thanks for the prompt reply. I will take care about posting different questions in different posts.