Skip to content

fabianpage/ScalaFxml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages