内容简介:注意:文章首发:
compile 'no.tornado:tornadofx:1.7.17'
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
HelloWorld
import javafx.application.Application
import tornadofx.*
class App:tornadofx.App(MainView::class,MainStylesheet::class)
class MainView:View() {
override val root = vbox {
label("Hello World")
}
}
class MainStylesheet:Stylesheet() {
init {
label {
fontSize = 20.px
}
}
}
fun main(args:Array<String>) {
Application.launch(App::class.java,*args)
}
进阶之Observable
import javafx.application.Application
import javafx.collections.FXCollections
import tornadofx.*
class App:tornadofx.App(MainView::class,MainStylesheet::class)
class Person(id: Int, name: String) {
var id: Int by property(id)
var name: String by property(name)
}
class MainView:View() {
private val persons = FXCollections.observableArrayList(
Person(10, "Ant"),
Person(20, "Bee"),
Person(30, "Cat")
)
override val root = tableview(persons) {
column("ID", Person::id)
column("name", Person::name)
}
}
class MainStylesheet:Stylesheet() {
init {
label {
fontFamily = "Noto Sans CJK SC Medium"
fontSize = 20.px
}
}
}
fun main(args:Array<String>) {
Application.launch(App::class.java,*args)
}
注意:
- JavaFX可能对中文支持不好,最要手动设置中g字体
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
数据化运营速成手册
胡晨川 / 电子工业出版社 / 2017-4 / 55
《数据化运营速成手册》用于提升互联网公司员工的数据应用能力,即数据化运营能力。首先,从最常用的数据图表切入,帮助执行层正确地绘图,管理层正确地看图;接着,梳理运营中最基本的数据应用知识,涉及数据获取、数据清洗、数据认知、分析框架、指标体系、运营实验等内容。然后,介绍作者认为必要的统计学知识,包括假设检验、方差分析、回归分析和时间序列分解,并引入了管理科学中的规划求解方法。最后,介绍了数据分析工具的......一起来看看 《数据化运营速成手册》 这本书的介绍吧!