tornadofx

How to fix NSInternalInconsistencyException in TornadoFX when running on macOS 10.14?

两盒软妹~` 提交于 2021-02-11 15:19:33
问题 I'm using TornadoFX and I've recently upgraded to macOS 10.14. The problem is that I get this error whenever I open a dialog and focus another application window: 2019-01-23 13:32:31.270 java[9369:78410] *** Assertion failure in -[NSEvent _initWithCGEvent:eventRef:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1671.20.108/AppKit.subproj/NSEvent.m:1969 2019-01-23 13:32:46.218 java[9369:78410] unrecognized type is 4294967295 2019-01-23 13:32:46.218 java[9369:78410] ***

Dynamic table columns

纵然是瞬间 提交于 2021-02-10 06:53:30
问题 How should I proceed when I want to generate table from list of lists which contains only strings(ex. data from csv). Names of columns don't matter. From all examples provided I saw only binding table items to specific model(which doesn't fit there as I have unknown number and names of columns). 回答1: If you already know the column names and data type, I would suggest to hard code that. If you know nothing about the format and simply want to create a TableView with completely dynamic columns,

Where to put gradle dependencies block in kotlin native project generated by Intellij IDEA?

时光毁灭记忆、已成空白 提交于 2020-05-15 22:44:56
问题 I'm trying to make my first app in Kotlin Native. I want to add TornadoFX to my freshly created project. I need to add a dependency according to TornadoFX guide dependencies { compile 'no.tornado:tornadofx:x.y.z' } The issue is - I cant figure out where exactly do I put it . This is my build.gradle contents (generated by IntelliJ IDEA): plugins { id 'org.jetbrains.kotlin.multiplatform' version '1.3.60' } repositories { mavenCentral() } kotlin { // For ARM, should be changed to iosArm32 or

TornadoFX JavaFX Sync Scroll across tableviews

风流意气都作罢 提交于 2019-12-25 07:49:11
问题 I am trying to synchronise scrolls across the tableviews. (Both Horizontal & Vertical) The SyncScrollEx View has two tableView which is basically one Fragment placed side by side, with same dataset, and hence same table size layout. Expected Behaviour: When I scroll on one tableview, the other tableview's scrollbar should also scroll for the same amount. Below is my current progress: import javafx.beans.property.SimpleIntegerProperty import javafx.beans.property.SimpleStringProperty import

TornadoFX unresolved JavaFx

余生颓废 提交于 2019-12-22 12:38:59
问题 I wanted to create a new project that should be a desktop application. For this purpose, I have selected Kotlin language and TornadoFX framework. I have installed the TornadoFX plugin and created a new T tornadofx-gradle-project . The base setup made by Intellij was successful but I have encountered a problem. When I wanted to run the generated project it failed. The project cannot resolve the java fx. I have dug through the web and found nothing that would fix the problem. The error log that

Tornadofx - How to pass parameter to Fragment on every instance

瘦欲@ 提交于 2019-12-21 02:23:34
问题 I am a newbie to javafx, kotlin and obviously tornadofx. Issue : How to pass parameters to Fragment on every instance? Lets say I have a table view layout as my fragment. Now this fragment is used at multiple places but with different datasets. eg. Adding a fragment in: class SomeView : View() { ... root += SomeViewFragment::class } class SomeAnotherView : View() { ... root += SomeViewFragment::class } Declaring Fragment: class SomeViewFragment : Fragment() { ... tableview

Binding `FXTask` message to `Label` without component coupling in TornadoFX

自闭症网瘾萝莉.ら 提交于 2019-12-13 03:14:26
问题 Good day. I was wondering if there is a convenient or streamlined way of binding FXTask 's messageProperty and runningProperty to Label 's textProperty and visibleWhen property accordingly without coupling FXTask and Label themselves? For example in the sample app below, I'm binding messageProperty by coupling label's reference to a task, which introduces an extra lateinit var statusLabel . Similarly, I'm binding runningProperty by coupling task's reference to a label which introduces an

Change Style Sheets During App Execution TornadoFX

☆樱花仙子☆ 提交于 2019-12-13 02:59:24
问题 I am trying to add functionality in my app to allow a user to change the background theme (Light/Dark) of the app in a view called Settings. If I am changing the theme by using two different style sheets from Stylesheet classes, then how can I change which stylesheet the app uses during execution? Is there a simpler way to do this? My code for these settings can be found below. Any improvements on the code are helpful as well: class Settings(){ var BackGroundTheme: BackGroundThemeState =

TornadoFX How to create MDI with list of child windows models?

别来无恙 提交于 2019-12-12 04:14:45
问题 I have following components: class ChildModel:ViewModel() { //or it may be an POJO, it does not matter val value .... } class ParentView: View() { ... //Maybe this should be implemented into ParentViewModel val childrenList:List<ChildModel> fun addFragmentAsChild() { //should: // 1. display fragment within ParentView // 2. add fragment into modelList (or fragmentList - it does not matter - important to have access to the model of every child ) } fun deleteFragmentAsChild() { //should destroy

TornadoFX Drag and Drop on a TreeView

浪子不回头ぞ 提交于 2019-12-11 08:25:58
问题 I am new to JavaFX and, therefore, also to TornadoFX so please bear with me. I have a simple app in Java but want to move it to Kotlin and am running into problems finding the corresponding mechanisms in TornadoFX. I have a ListView holding implementations of IStoryItem representing Stories and Chapters. I want to be able to move the chapters around and even from one story to another. The TreeView in Java has the following implementation in its setCellFactory call: tv.setCellFactory(new