Using properties in Java FX application I come to question regarding understanding of Properties usage: what is a practical difference in using class instance member ...Property against Simple...Property?
public class Foo {
private IntegerProperty id;
public Foo(int id) {
this.id = new SimpleIntegerProperty(id);
}
public IntegerProperty idProperty() {
return this.id;
}
public int getId() {
return id.get();
}
public void setId(int id) {
this.id.set(id);
}
}
against
public class Foo {
private SimpleIntegerProperty id;
public Foo(int id) {
this.id = new SimpleIntegerProperty(id);
}
public SimpleIntegerProperty idProperty() {
return this.id;
}
public int getId() {
return id.get();
}
public void setId(int id) {
this.id.set(id);
}
}