Undecorator – Automn enhancements


Hi Folks!

For my next application development I needed a refresh of the Undecorator helper, so here are the details of the enhancements:

Title bar

Image

Title bar label

 

How to display the title set on the stage:

public void start(final Stage primaryStage) throws Exception {
primaryStage = stage;
// Set the title before to create the Undecorator class
primaryStage.setTitle("Undecorator Scene Demo");
UndecoratorScene undecoratorScene = new UndecoratorScene(primaryStage, root);

New dock feedback

And many issues fixed… and found :-):

      JavaFX bugs  (Mac only):

  • Set stage as fullscreen using Keyboard accelerator (Ctrl+Cmd+F) crashes JVM
  • KeyCombination does not respect keyboard’s locale (i.e. always QWERTY key code)
  • Multi screen: On second screen JFX returns wrong values, e.g. MinY ==300 (?!)

Check this out!

Executable jar file is still here:  macJar

and to access to the code, project and binaries it’s still there:github-logo-transparent

That’s all for today and stay tuned for my next JavaFX App announcement :-)!

About these ads

  1. #1 by ilkinabdullayev on 04/12/2013 - 08:01

    Hello
    I am using your Undecorated stage
    Firstly congratulations,good job!!
    But there’s a problem.setResizable(false); method not working
    Please,help me

    • #2 by arnaud nouard on 05/12/2013 - 19:56

      Hello and thank you for your support!
      I fixed the resizable issue and delivered sources and a new demo including the resizable test.
      Let me know if it suits your needs.
      Thanks.

  2. #3 by Janerson Douglas on 13/12/2013 - 03:54

    Hello congratulations for undecorator
    I’m using it with java 8, but when running the code
    My app normally run undercorator but appears a white border
    this only happens as 8 java, java 8 as this next release would not be a good idea to fix the undercorator to run in java 8?

    • #4 by arnaud nouard on 13/12/2013 - 14:10

      Hi Douglas and thanks for your feedback.
      I’m already aware of visual artifacts while running on java8, but it was with older versions of java8 so I hoped things have been fixed since ;-).
      Ok, I’ll install a new dev env based on java8 in order to address that.
      Stay tuned!

      • #5 by Robert Ross on 16/04/2014 - 23:01

        I’m also interested in porting this into a JavaFX8 environment. Any progress on that front?

      • #6 by arnaud nouard on 17/04/2014 - 10:32

        Hi,
        Coming soon, but if JavaFX8 would work in VMWare it would be already there :) !

      • #7 by Robert Ross on 13/06/2014 - 21:24

        Any update on when a version might be available for JavaFX 8?

      • #8 by arnaud nouard on 13/06/2014 - 22:06

        Hi Robert,
        Here you are, Java8 support seems ok, I quickly submitted changes.
        Thanks

  3. #9 by frankred on 24/01/2014 - 13:11

    Undecorator is awesome! Thank you soooo much. It makes my application 10 times more beatiful!!!

    Maybe some screenshots in the related github project would attract more people, here is one:

    I LOVE IT!

    • #10 by arnaud nouard on 19/02/2014 - 12:04

      Hi and thank you very much for your feeback!
      You’re now in the welcome page of the Undecorator GitHub :).

  4. #11 by Robert Ross on 04/02/2014 - 15:36

    Great idea but there’s one problem with using the Undecorator.jar outright. You allow passing in a String path to the FXML resource. However, the problem with this approach is that getResource cannot access files (by String) outside the JAR itself. Instead (or in addition to) I would suggest having the constructor for Undecorator accept a resource outright rather than the string representation of the path. This way, the user can pull in an FXML file from anywhere and provide it to the Undecorator class for processing.

    • #12 by arnaud nouard on 05/02/2014 - 08:34

      Hi Robert,
      You’re absolutely right, I’ll add required parameters for that.
      Thanks!

      • #13 by arnaud nouard on 19/02/2014 - 12:02

        This is delivered, I added an URL as parameter as well.
        Thanks

  5. #14 by 007 on 26/03/2014 - 21:19

    Hello , first of all i have to say “it is AWESOME!!!”
    but i have 2 problem :)
    1. When i click the “full screen” button, “press esc ……” sentence come to front, how i can translate to another language?
    2. How i can change the language dynamically , it means, i create language buttons, but buttons can’t change locale dynamically :)

    • #15 by arnaud nouard on 27/03/2014 - 15:59

      Hi James (007),
      Thanks a lot for your encouragement!
      For your questions:
      1. This should be fixed since 2.02 according to https://javafx-jira.kenai.com/browse/RT-15436, if you set a global Locale: Locale.setDefault(Locale.JAPAN);
      2. Hum… you identified a limitation. Currently, the locale is only read at startup time and is not refreshable. I’ll think about it but since there is no “Action” pattern in JavaFX 2 to centralize localized String, the fix could be very “basic”…

      Thanks again.

  6. #16 by Gie on 07/04/2014 - 07:56

    You sir is amazing!! But I do wonder of the license for the code. Can I use your codes for my projects? I find that I will be using your codes often. :) Crediting you is never a problem for sure. :)

    Thanks for this awesome piece of art. ;)

    • #17 by arnaud nouard on 08/04/2014 - 09:54

      Hi,
      Thank you for your comment, I’m flattered :)
      You can use this code under the BSD license, so for any usage.
      I’d really appreciate to be credited since I do this on my free time.
      Thanks!

      • #18 by Gie on 11/04/2014 - 17:16

        I’ll make sure to credit you then. :) You definitely deserve it. :D By the way, I was going to insert a code for, instead of the usual minimizing of the window, I want to minimize it in the tray. I hope you can help me in to telling me where to inject the code. Thank you so much!! :)

      • #19 by arnaud nouard on 11/04/2014 - 21:51

        Hi,
        In the UndecoratorController class, change the method _minimize() to this
        private void _minimize() {
        Stage stage = undecorator.getStage();
        // stage.setIconified(true);
        stage.hide();
        }

        The main issue will be to avoid the JavaFX thread to terminate, else the application will exit. So, in addition to the modification above, you’ll have to create “something else” on the JavaFX Thread to maintain the application up.
        Then, you have to manage the AWT SystemTray (http://docs.oracle.com/javase/tutorial/uiswing/misc/systemtray.html). Remember that mixing AWT and JavaFX on MacOS does not work currently.
        Good luck.

      • #20 by Gie on 14/04/2014 - 00:23

        Thank you for that helpful hints. :) I got it to work now with your help! Thank you so much!! You’re the best!! :D

  7. #21 by frankred on 08/04/2014 - 09:19

    I have a problem with Java8, not sure if it is a Java or Undecorator Bug :(

    I opened an issue for that problem:

    https://github.com/in-sideFX/Undecorator/issues/4

  8. #22 by Haryanto on 07/05/2014 - 11:55

    very nice, I’ve tried it, and the result is very beautiful, but how to remove the menu button on the left?, sory for my english

    • #23 by arnaud nouard on 07/05/2014 - 12:17

      Hi,
      Thank You.
      The Stage’s button has the CSS Id: “StageMenu”, so you should be able to find it in the Stage nodes with Stage.lookup(“#StageMenu”), and so hide it.
      BTW, you also can customize it using CSS, such as:

      /*
      * Menu button
      */
      .decoration-button-menu{
      -fx-background-radius: 0;
      -fx-border-style: null;
      -fx-background-color: null;
      -fx-background-image:url("./img/Down.png");;
      -fx-background-repeat:no-repeat;
      }

      .decoration-button-menu:hover{
      -fx-background-color: null;
      -fx-background-image:url("./img/Down-hover.png");
      -fx-background-repeat:no-repeat;
      }

      Thanks.

  1. JavaFX links of the week, November 4 // JavaFX News, Demos and Insight // FX Experience
  2. Java desktop links of the week, November 4 « Jonathan Giles
  3. aLive is alive! | In-SideFX

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

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: