I currently have a working table, but I want to change the SimpleIntegerProperty "status" to a square. Basically, I want the all the "1" to become squares. This is the code that I made:
public ObservableList<PumpSites> list = FXCollections.observableArrayList(
new PumpSites (1, "Canduman"),
new PumpSites (1, "Cubacub"),
new PumpSites (1, "Liloan"),
new PumpSites (1, "Talamban"),
new PumpSites (1, "Tisa")
);
status.setCellValueFactory(new PropertyValueFactory<PumpSites, Integer>("status"));
ps.setCellValueFactory(new PropertyValueFactory<PumpSites, String>("ps"));
table.setItems(list);
public class PumpSites {
private final SimpleIntegerProperty status;
private final SimpleStringProperty ps;
public PumpSites(Integer status, String ps){
super();
this.status = new SimpleIntegerProperty(status);
this.ps = new SimpleStringProperty(ps);
}
public Integer getStatus() {
return status.get();
}
public String getPs() {
return ps.get();
}
}
How can I do that?