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

Are the children of a ScalaFX Pane of JavaFX type?

I am quite new to Scala and ScalaFX, so I probably do not understand this correctly. My issue: I add a node (f.e. Button) to a ScalaFX Pane (f.e. VBox). When I access the children of the Pane the children type changed from ScalaFX Button to JavaFX…
hami
  • 443
  • 5
  • 13
2
votes
1 answer

ScalaFX: How to convert an Image object to a byte array

Here below is the code to generate a QR-Code with ScalaFX and ZXing: import java.util.{HashMap => JavaHashMap} import org.apache.commons.codec.binary.Base64 import scalafx.scene.image.{Image, PixelFormat, WritableImage} import…
j3d
  • 9,492
  • 22
  • 88
  • 172
2
votes
3 answers

auto-updating JavaFX/ScalaFX client installation

Is there any ready-made installer, component, api or any combination, that would let a JavaFX application, or any JVM based client for that matter, automatically and securely check for a new version of itself, and get, install and re-launch the new…
matanster
  • 15,072
  • 19
  • 88
  • 167
2
votes
1 answer

Adding a SubScene to the center of a BorderPane in ScalaFX

The main layout of my ScalaFX 8 application consists of a BorderPane. The top attribute contains a menu whereas bottom contains something similar to a status bar. My goal is to display a component for viewing 3D objects in the center of the…
fxfour
  • 143
  • 1
  • 10
2
votes
1 answer

JavaFX TreeView -- change background CSS on sibling nodes on MouseEvent

I am trying to implement onMouseEnter and onMouseExit events on a JavaFX ListView. What I want to do is if the mouse moves over a node of the list view, I want to change the background color of the nodes that are currently visible children in the…
funkyjive
  • 65
  • 1
  • 7
2
votes
1 answer

Overlaying elements mouse listener ScalaFx/JavaFx execution

I have the following problem in my ScalaFX Application. I have a Label in a VBox. Both have a onMouseClicked listener assigned, as can be seen in my example code. When clicking on the inside label, both handlers are executed. This is not the…
smoes
  • 591
  • 2
  • 17
2
votes
0 answers

scalafx animation upon layout change

I'm trying to animate changes in layout in a ScalaFX application, similar to this question. The scene includes one main Pane. Each time it is clicked, another Pane ("son") is added inside it (actually inside a FlowPane inside it). Pane addition…
2
votes
2 answers

How to change the background of a ScrollPane (JavaFX/ScalaFX)?

I want to change the background color of a ScrollPane. This is part of my code where I try to do that: val sp=new javafx.scene.control.ScrollPane(new Group(new Text(...))) sp.setPannable(true) sp.setStyle("-fx-background-color: blue") …
user3603546
  • 325
  • 2
  • 11
2
votes
2 answers

A simplest scalafx example can't be compiled

I'm trying the scalafx with a simplest example, but it can't be compiled and the error is like: Error:scalac: bad symbolic reference to javafx.stage.PopupWindow.AnchorLocation encountered in class file 'StageIncludes.class'. Cannot access type…
Freewind
  • 193,756
  • 157
  • 432
  • 708
2
votes
1 answer

How to interact with an FXML form in ScalaFx?

Considering this example how do I get or set anything on the form from the Main code? All we have is a simple Main object like object Main extends JFXApp { val resource = getClass.getResource("/AdoptionForm.fxml") val root: jfxs.Parent =…
Ivan
  • 63,011
  • 101
  • 250
  • 382
2
votes
0 answers

JavaFX KeyEvent.getText() returns empty?

According to the JavaDoc for KeyEvent's getText() method, it returns A String describing the key code, such as "HOME", "F1" or "A", for key pressed and key released events. For key typed events, text is always the empty string. However, when I…
Todd O'Bryan
  • 2,234
  • 17
  • 30
2
votes
2 answers

'<==' unknown by intellij while using scalafx

A sign is not recognized by intellij : "<==", in a scala program using scalafx. The scalafx version of the jar is 2.10:1.0.0-M5. the program is this: object launcher extends JFXApp { stage = new JFXApp.PrimaryStage { title = "Hello Stage" …
lolveley
  • 1,659
  • 2
  • 18
  • 34
2
votes
1 answer

scalafx + intellij : NoClassDefFoundError: javafx/scene/shape/CullFace

I am blocked while trying to create a javafx scala project.I created a scala project in intellij idea 13 (the ast one), then I added manuelly the jar of scalafx ("scalafx_2.10-8.0.0-M1.jar") and copied this little program : object World extends…
lolveley
  • 1,659
  • 2
  • 18
  • 34
2
votes
2 answers

Using 'nested' types in a list in Scala

I'm using ScalaFX and JavaFX, and have this code: import scalafx.Includes._ class Type1(anInt: Int, ...) class Type2(aString: String, ...) class ListItem[T](internalValue:T, ...) object Worker { val list1 =…
Jon Onstott
  • 13,499
  • 16
  • 80
  • 133
2
votes
2 answers

binding a function with conditional logic in scala

I am a scala newbie who came from JavaFX 1.3 and this is my first post in stackoverflow In JavaFX 1.3 I can do something like this property : bind if (condition) value1 else value2 In Scala, I attempted doing something like this: property <==…