scalafx

'<==' unknown by intellij while using scalafx

别来无恙 提交于 2019-12-12 20:14:45
问题 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" width = 600 height = 450 scene = new Scene { fill = Color.LIGHTGREEN content = new Rectangle { x = 25 y = 40 width = 100 height = 100 fill <== when (hover) choose Color.GREEN otherwise Color.RED } } } } do you know where does the error comes from?(the

clipping of MeshView scalafx/javafx

折月煮酒 提交于 2019-12-11 11:14:30
问题 I have the following test code, where I try to clip a MeshView with a circle. I also tried putting the meshView into a group then clipping that, but this result in a black circle. Is there a way to clip a MeshView, preferably without putting it into a group? import scalafx.application.JFXApp import scalafx.application.JFXApp.PrimaryStage import scalafx.scene.image.Image import scalafx.scene.paint.{Color, PhongMaterial} import scalafx.scene.shape.{TriangleMesh, Circle, MeshView} import scalafx

ScalaFX: HelloWorld compilation error

前提是你 提交于 2019-12-10 03:26:48
问题 I'm new to Scala and SBT so I might be missing something obvious. I was trying to compile the HelloWorld example on http://www.scalafx.org/docs/quickstart/ I created a file build.sbt containing: scalaVersion := "2.11.5" libraryDependencies += "org.scalafx" %% "scalafx" % "8.0.0-R4" and a file src/main/scala/ScalaFXHelloWorld.scala containing the code from linked page. However, when running sbt run I get: OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed

JavaFx2 or ScalaFx + Akka

假如想象 提交于 2019-12-03 15:01:00
问题 How to run Akka actors in a JavaFX/ScalaFX Application ? (This is an update of question based on the first answers) Is the solution to share the same execution context? Meaning having the Actors dispatchers based on the JavaFx ExecutorService ? (The one with which on which it runs UI manipulation code) Does that mean one agent would represent the UI and be able to manipulate it ? I mean because suggested below if a couple of actor are on the UI ExecutorService, doesn't that mean share a state

用Slick持久化ScalaFxBean

≡放荡痞女 提交于 2019-12-03 08:24:40
一直想给ScalaFX找一个合适的持久曾框架,要越方便越好。 接触Scala之前玩的是JavaFX,曾用熟悉的Mybatis写持久层,JavaFxBean的Properties不能用IDE自动生成用于Mybatis的getter和setter。比方说一个属性 private fianl IntegerProperty age = new SimpleIntegerProperty(this, "age", 20); 用Eclipse或IDEA可以生成如下getter和setter public IntegerProperty getAge() { return age; } public void setAge(IntegerProperty age) { this.age = age; } 然而持久层框架需要的(也就是JavaFxBean的标配)是这样的getter和setter public String getName() { return name.get(); } public void setName(String name) { this.name.set(name); } public StringProperty nameProperty() { return name; } 自己写过一个简单的工具用来生产这样的getter和setter,但仍嫌麻烦。

JavaFx2 or ScalaFx + Akka

巧了我就是萌 提交于 2019-12-03 05:42:43
How to run Akka actors in a JavaFX/ScalaFX Application ? (This is an update of question based on the first answers) Is the solution to share the same execution context? Meaning having the Actors dispatchers based on the JavaFx ExecutorService ? (The one with which on which it runs UI manipulation code) Does that mean one agent would represent the UI and be able to manipulate it ? I mean because suggested below if a couple of actor are on the UI ExecutorService, doesn't that mean share a state between agent (the object being the UI)? Can 2 actors communicate while being on different executor

Open and close JavaFx apps in scala console

我的未来我决定 提交于 2019-12-02 03:24:19
Here is an example: /* * Copyright 2013 ScalaFX Project * All right reserved. */ package scalafx.ensemble.example.charts import scalafx.application.JFXApp import scalafx.scene.Scene import scalafx.collections.ObservableBuffer import scalafx.scene.chart.LineChart import scalafx.scene.chart.NumberAxis import scalafx.scene.chart.XYChart /** A chart in which lines connect a series of data points. Useful for viewing * data trends over time. * * @see scalafx.scene.chart.LineChart * @see scalafx.scene.chart.Chart * @see scalafx.scene.chart.Axis * @see scalafx.scene.chart.NumberAxis * @related charts