Include JavaFX plugin (specify dependent JavaFX modules) and apply changes to relevant modules (explorer, demobench, client/jfx).

This commit is contained in:
josecoll 2019-04-09 13:34:30 +01:00
parent 594fca9d3f
commit 38e84d46b4
10 changed files with 62 additions and 2 deletions

View File

@ -1,3 +1,13 @@
// JDK 11 JavaFX
plugins {
id 'org.openjfx.javafxplugin' version '0.0.7'
}
javafx {
modules = [ 'javafx.controls',
'javafx.fxml'
]
}
apply plugin: 'kotlin'
apply plugin: 'net.corda.plugins.quasar-utils'
apply plugin: 'net.corda.plugins.publish-utils'

View File

@ -41,6 +41,9 @@ class AggregatedList<A, E : Any, K : Any>(
val toKey: (E) -> K,
val assemble: (K, ObservableList<E>) -> A
) : TransformationList<A, E>(list) {
override fun getViewIndex(p0: Int): Int {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
private class AggregationGroup<E, out A>(
val keyHashCode: Int,

View File

@ -11,6 +11,10 @@ import java.util.*
* is propagated as expected.
*/
class ConcatenatedList<A>(sourceList: ObservableList<ObservableList<A>>) : TransformationList<A, ObservableList<A>>(sourceList) {
override fun getViewIndex(p0: Int): Int {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
// A wrapper for input lists so we hash differently even if a list is reused in the input.
@VisibleForTesting
internal class WrappedObservableList<A>(

View File

@ -12,6 +12,9 @@ import java.util.*
* are reflected in the exposed list as expected.
*/
class FlattenedList<A>(val sourceList: ObservableList<out ObservableValue<out A>>) : TransformationList<A, ObservableValue<out A>>(sourceList) {
override fun getViewIndex(p0: Int): Int {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
/**
* We maintain an ObservableValue->index map. This is needed because we need the ObservableValue's index in order to

View File

@ -11,6 +11,10 @@ import java.util.*
* Use this instead of [EasyBind.map] to trade off memory vs CPU, or if (god forbid) the mapped function is side-effecting.
*/
class MappedList<A, B>(list: ObservableList<A>, val function: (A) -> B) : TransformationList<B, A>(list) {
override fun getViewIndex(p0: Int): Int {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
private val backingList = ArrayList<B>(list.size)
init {

View File

@ -10,6 +10,9 @@ import java.util.*
* non-backed observable
*/
class ReplayedList<A>(sourceList: ObservableList<A>) : TransformationList<A, A>(sourceList) {
override fun getViewIndex(p0: Int): Int {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
val replayedList = ArrayList<A>(sourceList)

View File

@ -1,3 +1,14 @@
// JDK 11 JavaFX
plugins {
id 'org.openjfx.javafxplugin' version '0.0.7'
}
javafx {
modules = [ 'javafx.controls',
'javafx.fxml',
'javafx.swing'
]
}
ext {
tornadofx_version = '1.7.15'
jna_version = '4.1.0'

View File

@ -1,3 +1,14 @@
// JDK 11 JavaFX
plugins {
id 'org.openjfx.javafxplugin' version '0.0.7'
}
javafx {
modules = [ 'javafx.controls',
'javafx.fxml',
'javafx.swing'
]
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'application'

View File

@ -1,3 +1,14 @@
// JDK 11 JavaFX
plugins {
id 'org.openjfx.javafxplugin' version '0.0.7'
}
javafx {
modules = [ 'javafx.controls',
'javafx.fxml',
'javafx.swing'
]
}
ext {
tornadofx_version = '1.7.15'
controlsfx_version = '8.40.12'

View File

@ -174,8 +174,8 @@ public class CordaWebserverCaplet extends Capsule {
private static void checkJavaVersion() {
String version = System.getProperty("java.version");
if (version == null || !version.startsWith("1.8")) {
System.err.printf("Error: Unsupported Java version %s; currently only version 1.8 is supported.\n", version);
if (version == null || Arrays.asList("1.8", "11").stream().noneMatch(version::startsWith)) {
System.err.printf("Error: Unsupported Java version %s; currently only version 1.8 or 11 is supported.\n", version);
System.exit(1);
}
}