I am trying to create a generic tableView class, but i want it to handle only the certain data types in my program- which are in a diffrent package.
Is that possible by operating wild cards?
public class GenericTable <T>{
private Collection<T> data;
@FXML
private Text headline;
@FXML
private ObservableList<T> properties=FXCollections.observableArrayList();
@FXML
private TableView<T> table;
@FXML
private TableColumn<T, String> prop1;
@FXML
private TableColumn<T, String> prop2;
@FXML
private TableColumn<T, String> prop3;
public void setData(Collection<T> data){
this.data=data;
}
public void setText(String txt){
headline=new Text(txt);
}
public void initialize(){
}
}