Discover Converter capabilities and validate shared binding drafts
This commit is contained in:
@@ -8,6 +8,11 @@
|
||||
</parent>
|
||||
<artifactId>app-modulepath</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>de.neitzel.fxdesigner</groupId>
|
||||
<artifactId>designer-preview-api</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.neitzel.lib</groupId>
|
||||
<artifactId>fx</artifactId>
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package fixture.components;
|
||||
|
||||
@de.neitzel.fxdesigner.preview.ConverterCapabilities(
|
||||
modelType = Integer.class,
|
||||
controlType = String.class,
|
||||
reverse = true)
|
||||
public class BrokenReverseConverter implements de.neitzel.fx.view.Converter {
|
||||
static {
|
||||
System.setProperty("fixture.converter.initialized", "BrokenReverseConverter");
|
||||
}
|
||||
|
||||
public BrokenReverseConverter() {
|
||||
throw new AssertionError("Discovery must not construct Converters");
|
||||
}
|
||||
|
||||
public Object toControlValue(Object value) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package fixture.components;
|
||||
|
||||
@de.neitzel.fxdesigner.preview.ConverterCapabilities(
|
||||
modelType = Integer.class,
|
||||
controlType = String.class)
|
||||
public class ForwardRankConverter implements de.neitzel.fx.view.Converter {
|
||||
static {
|
||||
System.setProperty("fixture.converter.initialized", "ForwardRankConverter");
|
||||
}
|
||||
|
||||
public ForwardRankConverter() {
|
||||
throw new AssertionError("Discovery must not construct Converters");
|
||||
}
|
||||
|
||||
public Object toControlValue(Object value) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package fixture.components;
|
||||
|
||||
public class LegacyRankConverter extends RankConverter {
|
||||
static {
|
||||
System.setProperty("fixture.converter.initialized", "LegacyRankConverter");
|
||||
}
|
||||
|
||||
public LegacyRankConverter() {
|
||||
throw new AssertionError("Discovery must not construct Converters");
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package fixture.components;
|
||||
|
||||
@de.neitzel.fxdesigner.preview.ConverterCapabilities(
|
||||
modelType = String.class,
|
||||
controlType = String.class,
|
||||
reverse = true)
|
||||
public class NameConverterA extends RankConverter {
|
||||
static {
|
||||
System.setProperty("fixture.converter.initialized", "NameConverterA");
|
||||
}
|
||||
|
||||
public NameConverterA() {
|
||||
throw new AssertionError("Discovery must not construct Converters");
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package fixture.components;
|
||||
|
||||
@de.neitzel.fxdesigner.preview.ConverterCapabilities(
|
||||
modelType = String.class,
|
||||
controlType = String.class,
|
||||
reverse = true)
|
||||
public class NameConverterB extends RankConverter {
|
||||
static {
|
||||
System.setProperty("fixture.converter.initialized", "NameConverterB");
|
||||
}
|
||||
|
||||
public NameConverterB() {
|
||||
throw new AssertionError("Discovery must not construct Converters");
|
||||
}
|
||||
}
|
||||
+4
@@ -1,5 +1,9 @@
|
||||
package fixture.components;
|
||||
|
||||
@de.neitzel.fxdesigner.preview.ConverterCapabilities(
|
||||
modelType = Integer.class,
|
||||
controlType = String.class,
|
||||
reverse = true)
|
||||
@jakarta.inject.Singleton
|
||||
public class RankConverter implements de.neitzel.fx.view.Converter {
|
||||
public Object toControlValue(Object value) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
module fixture.app {
|
||||
requires fx;
|
||||
requires de.neitzel.fxdesigner.preview;
|
||||
requires injection;
|
||||
requires jakarta.inject;
|
||||
requires javafx.controls;
|
||||
|
||||
Reference in New Issue
Block a user