JavaFX 2.0 Deck Pane Control


I experiment a lot with everything including new javaFX. Few weeks ago I had to make some “Container” that can change nodes with fade animation. I was inspired by DeckNode from here.

After making it i noticed that i miss some nice features, so i made new Control with some better features like Scale between node changes etc.

Well DeckPane is simple control that shows only one node at a time. Animations between changes of current visibleNode are FADE, SCALE, PERSPECTIVE defined in enum AnimationMode, animation duration can be set via setAnimationDuration(Duration value), default is 500ms, animation duration represents duration of “in” and “out” part,  so the real duration is 1000ms. Setting current visible node is done with setVisibleNodeID(String nodeId) method. The code is still in debug phase you will see a lot of printouts in console, some parts of code are not so clean.

Here is demo video with  that show functionality of Deck Pane Control. Source can be found in git repository.

Hope you like it and feel free to comment/criticize/request features/report bugs, etc.

Here are the pictures of how project looks in netbeans in case you get any errors.

Advertisements

9 responses to “JavaFX 2.0 Deck Pane Control

  1. Pingback: JavaFX links of the week, June 20 // JavaFX News, Demos and Insight // FX Experience

  2. Pingback: Java desktop links of the week, June 20 | Jonathan Giles

  3. Hi,
    While I am trying to run this application, I am seeing following error in console.

    SEVERE: javafx.scene.control.Control loadSkinClass Failed to load skin ‘playground.control.DeckPaneSkin’ for control DeckPane[id=mainDeck, styleClass=deck-pane]

    Could you please let me know, what I am doing wrong.
    I appreciate your help.

    • Hi,
      if you did not change packages and css then it shall work as in video. I have edited post and added images of how my project looks so maybe u will find/see error. Classloader can’t find class and am not 100% sure why sometimes it happens to me but then i clean and build project in netbeans.
      Hope it helps.

  4. when you open project in Netbeans, resolve the broken reference to javafxrt via the netbeans dialog and things should run smooth.

    • Yes that is one of reasons, but sometimes if i create JavaFX project i get those errors, but creating Java project and adding reference to jfxrt.jar it works without any problems.

      • I did the same thing that I created Java project and add jfxrt.jar file it worked without any issue. Thank you so much for all your help.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s