• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to show opacity animations on transparent stages?

 
John Astralidis
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I am trying to do is to show a fade-in/out transition effect on an transparent stage (pop-up notification) with shadow effect.

I created a transparent scene with a StackPane set to and inside the StackPane I wrap an AnchorPane with a shadow effect. Next, I setup my transparent stage with that scene.




So far so good. I managed to get this transparent stage with a nice shadow effect.

NOTE: The picture below shows my transparent stage with a shadow effect over my desktop, which has that cyan color.




But now, since I've added some transition effects to gradually fade in and fade out the Stage (when user clicks on "x"), the Stage is barely shown. Something like the transition effect stops in the middle of its execution (I set to transform opacity from 0.0 to 1.0).




You can see it in the taskbar below as there is a second java window which is that stage.



If I place my cursor over the "x" button then it just shows up. Which means (I suppose) that transitions are played, but the stage is (somehow) not shown or transparent, until something graps its focus.

I tried



with no success.

When I change StageStyle.UNDECORATED on Stage, then the stage is shown with its transitions but there is that annoying white background around it, which is expected so.



Could you please provide some help? I can't understand why this is happening or how to find a possible solution.

--- UPDATE ---

After some testing, I conclude that there might be a "mis-compatibility" between StageStyle.TRANSPARENT stages and transition opacity effects ?

My transitions code is:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic