Ruckus
07/30/2018, 5:28 PMRuckus
07/30/2018, 5:31 PMSVGIcon
class in TornadoFX, but I don't know much about it, so someone else may be able to help you more.orangy
orangy
private val defaultIcon = SVGIcon(javaClass.getResourceAsStream("default.svg").reader().readText())
Ruckus
07/30/2018, 5:36 PMorangy
cellFormat {
text = it.toString()
icon = defaultIcon
}
No icons…Ruckus
07/30/2018, 5:39 PMdefault.svg
? I believe SVGIcon
uses SVGPath
under the hood, so it can only use the actual path string and not the whole SVG XML specification.orangy
Ruckus
07/30/2018, 5:43 PMabhinay
07/30/2018, 6:00 PMorangy
button {
text = "Attached"
icon = imageview(defaultIcon) // image is there
}
button {
text = "Created"
icon = ImageView(defaultIcon) // no image
}
orangy
TreeItem
, but at least I know it loads 😞abhinay
07/30/2018, 6:19 PMimageview
is created for TornadoFX DSL. While ImageView
is the actual JavaFX reference, imageview
can be used to create an ImageView
using:
imageview {
image = location for image
}
orangy
cellFormat {
text = it.toString()
graphic = imageview(defaultIcon)
}
Passing ImageView
to TreeItem
constructor didn’t work.bkenn
07/30/2018, 6:24 PMorangy
icon
is something else, or may be from a different receiver (use @DslMarker
!). The correct property is graphics
, and ImageView
instance is enough. No idea why it didn’t work in constructor of TreeItem
though…orangy
TreeItem
instances before reusing them.SiebelsTim
07/30/2018, 6:55 PM@DslMarker
is difficult to implement right now as the current code relies on JavaFx's EventTarget
aimozg
07/31/2018, 5:28 AMitem
in Cell
and treeItem
in TreeCell extends Cell
edvin
07/31/2018, 6:02 AM@DslMarker
and while it would remove confusion, it would break existing code and make some things harder. We are still considering it for 2.0. It would make sure the user code is more robust and works as expected for sure.edvin
07/31/2018, 6:02 AMshortCircuitOnError
property perhaps?edvin
07/31/2018, 6:41 AMshortCircuitOnError
(maybe call it failFast
) we can add that easilyRoman
07/31/2018, 9:00 AMRoman
07/31/2018, 9:02 AMRoman
07/31/2018, 9:04 AMedvin
07/31/2018, 9:18 AMRoman
07/31/2018, 9:19 AMRoman
07/31/2018, 9:20 AMedvin
07/31/2018, 9:22 AMRoman
07/31/2018, 9:35 AM