Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 802 Bytes

README.md

File metadata and controls

41 lines (33 loc) · 802 Bytes

ScalaFxml

Generate a Scala Trait from a Fxml file.

Gui.fxml:

  <AnchorPane fx:id="anchorPane1">
		<children>
			<Label text="Huhu"/>
		</children>
	</AnchorPane>

Gui.scala:

	trait Gui {
		val anchorPane1 = new AnchorPane() {
			children = List(
				label_2
			)
		}
		val labe_2 = new Label() {
			text = "Huhu"
		}
	}

Example at: https://github.com/Nuriaion/ScalaFxml-example

This is a very early prototype witch probably only works with the fxml file of the exmaple!

ToDo

  • use reflection on scalafx/javafx insted of pattern matching
  • parse immport statements of fxml file
  • how should the code for a button look? (onAction?)
  • ...

Build Status