Questions tagged [scalafx]

ScalaFX is a Scala user interface (UI) domain-specific language (DSL) built on top of JavaFX. This means that every ScalaFX application is also a valid Scala application. By extension it supports full interoperability with Java and can run anywhere the Java Virtual Machine (JVM) and JavaFX are supported.

ScalaFX is a Scala user interface (UI) domain-specific language (DSL) built on top of JavaFX. This means that every ScalaFX application is also a valid Scala application. By extension it supports full interoperability with Java and can run anywhere the Java Virtual Machine (JVM) and JavaFX are supported.

214 questions
1
vote
1 answer

CustomTreeItem using nodes instead of String

[EDIT]: I managed to go around my problem but I am still looking for a better solution. My solution is posted below. I am relatively new to Scala as well ScalaFX but I've worked with JavaFX before. I am trying to create a TreeView with custom…
lindbergan
  • 53
  • 5
1
vote
1 answer

Monitoring Akka Streams Sources with ScalaFX

What I'm trying to solve is the following case: Given an infinite running Akka Stream I want to be able to monitor certain points of the stream. The best way I could think of where to send the messages at this point to an Actor which is also a…
user3139545
  • 6,882
  • 13
  • 44
  • 87
1
vote
1 answer

Why do I keep getting java.lang.NoClassDefFoundError at main when I try to run scalafx code in eclipse?

Please I need help with this very simple example here. I can't get to run this without getting this annoying error messages Exception in thread "main" java.lang.NoClassDefFoundError: scalafx/application/JFXApp$class at…
Sigmabooma
  • 43
  • 7
1
vote
1 answer

JavaFX controls not receiving mouse events when also using Shape3D

I'm working on a ScalaFX application that has both controls and models in the same window (it is a game). Unfortunately, when I add the models, the controls stop receiving mouse events even though the two do not overlap. A smallest working example…
James
  • 2,050
  • 13
  • 15
1
vote
1 answer

ListView with custom ListCell

I am learning scalaFX/JavaFX so as a warm up, and part of a larger project, I'm writing a remote file chooser. Binding a ListView to an ObservableBuffer[File]. But I don't want File.toString as text, so instead of extending File I wanted to use…
Bday
  • 1,005
  • 7
  • 13
1
vote
1 answer

ScalaFX @sfxml Annotation Problems

I am writing a Scalafx application using FXML for the views with the scalafxml library. I am having a ton of trouble getting the classes to compile when using the @sfxml annotation on controller classes. When using them, I keep getting…
Patrick S.
  • 275
  • 1
  • 5
  • 19
1
vote
1 answer

Can Emmet Be Used to Create FXML?

I have a scalaFX app that currently has its views created programmatically. I am wondering if I can use the Emmet tool to create FXML (particularly ScalaFXML) because I want to recreate my views in ScalaFXML to separate my views from my controllers…
Patrick S.
  • 275
  • 1
  • 5
  • 19
1
vote
1 answer

Scalafx and CSS Stylesheets

I am creating a scalafx application and I cannot get it to communicate with an external stylesheet. I get a NullPointerException if I use getClass.getResource and if I do stylesheets = "styles.css" I get a message from sbt saying it cannot find my…
Patrick S.
  • 275
  • 1
  • 5
  • 19
1
vote
1 answer

Scalafx on Android

Is it possible to build and run ScalaFX applications on Android? I'm aware of cross-build of JavaFX supported by gluon. Can ScalaFX be combined with this, or by other means? What are the intricacies? Among other things: How does building work, as I…
Luciano
  • 2,388
  • 1
  • 22
  • 33
1
vote
1 answer

Unable to create TextFieldTableCell when import scalafx.Includes._ is present

A following code does not compile: import scalafx.application.JFXApp import scalafx.application.JFXApp.PrimaryStage import scalafx.collections.ObservableBuffer import scalafx.scene.Scene import scalafx.scene.control.TableColumn._ import…
Suma
  • 33,181
  • 16
  • 123
  • 191
1
vote
0 answers

ScalaFX & CSS Files (Using Java 8)

I am using ScalaFX with Java 8 and I am running into difficulties getting ScalaFX to us a CSS file. Everything I have read up to this point says to use something along these lines: object testObj extends JFXApp { stage = new JFXApp.PrimaryStage…
S. Nori
  • 11
  • 2
1
vote
0 answers

TableTreeView (JavaFx 8): Cannot set font color of label in cell

I have a TreeTableView control in my view, which has a column, which is composed of two labels. That is during runtime a cell is rendered by displaying two labels: class ItemCell extends TreeTableCell[InventoryModelItem, InventoryModelItem] { val…
Marco
  • 2,189
  • 5
  • 25
  • 44
1
vote
1 answer

ScalaFX : How to stretch ScrollPane to fit its parent

I use the Border Pane as a layout. The bottom child has a ScrollPane, which should use the complete width (stretch) of the Border Pane - regardless of its content. val scrollPane = new ScrollPane() { hbarPolicy = ScrollBarPolicy.ALWAYS content = new…
Marco
  • 2,189
  • 5
  • 25
  • 44
1
vote
0 answers

Create an .odt file with Scala

I already had a look at: how to create an odt file programmatically with java? but it is an old question and the solutions are using another XML-parser. I'd like to easily create an .odt-file with Scala programmatically and write a very small…
user4063815
1
vote
1 answer

Compile error trying to bind mouse event listener in ScalaFx

I'm coding a little test application that uses the Canvas class in Scala with scalafx. The problem is with: gui.canvas.handleEvent(MouseEvent.MouseClicked){ a: MouseEvent => { println("Mouse pos:" + a.sceneX+ " " + a.sceneY) } …
Pepe Mandioca
  • 334
  • 2
  • 10