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
0
votes
1 answer

ScalaFX multiple childrens

Backend: I have an observable collection of strings: val list = new ObservableBuffer[String] UI: And I want to put this list after title in VBox: new VBox { children = Seq( new Label("My awesome title"), list //Doesn't work ) } How…
Oleg
  • 899
  • 1
  • 8
  • 22
0
votes
0 answers

How to make TextArea fit Toolbar correctly?

I'm writing a simple WebBrowser application and i would like to have a search bar at the top of the window. The root of my stage is a TabPane that currently has only one tab. stage = new PrimaryStage{ scene = new Scene{ minHeight = 600 …
mox_mox
  • 111
  • 2
  • 10
0
votes
0 answers

ScalaFx and Akka Actors

a couple of weeks ago I started programming in Scala and using Akka Actors. I'm trying to implement a scala programm that uses an Akka ActorSystem to serve multiple UI's. I am currently trying to setup an ScalaFx app and connect it through an…
JaySon
  • 367
  • 5
  • 14
0
votes
1 answer

ScalaFX/JavaFX Stylesheet is not delegated completely

So I'm trying to add a stylesheet to my scene. That works just fine, until I come to the second layer of the scene. I have the following style.css: .label: { -fx-font: 16px "Serif"; -fx-padding: 5; } .root { -fx-background:…
Aram Becker
  • 2,026
  • 1
  • 20
  • 32
0
votes
1 answer

Scalafx: create lineChart in scala

I am working on a sample of line chart code: import scalafx.application.JFXApp import scalafx.stage.Stage import scalafx.scene.Scene import scalafx.scene.chart.{LineChart,NumberAxis, XYChart} import scalafx.collections.ObservableBuffer …
0
votes
1 answer

Scala: ProcessIO readers loose output of subsidiary program

I am writing an GUI interface program for a command line program with a REPL (think like bash or gnuplot), from now on called tlmgr. The main thread does the GUI (scalafx) thingy, another thread starts tlmgr and connects stdin/stdout/stderr: val…
Norbert Preining
  • 237
  • 1
  • 11
0
votes
0 answers

ScalaFX: how to asynchronously update a TreeTableView

I want to represent the data I have in a Tree and show it using TreeTableView. The items shown are wrapped in a case class: case class Foo(name: StringProperty, desc:StringPropert) { def this(_name: String, _desc: String) =…
Norbert Preining
  • 237
  • 1
  • 11
0
votes
1 answer

Passing information between two stages with ScalaFX fails due to not setting the field in controller

I am trying to understand the message passing possibilities of ScalaFX in combination with ScalaFXML. I created a small example, which has two views with controllers defined in the FXML. The first (or Main) view, is supposed to send a String to the…
Tobs.Core
  • 703
  • 1
  • 5
  • 12
0
votes
1 answer

Passing parameters to custom TreeItem constructor

Relatively new to Scala and ScalaFX but I've worked with Java and JavaFX before. My question is if there is a way to pass parameters to a custom TreeItem? Code looks like this: I'd like to do this: def makePictureHolder(picture: Picture):…
lindbergan
  • 53
  • 5
0
votes
1 answer

How to get a handle to the TableView from the controller in scalafx

I'm trying to find some sample code to update my TableView from inside my controller. If possible I want to make my TableView with fxml. def addPerson(event: ActionEvent) { // how do I access my TableView items? } My TableView looks…
pguardiario
  • 53,827
  • 19
  • 119
  • 159
0
votes
1 answer

Scalafx animation timer causing recursive : Possible to avoid that?

I am trying to make a game which uses the class AnimationTimer to deal with it. The Summary of my code looks something like this: Main Class object Game extends JFXApp{ def showMenu{ //code that show the .fxml layout and controller…
0
votes
1 answer

onClick of an Hbox with polygon shape is not conforming to the shape

I am making an interactive map of the United States. I have mapped out the coordinates of each state into a polygon shape. If I add an onMouseClick to the polygon shape, everything works fine, however I would like to be able to easily add children…
Turtle
  • 33
  • 1
  • 6
0
votes
1 answer

Setting the shape property of an Hbox - JavaFX

I'm trying to set the shape property of an hbox to a polygon. The following code is within a class that extends Hbox with a constructor that requires a list of points called origPoints. val polygon = new…
Turtle
  • 33
  • 1
  • 6
0
votes
0 answers

Scala : How to convert Int to Number type for the purpose of using in bar chart?

In scala , how does one achieve converting type Int to Number? var A : Int = 10 How do i convert A to number type? I want to plot a bar chart using scalafx, and NumberAxis accept number as the data. So , i will need to convert Int to Number. How do…
Brian Ruchiadi
  • 331
  • 1
  • 13
  • 29
0
votes
1 answer

Scala : How do i successfully plot this barchart?

i am doing an assignment which require me to plot a barchart in scalafx. The snippets below are the current code that i am writing. I have been thinking the error for 6 hours now. var A : Int = 0 var B : Int = 0 var C : Int = 0 var D : Int = 0 …
Brian Ruchiadi
  • 331
  • 1
  • 13
  • 29