2 Replies Latest reply: Jan 19, 2013 3:11 AM by 985740 RSS

    Foundation Style CSS for JavaFX

    985740
      Hey guys - as part of a project I've been hacking on, I've needed to create some Foundation style buttons: I've posted a project to Github (https://github.com/devork/golan) which contains styles for buttons, horizontal tabs and headers. So far this has been tested on JavaFX 2.2 JVM 7 (u10).

      I'm adding more styles as and when I can, but its certainly usable at the moment ... and I figure its quite a nice style and maybe useful for others. Feedback welcome - post issues and feature requests to Guthub Github please.

      Enjoy....

      Alex

      Edited by: devork on Jan 19, 2013 1:12 AM
        • 1. Re: Foundation Style CSS for JavaFX
          jsmith
          This is very nice.

          I am very happy to see ports of some of the better web styles to JavaFX.
          I think it is very important to be able to show that a JavaFX application can look at least as good and be styled at least as flexibly as a modern, well-designed web app.

          How difficult was this work?
          Was it very time consuming?
          For a simple port do you think that you need any design skills at all, or could anybody have really done this who knows a bit of css/html/javafx?
          Was the difference between the javafx css syntax and the html css syntax a major pain or not really an issue?
          Similarly did a lack of a one-to-one correspondence between html document tags (e.g. the header tags) and JavaFX complicate this?
          Will the upcoming rich text support in JavaFX 8 simplify (or make possible) more of these kinds of ports?

          I'm kind of interested in getting the Bootstrap styles ported to JavaFX, together with a set of components which allow you to mark up the fxml in a manner similar to a Bootstrap html document.
          • 2. Re: Foundation Style CSS for JavaFX
            985740
            I'll take the points in turn

            1) How difficult was this work?

            No at all: the whole experience was very pleasant and very easy to do. This is my first JavaFX app (a map style editor with real time preview)

            2) Was it very time consuming?

            No: using the preview ScenceBuilder 1.1 the styles are updated on the fly - the SceneBuilder could do with a built in CSS editor, but that's only minor: the workflow was quite simple anyway

            3) For a simple port do you think that you need any design skills at all, or could anybody have really done this who knows a bit of css/html/javafx?

            Anyone can do this: my background is server side code - I don't do much in the way of front ends - I know JS and HTML very well but my CSS leaves a lot to me desired: so basically if I can do it ...

            4) Was the difference between the javafx css syntax and the html css syntax a major pain or not really an issue?

            Once I got used to it, made no difference although I do keep forgetting to add '-fx-' and the -fx-text-fill I always type as -fx-text-color ...

            5) Similarly did a lack of a one-to-one correspondence between html document tags (e.g. the header tags) and JavaFX complicate this?

            No

            6) Will the upcoming rich text support in JavaFX 8 simplify (or make possible) more of these kinds of ports?

            I need to have a look at this: as I said I'm a complete beginner with JavaFX so I'm still catching up on the current implementation.

            The bootstrap styles would be really nice: a lot of people who I've showed the app to are quite amazed when I tell them its Java and not an embedded web app.

            Alex