No description
Find a file
2017-01-07 17:48:17 +00:00
src/clojurefx no message 2017-01-07 17:48:17 +00:00
test/clojurefx no message 2017-01-07 17:48:17 +00:00
.hgignore
.projectile Some extends and fully working declarative scenegraph creation. 2015-01-16 03:27:37 +00:00
LICENSE
project.clj Finally replaced the hideous JFXpanel hack. 2017-01-07 16:20:27 +00:00
README.md README.md edited online with Bitbucket 2016-01-02 22:08:45 +00:00

License Clojars Gratipay Flattr this

ClojureFX

[clojurefx "0.1.0-SNAPSHOT"]

Note: This project is still maintained. Miss a feature, found a bug? Open a ticket, and I'll fix and improve it.

A Clojure extension to make working with JavaFX simpler and more idiomatic. It allows you to naturally work with stock JavaFX components through use of extended protocols. Should a feature be missing you can easily extend ClojureFX in your own codebase or just fall back to standard JavaFX methods.

Features

This is in a very early state, so there isn't much yet. Take a look at the ClojureFX wiki.

  • Declarative EDN GUI structure compilation
  • FXML loading and scripting
  • Simplified event binding (bind a Clojure function to an event trigger)
  • Turn a scene graph into a flat id-node-map and/or get nodes by id out of a scene graph

Declarative UI programming

(def superbutton (compile [Button {:text "Close"
                                   :action #'close-handler}]))

(compile [VBox {:id "TopLevelVBox"
                :children [Label {:text "Hi!"}
                           Label {:text "I'm ClojureFX!"}
                           HBox {:id "HorizontalBox"
                           :children [Button {:text "OK"}
						              superbutton]}]}])