Undecorator: A New Theme


Hi folks!

It’s been a while since my last post, but I didn’t give up JavaFX coding!

Here is a little update on this Stage decoration library, this time focused on a new theme named “Touch” with large icons, and with some minor bug fixes.

A new skin for Undecorator stages

A new skin for Undecorator stages

Here is a video version:

 

Last but not least:

The executable jar to test: here!

The source code: here!

For those of you who would like to stay with the classic theme, you have to call this method before the create the UndecoratorScene:


// Override default Touch theme:

UndecoratorScene.setClassicDecoration();

UndecoratorScene undecoratorScene = new UndecoratorScene(primaryStage, root);

Here is the result in the demo:

How to switch to old decoration mode

How to switch to old decoration mode

Last comment, there’s still an issue on Mac OSX in JavaFX with the fullscreen mode with Undecorated windows…

 

Enjoy, feel free to comment!

Thanks

Advertisements
  1. #1 by carldea on 03/04/2016 - 23:28

    Arnaud,
    Really nice work! Any plans to put your your library into Maven Central?

    Keep up the great work.
    Carl

    • #2 by arnaud nouard on 04/04/2016 - 17:10

      Thanks for the kind words Carl 🙂 !
      For Maven, since I’m not familiar with it, is there a “For dummies” help 😉 ?

      • #3 by carldea on 05/04/2016 - 05:55

        Arnaud, I’m not very good with maven either. I know enough to be dangerous.
        You may need to ask others I know how to publish to local maven repos at work, but not maven central. I believe there is some approval process.

        Usually at my work we can’t download and use libraries unless they are published artifacts on Maven central.

        Very nice work… I just want to show your work off to co-workers. 🙂

  2. #4 by Nico on 01/11/2016 - 14:08

    Hello,
    first of all i want say that it is a nice work.
    I implemented it to an private project but i got an problem.
    If i need use of the controller class i cant address it from Eclipse to SceneBuilder.
    There apend the following error message:
    javafx.fxml.LoadException: Controller value already specified.
    Thanks

  3. #5 by Miming on 11/11/2016 - 03:14

    The touch theme is impressive. But how do you animate the window when minimizing, maximizing, etc.? It doesn’t animate on windows 10.

  4. #6 by sjsobol on 16/11/2016 - 20:57

    I like UndecoratorBis. May hack on it to see if I can get it to behave the way I want it to behave, but overall, great job! Could you please put it on Maven Central? Thanks

    • #7 by arnaud nouard on 16/11/2016 - 22:06

      Thanks for your feedback. I would love to see a screenshot of what you’re doing with it!
      Is it what you look for? https://bintray.com/in-sidefx/maven/undecorator/0.1.0/view

      Cheers

      • #8 by sjsobol on 17/11/2016 - 03:26

        That’s exactly what I was looking for! I didn’t realize it was already in the Bintray respository – that’ll work fine, thank you.

        What I want to do is provide an easy way to exclude the menu and/or the minimize/maximize/fullscreen buttons without having to remove them after the fact. If I can get it working, I’d like to contribute my code to the project. Do you accept pull requests?

      • #9 by arnaud nouard on 17/11/2016 - 07:03

        I’ve already posted answers to this kind of request. Generally, you can do it with modifying the code: simply invoke lookup(elementId) and set it as invisible.
        Let me know if didn’t succeed.
        And feel free to send pull request!
        Thanks.

  5. #10 by sjsobol on 17/11/2016 - 18:10

    Ugh. I can’t leave a reply to your reply.

    Found an even easier way to make the change I wanted: made a copy of stagedecoration.fxml, edited it, used it instead of the default.

    The only difficulty is this: if I remove the context menu, I get a NullPointerException. I can guess why, though I haven’t looked at the code yet. If it’s what I think it is, it’ll be easy to fix.

    I will submit that pull request soon.

    Thank you for your work on this project!

    • #11 by sjsobol on 18/11/2016 - 18:46

      The problem WAS what I thought. I simply needed to add a check in insidefx.undecorator.Undecorator – when initDecoration() is called, I check whether contextMenu is null, and I only manipulate the menu if it isn’t.

      I’ll check in the change to my repo and send a pull request.

      Have you given any thought to unit/acceptance testing? I did not that there are no unit tests in the project. Thing is, I’m not sure of any good way to do automated testing with a GUI. I’m looking at this blog post and the author has some good ideas…. they could be adapted for use with a JavaFX application:

      http://www.javaworld.com/article/2073056/swing-gui-programming/automate-gui-tests-for-swing-applications.html

      • #12 by sjsobol on 18/11/2016 - 18:46

        I did NOTE that…

  1. Java desktop links of the week, April 4 « Jonathan Giles
  2. JavaFX links of the week, April 4 // JavaFX News, Demos and Insight // FX Experience

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

%d bloggers like this: