bjonnh
01/02/2019, 10:37 PMSergio Casero
01/03/2019, 7:33 PMimageview(productViewModel.image) {
imageProperty().addListener { _, _, image ->
val newMeasure = image.width
val x = (image.width - newMeasure) / 2
val y = (image.height - newMeasure) / 2
val croppedPortion = Rectangle2D(x, y, newMeasure, newMeasure)
viewport = croppedPortion
fitWidth = 300.0
fitHeight = 300.0
isSmooth = true
}
}
carlw
01/03/2019, 9:53 PMbjonnh
01/04/2019, 3:59 AMhudsonb
01/04/2019, 4:03 AMbjonnh
01/04/2019, 2:33 PMcarlw
01/04/2019, 3:19 PMbjonnh
01/07/2019, 5:17 PMvar journal = bind(forceObjectProperty = true) { citation?.observable(Citation::journal_id) as Property<Int>? }
var journalEntry = bind {
legacyController.journalList?.getElement(journal.value).toProperty()
}
It is used to feed a combobox, but the problem is even before that I can see it when I do:
model.journalEntry.onChange { println("Changed the journal to $it") }
The model is defined as a class CitationModel(var citation: Citation?) : ViewModel() { … }
The model is by default a val model = CitationModel(null)
Once the user loads something, I do a citationView.model.rebind {
citation = newCitation
}
where newCitation is coming from some database query.
I get the right call to rebind, and the object bound is the good one.hudsonb
01/07/2019, 6:09 PMParent
impl that will scale it's content to fit?Shan
01/10/2019, 12:41 AMchangeableName
in this example when I hit the "save" button in RenameFragmentTest
? I must learn!sbyrne
01/10/2019, 12:53 AMjchildress
01/10/2019, 2:31 AMhttps://www.youtube.com/watch?v=OuF2BMnCjt4&t=862s▾
edvin
01/10/2019, 12:10 PMhudsonb
01/11/2019, 2:09 PMcarlw
01/11/2019, 4:08 PMcarlw
01/11/2019, 4:27 PMelifarley
01/11/2019, 4:29 PMcolumn(...)
below cause this error:
None of the following functions can be called with the arguments supplied.
override val root = vbox(10.0) {
tableview(items) {
column("SKU", Item::sku)
column("Item", Item::descr)
column("Price", Item::price)
column("Taxable", Item::taxable)
bindSelected(mySelectedItem)
setPrefSize(667.0, 376.0)
columnResizePolicy = CONSTRAINED_RESIZE_POLICY
vgrow = Priority.ALWAYS
}
carlw
01/12/2019, 12:53 PMNikky
01/13/2019, 5:20 AMjchildress
01/14/2019, 1:13 PMsbyrne
01/14/2019, 5:43 PMnate
01/15/2019, 8:49 PMchapter 01
sits on top of. i've tried using box-shadow's and blooms but not to the desired result yet. any idea how I would be able to achieve this? I'd appreciate a nudge in the right direction. thankselifarley
01/17/2019, 5:08 PMparameters.unnamed.firstOrNull()
for instance, but how can a view access its enclosing Application ?carlw
01/17/2019, 5:18 PMelifarley
01/17/2019, 11:33 PMjavafx.web
module to module-info.java
, I get an error:
gradle jlinkZip
> Task :discoverMainScriptsExtensions
e: Module javafx.web cannot be found in the module graph
> Task :compileKotlin FAILED
amiracam
01/18/2019, 7:46 PMimport tornadofx.View
import tornadofx.button
import tornadofx.label
/**
* Created by charles on 2019-01-18.
*/
class MyView: View() {
override val root: vbox {
button("Press me")
label("Waiting")
}
}
IDEA claims it can’t find vbox
I’m on jdk1.8.0_131
here’s my gradle build
plugins {
id "org.jetbrains.kotlin.jvm" version "1.3.11"
}
group 'polyglotric'
version '1.0-SNAPSHOT'
apply plugin: 'kotlin'
apply plugin: 'application'
mainClassName = 'com.polyglotric.MyApp'
dependencies {
compile 'org.jetbrains.kotlin:kotlin-stdlib'
compile 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
compile group: 'no.tornado', name: 'tornadofx', version: '1.7.18'
}
repositories {
mavenCentral()
}
task wrapper(type: Wrapper) {
gradleVersion = '4.2.1'
}
compileKotlin {
kotlinOptions {
jvmTarget = '1.8'
}
}
thanks for the helpcarlw
01/18/2019, 8:05 PMamiracam
01/18/2019, 8:21 PMNico Smeenk
01/19/2019, 11:29 PMamanda.hinchman-dominguez
01/20/2019, 12:06 AMamanda.hinchman-dominguez
01/20/2019, 12:06 AMSackCastellon
01/20/2019, 1:28 PMamanda.hinchman-dominguez
01/20/2019, 3:18 PMSackCastellon
01/20/2019, 3:37 PMamanda.hinchman-dominguez
01/20/2019, 3:44 PMSackCastellon
01/20/2019, 3:50 PMListView
with a custom cell. So they are not used to test if things work, at least not automatically, you could run them if you wanted, but manually.