Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

TitledPane-like Animation

cshNov 22 2011 — edited Nov 23 2011
Hi,

I have a VBox with some nodes.

Now I want to "hide" one of those nodes by using an animation, very similar to the TitledPane.

====================
Node 1

====================

Node 2

====================

Node 3

====================


Node 2 should get collapsed.

I started with (on the Node 2):

TranslateTransition translateTransition = new TranslateTransition(Duration.seconds(1), this);
translateTransition.setToY(-this.getHeight());
translateTransition.play();

It kind of works. Node 2 moves to the top. But I there are still a few problems:

- Node 2 now overlaps Node 1. (but it should of course be the other way round).
- The space in the VBox is still reserved.
- Node 3 (and other content) should move according to the Interpolator which is used for the Transition.

How can I approach this?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 21 2011
Added on Nov 22 2011
5 comments
340 views