TableColumn
cell value factory. An example
of how to use this class is:
ObservableList<Map> personsMapList = ...
TableColumn<Map, String> firstNameColumn = new TableColumn<Map, String>("First Name");
firstNameColumn.setCellValueFactory(new MapValueFactory<String>("firstName"));
TableView<Map> table = new TableView<Map>(personMapList);
tableView.getColumns().setAll(firstNameColumn);
In this example, there is a list of Map instances, where each Map instance
represents a single row in the TableView. The "firstName" string is used as a
key into this map, and the value corresponding to this key is returned, if
one exists. If the value is an ObservableValue, then this is returned
directly, otherwise the value is wrapped in a ReadOnlyObjectWrapper.
TableColumn, TableView, TableCell, PropertyValueFactory
| Access | Constructor and Description |
|---|---|
| public | MapValueFactory(final Object
The key to use to lookup the value in the key)Map.Creates a default MapValueFactory, which will use the provided key to
lookup the value for cells in the |
| Modifier and Type | Method and Description |
|---|---|
| public ObservableValue | call(TableColumn.
Implements javafx. The |
| key | back to summary |
|---|---|
| private final Object key | |
| MapValueFactory | back to summary |
|---|---|
| public MapValueFactory(final Object key) Creates a default MapValueFactory, which will use the provided key to
lookup the value for cells in the
| |
| call | back to summary |
|---|---|
| public ObservableValue Implements javafx. Doc from javafx. The
| |