|
1 | 1 | package org.jabref.gui.sharelatex;
|
2 | 2 |
|
3 |
| -import org.jabref.gui.AbstractController; |
4 |
| -import org.jabref.logic.sharelatex.ShareLatexManager; |
5 |
| - |
6 | 3 | import javax.inject.Inject;
|
7 | 4 |
|
8 | 5 | import javafx.fxml.FXML;
|
9 | 6 | import javafx.scene.control.TableColumn;
|
10 | 7 | import javafx.scene.control.TableView;
|
11 | 8 |
|
| 9 | +import org.jabref.gui.AbstractController; |
| 10 | +import org.jabref.logic.sharelatex.ShareLatexManager; |
| 11 | + |
12 | 12 | public class ShareLatexProjectDialogController extends AbstractController<ShareLatexProjectDialogViewModel> {
|
13 | 13 |
|
14 |
| - @FXML TableColumn<ShareLatexProjectViewModel, String> colTitle; |
15 |
| - @FXML TableColumn<ShareLatexProjectViewModel, String> colOwner; |
16 |
| - @FXML TableColumn<ShareLatexProjectViewModel, String> colLastModified; |
17 |
| - @FXML TableView<ShareLatexProjectViewModel> tblProjects; |
18 |
| - @Inject ShareLatexManager manager; |
| 14 | + @FXML private TableColumn<ShareLatexProjectViewModel, String> colTitle; |
| 15 | + @FXML private TableColumn<ShareLatexProjectViewModel, String> colOwner; |
| 16 | + @FXML private TableColumn<ShareLatexProjectViewModel, String> colLastModified; |
| 17 | + @FXML private TableView<ShareLatexProjectViewModel> tblProjects; |
| 18 | + @Inject private ShareLatexManager manager; |
19 | 19 |
|
20 | 20 | @FXML
|
21 | 21 | private void initialize() {
|
22 |
| - |
23 |
| - viewModel = new ShareLatexProjectDialogViewModel(manager.getProjects()); |
| 22 | + viewModel = new ShareLatexProjectDialogViewModel(); |
| 23 | + viewModel.addProjects(manager.getProjects()); |
24 | 24 |
|
25 | 25 | colTitle.setCellValueFactory(cellData -> cellData.getValue().getProjectTitle());
|
26 | 26 | colOwner.setCellValueFactory(cellData -> cellData.getValue().getOwner());
|
|
0 commit comments