TitledPanes and animated Treeviews

Sebastian Rheinnecker sebastian.rheinnecker at yworks.com
Fri May 17 05:30:59 PDT 2013


Hm, appearently my images were filtered by the mail client, so i 
uploaded them elsewhere:

http://250kb.de/v7vUkfn

http://250kb.de/rLZSrNF

Kind regards,
Sebastian

Am 17.05.2013 12:47, schrieb Sebastian Rheinnecker:
> Hello,
>
> I wanted to achive a Navigation for my application that looks like a 
> TreeView but is animated like a TitledPane. That is, a Transition when 
> expanding/collapsing an item for its content.
>
> What I did so far is to nest multiple Accordions like this:
>
>     - TopAccordion
>     ---- TitledPane
>     ------- Accordion
>     ----------TitledPane
>     ----------TitledPane
>     ----------TitledPane
>     ---- TitledPane
>     ------- Accordion
>     ----------TitledPane
>     ----------TitledPane
>     ----------TitledPane
>
> etc.
>
> However, this approach results in ugly states in the transition when 
> expanding/collapsing inner TitledPanes. For an example, I followed the 
> example code on TitledPanes on the Oracle website and added my 
> approach to it. In the attached image "nestedaccordions.png" (made of 
> AccordionsTest.java) you can see that there is a gap between the end 
> of the inner Accordion and the next TitledPane. This effect increases 
> when the Accordions are deeper nested and another branch is expanded. 
> I also noticed that this does not only happen to nested Accordions but 
> other controls as well, for example, I followed the code provided in 
> this thread: 
> https://forums.oracle.com/forums/thread.jspa?threadID=2339215 and the 
> result is depictured in the attached "accordionwithtreeview.png".
>
> I noticed that there is a hardcoded EASE_IN and EASE_OUT interpolator 
> used for the animation of the TitledPane.  I believe that this does 
> some nasty stuff when those are nested. The issue persists in JavaFX 8.0.
>
> On another note, to workaround this, I searched for ways to implement 
> a custom TreeCell that is animated when collapsing/expanding a branch 
> in a TreeView. I couldn't find API for this or even an example 
> anywhere, is this not possible?
>
> Kind regards,
> Sebastian
>


-- 
Sebastian Rheinnecker
phone: +49 7071 9709050
fax: +49 7071 9709051

yWorks GmbH
Vor dem Kreuzberg 28
72070 Tuebingen
Germany
http://www.yworks.com
Managing Directors: Sebastian Müller, Michael Pfahler
Commercial Registry: Stuttgart, Germany, HRB 382340



More information about the openjfx-dev mailing list