ScalaFX Ensemble provides a gallery of over 60 sample applications illustrating how ScalaFX can be used for creation of user interfaces controls, charts, graphics, media and web views.
Each example can be executed within the ScalaFX Ensemble application, its source code can be easily seen there too. Example can be saved, from within ScalaFX Ensemble application, as an stand-alone SBT project. IntelliJ IDEA can load SBT projects if you have IntelliJ's Scala plugin installed. SBT projects can be converted to Eclipse projects using sbteclipse plugin.
ScalaFX Ensemble can be used by ScalaFX beginners as a set of examples and by more experienced users as a visual reference. Larger size screenshots and information about changes can be found on the ScalaFX Ensemble Home Page.
This project is inspired by JavaFX Ensemble.
ScalaFX Ensemble can be easily run from the source code, instructions are provided below. In the future, we will also provide an excitable version.
To compile and run the project you only need to have:
When run the very first time, SBT will download all needed dependencies including Scala and ScalaFX.
ScalaFX Ensemble Application gives you ability to save each example as a separate SBT project. You can then build and run that example.
To save an example as a stand-alone SBT project:
To run the saved example, assuming that you have SBT and JDK installed:
sbt run. This will download necessary dependencies, build, and run the example.
IntelliJ IDEA with Scala plugin can import project settings from an SBT configuration.
File > Import Project... and point to location of the ScalaFX Ensemble
Ensemble requires some resources to be generated from the sources to run. To best way to run it is be defining an SBT task in Run Configuration:
Installer for stand-alone version of ScalaFX Ensemble Application are available for Windows, Mac OS, and Linux from the Releases page.
To build an installer you need to have Install4J installed.
Use SBT task
install4j -m _os_, for instance to create Windows installer:
sbt> install4j -m windows
Note that due to native dependencies in JavaFX distribution you have to build installer on a destination OS. Current SBT setup does not allow for cross-building on different OS. It is technically possible but not currently implemented in this project.
For more information about SBT
install4j task see sbt-install4j.
To post questions or send feedback about ScalaFX Ensemble or ScalaFX in general, please use ScalaFX discussion groups:
scalafx-user - for users of ScalaFX
scalafx-dev - for ScalaFX contributors/committers
Copyright (c) 2012-2020, ScalaFX Project All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE SCALAFX PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.