use of jgnash.uifx.util.TableViewManager in project jgnash by ccavanaugh.
the class ImportPageTwoController method initialize.
@FXML
private void initialize() {
textFlow.getChildren().addAll(new Text(TextResource.getString("ImportTwo.txt")));
deleteButton.disableProperty().bind(tableView.getSelectionModel().selectedItemProperty().isNull());
tableView.setTableMenuButtonVisible(false);
tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
tableView.setEditable(true);
tableView.getItems().addListener((ListChangeListener<ImportTransaction>) c -> valid.set(tableView.getItems().size() > 0));
buildTableView();
tableViewManager = new TableViewManager<>(tableView, PREF_NODE);
tableViewManager.setColumnWeightFactory(column -> PREF_COLUMN_WEIGHTS[column]);
tableViewManager.setMinimumColumnWidthFactory(column -> MIN_COLUMN_WIDTHS[column]);
updateDescriptor();
}
use of jgnash.uifx.util.TableViewManager in project jgnash by ccavanaugh.
the class ReconcileDialogController method loadTables.
private void loadTables() {
final TableViewManager<RecTransaction> increaseTableViewManager = new TableViewManager<>(increaseTableView, PREF_NODE);
increaseTableViewManager.setColumnWeightFactory(getColumnWeightFactory());
increaseTableViewManager.setPreferenceKeyFactory(() -> INCREASE_KEY);
final TableViewManager<RecTransaction> decreaseTableViewManager = new TableViewManager<>(decreaseTableView, PREF_NODE);
decreaseTableViewManager.setColumnWeightFactory(getColumnWeightFactory());
decreaseTableViewManager.setPreferenceKeyFactory(() -> DECREASE_KEY);
transactions.addAll(account.getSortedTransactionList().stream().filter(this::reconcilable).map(transaction -> new RecTransaction(transaction, transaction.getReconciled(account))).collect(Collectors.toList()));
configureTableView(increaseTableView, increaseTableViewManager);
configureTableView(decreaseTableView, decreaseTableViewManager);
increaseTableView.setItems(increaseList);
decreaseTableView.setItems(decreaseList);
updateCalculatedValues();
}
Aggregations