use of com.kyj.fx.voeditor.visual.component.grid.MergedTableView in project Gargoyle by callakrsos.
the class MergedTableViewExam method start.
/**
* @inheritDoc
*/
@Override
public void start(Stage primaryStage) throws Exception {
MergedTableView<String> root = new MergedTableView<>();
TableColumn<String, String> e = new TableColumn<>("sample");
e.setCellValueFactory(param -> {
String value = param.getValue();
return new SimpleStringProperty(value);
});
e.setCellFactory(MergedTextFieldTableCell.forTableColumn());
root.getColumns().add(e);
Random random = new Random(10);
for (int i = 0; i < 100; i++) {
root.getItems().add(String.valueOf(random.nextInt(10)));
}
//
primaryStage.setScene(new Scene(root));
primaryStage.show();
}
Aggregations