Implement retained target sessions, runtime sizing and Component navigation
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
package fixture.components;
|
||||
|
||||
@jakarta.inject.Singleton
|
||||
public class AddressForm extends javafx.scene.layout.VBox {
|
||||
private final javafx.beans.property.ObjectProperty<Object> model =
|
||||
new javafx.beans.property.SimpleObjectProperty<>();
|
||||
|
||||
public javafx.beans.property.ObjectProperty<Object> modelProperty() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public Object getModel() {
|
||||
return model.get();
|
||||
}
|
||||
|
||||
public void setModel(Object value) {
|
||||
model.set(value);
|
||||
}
|
||||
|
||||
@javafx.fxml.FXML private NoteForm nested;
|
||||
|
||||
public void initialize() {
|
||||
nested.modelProperty().bind(model);
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package fixture.components;
|
||||
|
||||
@jakarta.inject.Singleton
|
||||
public class NoteForm extends javafx.scene.layout.VBox {
|
||||
private final javafx.beans.property.ObjectProperty<Object> model =
|
||||
new javafx.beans.property.SimpleObjectProperty<>();
|
||||
|
||||
public javafx.beans.property.ObjectProperty<Object> modelProperty() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public Object getModel() {
|
||||
return model.get();
|
||||
}
|
||||
|
||||
public void setModel(Object value) {
|
||||
model.set(value);
|
||||
}
|
||||
}
|
||||
+4
@@ -15,6 +15,10 @@ public class PersonController implements de.neitzel.fx.view.HasViewModel {
|
||||
received = vm;
|
||||
}
|
||||
|
||||
public void action() {
|
||||
((javafx.beans.property.Property) received.property("name")).setValue("Controller action");
|
||||
}
|
||||
|
||||
public String greeting() {
|
||||
if (received == null) throw new IllegalStateException("No ViewModel before bindings");
|
||||
return greeting.text();
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package fixture.components;
|
||||
|
||||
@jakarta.inject.Singleton
|
||||
public class RankConverter implements de.neitzel.fx.view.Converter {
|
||||
public Object toControlValue(Object value) {
|
||||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
public Object toAttributeValue(Object value) {
|
||||
return Integer.valueOf((String) value);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package fixture.components;
|
||||
|
||||
public class UnstableLayout extends javafx.scene.layout.VBox {
|
||||
protected void layoutChildren() {
|
||||
requestLayout();
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package fixture.components;
|
||||
|
||||
@jakarta.inject.Singleton
|
||||
public class VisitRow extends javafx.scene.layout.HBox {
|
||||
private final javafx.beans.property.ObjectProperty<Object> model =
|
||||
new javafx.beans.property.SimpleObjectProperty<>();
|
||||
|
||||
public javafx.beans.property.ObjectProperty<Object> modelProperty() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public Object getModel() {
|
||||
return model.get();
|
||||
}
|
||||
|
||||
public void setModel(Object value) {
|
||||
model.set(value);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,26 @@
|
||||
package fixture.model;
|
||||
|
||||
public class Person {
|
||||
private java.util.List<Address> visits = new java.util.ArrayList<>();
|
||||
|
||||
public java.util.List<Address> getVisits() {
|
||||
return visits;
|
||||
}
|
||||
|
||||
public void setVisits(java.util.List<Address> value) {
|
||||
visits = value;
|
||||
}
|
||||
|
||||
private int rank = 7;
|
||||
|
||||
public int getRank() {
|
||||
return rank;
|
||||
}
|
||||
|
||||
public void setRank(int value) {
|
||||
rank = value;
|
||||
}
|
||||
|
||||
private String name = "Ada";
|
||||
private Address home = new Address();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user