Marcin Wisniowski
08/25/2017, 6:22 PMjchildress
08/25/2017, 6:37 PMedvin
08/25/2017, 8:12 PMcarlw
08/25/2017, 8:13 PMkastork
08/25/2017, 8:13 PMkastork
08/25/2017, 8:14 PMedvin
08/25/2017, 8:22 PMdevanand
08/26/2017, 4:26 AManujkrvaish
08/26/2017, 8:37 AMfind(GlobalSearch::class).openModal(stageStyle = StageStyle.TRANSPARENT)
edvin
08/26/2017, 8:59 AMedvin
08/26/2017, 9:01 AMGlobalSearch
and position the modalStage
from there. It's important to do it after onDock is called, or else the framework will just center it after you make your change.edvin
08/26/2017, 9:01 AMopenModal
function is implemented:edvin
08/26/2017, 9:03 AMowner=null
to openModal
.aayush
08/26/2017, 12:00 PMdevanand
08/26/2017, 12:31 PMedvin
08/26/2017, 2:42 PMaayush
08/26/2017, 2:52 PMedvin
08/26/2017, 2:53 PMaayush
08/26/2017, 2:54 PMedvin
08/26/2017, 2:57 PMuser
08/26/2017, 3:00 PMfind(GlobalSearch::class).openModal(stageStyle = StageStyle.TRANSPARENT)
I also overrided the onDock method but couldnt get how to access the x and y variable ?edvin
08/26/2017, 3:00 PMowner = null
to the openModal function.edvin
08/26/2017, 3:01 PMdevanand
08/26/2017, 3:02 PMclass Testview: View(){
override val root = migpane("debug") {
add(label("Hello world"),"wrap")
}
}
fun EventTarget.migpane(lCc: String?="",op: (MigPane.() -> Unit)? = null) = opcr(this,MigPane(lCc), op)
results in error
Caused by: java.lang.IllegalArgumentException: Children: duplicate children added: parent = MigPane@1586794c
at javafx.scene.Parent$2.onProposedChange(Parent.java:454)
at com.sun.javafx.collections.VetoableListDecorator.add(VetoableListDecorator.java:206)
at org.tbee.javafx.scene.layout.MigPane.add(Unknown Source)
at org.tbee.javafx.scene.layout.MigPane.add(Unknown Source)
at com.e8om.books.views.subViews.MainMenuView$root$1.invoke(MainMenuView.kt:10)
at com.e8om.books.views.subViews.MainMenuView$root$1.invoke(MainMenuView.kt:8)
at tornadofx.FXKt.opcr(FX.kt:436)
at com.e8om.books.layouts.MigLayoutKt.migpane(MigLayout.kt:7)
at com.e8om.books.layouts.MigLayoutKt.migpane$default(MigLayout.kt:7)
at com.e8om.books.views.subViews.MainMenuView.<init>(MainMenuView.kt:9)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
devanand
08/26/2017, 3:02 PMedvin
08/26/2017, 3:04 PMlabel()
, and then you add it again with the add command from MigPane
. It would work if you call add(Label("Hello world"),"wrap")
, ie Label with capital L, so you construct a Label instance instead of using the TornadoFX builder. Let me think about a way to get the best of both worlds.edvin
08/26/2017, 3:05 PMadd
function for MigPane.edvin
08/26/2017, 3:06 PMdevanand
08/26/2017, 3:07 PM