pike
04/04/2018, 8:32 AMpike
04/04/2018, 8:32 AMif (it.size > 0) {
it.getJsonObject(0).keys.forEachIndexed { index, keyName ->
val column = TableColumn<ObservableList<JsonValue>, String>(keyName)
column.setCellValueFactory {
ReadOnlyObjectWrapper<String>(it.value[index].toString()) }
resultTable.columns.add(column)
}
}
carlw
04/04/2018, 1:04 PMcarlw
04/04/2018, 1:06 PMcarlw
04/04/2018, 2:42 PMHamza
04/04/2018, 2:44 PMHamza
04/04/2018, 2:44 PMperryprog
04/04/2018, 2:47 PMHamza
04/04/2018, 2:55 PMclass MainView : View() {
override val root = AnchorPane()
private lateinit var ball: Circle
init {
with(root) {
ball = Circle(10.0, Paint.valueOf("#000"))
root += ball
ball.apply {
layoutX = 100.0
layoutY = 100.0
}
timeline {
keyframe(1.seconds) {
updateBall()
}
cycleCount = Timeline.INDEFINITE
}
}
}
private fun updateBall() {
println("update now ")
}
}
Ruckus
04/04/2018, 3:51 PMAnimationTimer
just like you would in JavaFX.Ruckus
04/04/2018, 3:53 PMobject : AnimationTimer() {
override fun handle(now: Long) {
if (dirty) {
dirty = false
redraw()
}
}
}.start()
Ruckus
04/04/2018, 3:56 PMeachFrame {
// TODO: Implement
}
It could be as simple as
fun eachFrame(op: (Long) -> Unit) = object : AnimationTimer {
override fun handle(now: Long) = op(now)
}.also(AnimationTimer::start)
Ruckus
04/04/2018, 4:30 PMAnimationTimer
is imao one of the worst named classes in JavaFX. It isn't actually an animation, but a wrapper for a callback on each frame. Animations use it for timing, but it should have been named something like FrameTick
or FrameCallback
.Ruckus
04/04/2018, 4:31 PMperryprog
04/04/2018, 4:34 PMamanda.hinchman-dominguez
04/04/2018, 7:53 PMamanda.hinchman-dominguez
04/04/2018, 7:54 PMamanda.hinchman-dominguez
04/04/2018, 8:09 PMcarlw
04/04/2018, 8:10 PMamanda.hinchman-dominguez
04/04/2018, 8:10 PMcarlw
04/04/2018, 8:11 PMamanda.hinchman-dominguez
04/04/2018, 8:11 PMcarlw
04/04/2018, 8:12 PMamanda.hinchman-dominguez
04/04/2018, 8:12 PMamanda.hinchman-dominguez
04/04/2018, 8:15 PMamanda.hinchman-dominguez
04/04/2018, 8:16 PMTileGui
as a fragment into the controller without scoping.amanda.hinchman-dominguez
04/04/2018, 8:18 PMamanda.hinchman-dominguez
04/04/2018, 8:18 PMamanda.hinchman-dominguez
04/04/2018, 8:19 PMcarlw
04/04/2018, 8:20 PM