TabPaneSkin modification of styleable property

Tom Schindl tom.schindl at bestsolution.at
Tue May 20 11:26:05 UTC 2014


Hi,

This question is mostly for David but others might be able to support my
feeling that TabPaneSkin works against the CSS-Engine inside its
initializeTabListener-method where it does something like this:

>                     // save and set tab animation to none - as it is not a good idea
>                     // to animate on the same data for open and close.
>                     TabAnimation prevOpenAnimation = openTabAnimation.get();
>                     TabAnimation prevCloseAnimation = closeTabAnimation.get();
>                     openTabAnimation.set(TabAnimation.NONE);
>                     closeTabAnimation.set(TabAnimation.NONE);
>                     for (int i = c.getFrom(); i < c.getTo(); i++) {
>                         permutatedTabs.add(tabs.get(i));
>                     }
> 
>                     removeTabs(permutatedTabs);
>                     addTabs(permutatedTabs, c.getFrom());
>                     openTabAnimation.set(prevOpenAnimation);
>                     closeTabAnimation.set(prevCloseAnimation);

if I now appropriately understand the working of the CSS-Engine it will
never set a value from CSS afterwards because the property origin is set
to user.

Minor detail - the code of remembering and restoring the state should
most likely be wrapped in a try-finally statement.

Tom


More information about the openjfx-dev mailing list